All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] fsl_esdhc: GPIO regulator as VQMMC supply?
Date: Tue, 4 Jun 2019 02:42:49 +0000	[thread overview]
Message-ID: <AM0PR04MB448192DFD0E8E1DA66D7922A88150@AM0PR04MB4481.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <DF10AFC5-2470-46A6-B7A6-C90214E3DBE5@svenschwermer.de>


> Subject: fsl_esdhc: GPIO regulator as VQMMC supply?
> 
> 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?

Add set_enable callback to gpio regulator seems make sense.

Regards,
Peng

> 
> Hints are much appreciated. Thanks!
> 
> Best regards,
> Sven

  reply	other threads:[~2019-06-04  2:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 13:17 [U-Boot] fsl_esdhc: GPIO regulator as VQMMC supply? Sven Schwermer
2019-06-04  2:42 ` Peng Fan [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR04MB448192DFD0E8E1DA66D7922A88150@AM0PR04MB4481.eurprd04.prod.outlook.com \
    --to=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.