"Turn off" USB from .dts file?

I love minimal build for my TD-W9980. Now I'm testing one without USB support (. I've already removed everything USB related with make menuconfig, now I'm moving to the DTS file definition and later possibly to make kernel_menuconfig CONFIG_TARGET=subtarget.

Right now just focus on the DTS file. I removed the usb led trigger support from the build, so from the dts file I removed the led-usb references (here and here).

My question is: Since I've also removed the USB packages all together, should I also remove what's left about USB (usb vbus regulator definition, usb_phy definitions and usb definitions)?

this will depend on the reason you want to remove it in the first place....?

i'd personally keep the regulator in tact... and for most intents and purposes, removing the upper level software will do the trick well...

unless..... in particular there are security reasons behind the removal ( aka hot glue in the USB port ), in that case, using the dts becomes more practicable.

generally it's handy to use

/* status = "okay"; */
status = "disabled";

rather than remove stuff from the .dts..... easier to re-enable and should your code ever pass to someone else & it provides some level of documentation... on that point.... good to add some comments too;

/* disabled this section as testing without usb */

ok thanks :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.