All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] fsl_esdhc: GPIO regulator as VQMMC supply?
@ 2019-05-31 13:17 Sven Schwermer
  2019-06-04  2:42 ` Peng Fan
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Schwermer @ 2019-05-31 13:17 UTC (permalink / raw)
  To: u-boot

Hi,

I’m trying to implement the VQMMC supply for the an eMMC on my board using a GPIO regulator, i.e.

reg_sd_vsel: regulator-sd-vsel {
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_sd_vsel>;
  compatible = "regulator-gpio";
  regulator-name = "sd-vsel";
  regulator-min-microvolt = <1800000>;
  regulator-max-microvolt = <3300000>;
  gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
  states = <1800000 1 3300000 0>;
  gpios-states = <0>; /* default: 3.3V */
};

&usdhc3 {
  vqmmc-supply = <&reg_sd_vsel>;
};

This is using an i.MX7D SoC, so my [eu]sdhc driver is fsl_esdhc. In fsl_esdhc_probe, regulator_set_enable is called for vqmmc-supply. This fails for GPIO regulators because they only have a set_value method and no set_enable method. How is this best resolved? Does it make sense to add a set_enable method to the GPIO regulator or should the esdhc driver handle the -ENOSYS return value gracefully? Or should I write my device tree differently?

Hints are much appreciated. Thanks!

Best regards,
Sven

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-06-22 19:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 13:17 [U-Boot] fsl_esdhc: GPIO regulator as VQMMC supply? Sven Schwermer
2019-06-04  2:42 ` Peng Fan
2019-06-12  8:26   ` [U-Boot] [PATCH 1/2] regulator: Factor out common enable code Sven Schwermer
2019-06-12  8:26     ` [U-Boot] [PATCH 2/2] regulator: Allow enabling GPIO regulator Sven Schwermer
2019-06-22 19:10       ` Simon Glass
2019-06-22 19:10     ` [U-Boot] [PATCH 1/2] regulator: Factor out common enable code Simon Glass
2019-06-12  8:39   ` sven at svenschwermer.de
2019-06-12  8:39     ` [U-Boot] [PATCH 2/2] regulator: Allow enabling GPIO regulator sven at svenschwermer.de

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.