Disable unused regulators

Hi,

Fixed regulators are defined for the TX2i in the file tegra186-cvb-prod-p2597-b00-p3489-1000-a00-00.dtsi. What is the correct way to disable non used regulators on a custom board,
For example, en_vdd_sdcard1, which I guess from the name is for the sdcard, is not utilized on our customer board.

Regards.

You can just remove it from the device tree.

ShaneCCC, hi,

thanks for the reply. Removing them from the DT will require to go through all .dts and .dtsi files which reference the regulators, is there a cleaner way?

This is what I tried:

en_vdd_sdcard1: regulator@1 {
			compatible = "regulator-fixed-sync";
			<b>regulator-always-on;</b>
			regulator-name = "en-vdd-sd";
			/*reg = <1>;			
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			gpio = <&tegra_main_gpio TEGRA_MAIN_GPIO(P, 5) 0>;
			enable-active-high;*/
		};

and this is what I got:

[    0.315471] reg-fixed-sync-voltage fixed-regulators:regulator@1: Failed to allocate supply name
[    0.315499] reg-fixed-sync-voltage: probe of fixed-regulators:regulator@1 failed with error -12

Regards.

Try add status = “disabled”; If not working then you need to remove all of them from the source.

ShaneCCC, hi,

thanks that worked! (for example):

en_vdd_sdcard1: regulator@1 {
		<b>status = "disabled";</b>
		compatible = "regulator-fixed-sync";
		regulator-name = "en-vdd-sd";
		reg = <1>;			
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&tegra_main_gpio TEGRA_MAIN_GPIO(P, 5) 0>;
		enable-active-high;
		};

Regards.