Message ID | 1421338359-27467-9-git-send-email-tomeu.vizoso@collabora.com |
---|---|
State | Needs Review / ACK, archived |
Headers | show |
Context | Check | Description |
---|---|---|
robh/checkpatch | warning | total: 1 errors, 0 warnings, 0 lines checked |
robh/patch-applied | success |
On 01/15/2015 09:12 AM, Tomeu Vizoso wrote:
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Some explanation of why such a delay might be useful would be ... useful!
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 01/15/2015 09:12 AM, Tomeu Vizoso wrote: > Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Ah, having read the explanation in the next patch, I think ... > diff --git a/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt b/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt > +- delay : delay to wait after driving the reset gpio active [ms]. ... delay is the wrong name. reset-pulse-width or reset-pulse-length would be better. delay sounds like a delay after resetting the device before it can be accessed. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 15 January 2015 at 18:33, Stephen Warren <swarren@wwwdotorg.org> wrote: > On 01/15/2015 09:12 AM, Tomeu Vizoso wrote: >> >> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> > > > Ah, having read the explanation in the next patch, I think ... > >> diff --git a/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt >> b/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt > > >> +- delay : delay to wait after driving the reset gpio active [ms]. > > > ... delay is the wrong name. reset-pulse-width or reset-pulse-length would > be better. delay sounds like a delay after resetting the device before it > can be accessed. I agree with Stephen's proposal. This patch needs to be rebased and retested on latest version the mmc-pwrseq patches. Moreover, if you think the patchset which $subject patch is a part of is material for 3.20, I will need to share an immutable branch with the mmc-pwrseq patches for ARM SOC to pull in, tell me if you need that. Kind regards Uffe -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 01/21/2015 11:44 AM, Ulf Hansson wrote: > On 15 January 2015 at 18:33, Stephen Warren <swarren@wwwdotorg.org> wrote: >> On 01/15/2015 09:12 AM, Tomeu Vizoso wrote: >>> >>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> >> >> >> Ah, having read the explanation in the next patch, I think ... >> >>> diff --git a/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt >>> b/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt >> >> >>> +- delay : delay to wait after driving the reset gpio active [ms]. >> >> >> ... delay is the wrong name. reset-pulse-width or reset-pulse-length would >> be better. delay sounds like a delay after resetting the device before it >> can be accessed. > > I agree with Stephen's proposal. Cool. > This patch needs to be rebased and retested on latest version the > mmc-pwrseq patches. Sure. > Moreover, if you think the patchset which $subject > patch is a part of is material for 3.20, I will need to share an > immutable branch with the mmc-pwrseq patches for ARM SOC to pull in, > tell me if you need that. I don't think this will make 3.20 as I have other series with higher priority and there's quite some work left to do on this one. Regards, Tomeu > Kind regards > Uffe > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 21 January 2015 at 14:54, Tomeu Vizoso <tomeu.vizoso@collabora.com> wrote: > On 01/21/2015 11:44 AM, Ulf Hansson wrote: >> On 15 January 2015 at 18:33, Stephen Warren <swarren@wwwdotorg.org> wrote: >>> On 01/15/2015 09:12 AM, Tomeu Vizoso wrote: >>>> >>>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> >>> >>> >>> Ah, having read the explanation in the next patch, I think ... >>> >>>> diff --git a/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt >>>> b/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt >>> >>> >>>> +- delay : delay to wait after driving the reset gpio active [ms]. >>> >>> >>> ... delay is the wrong name. reset-pulse-width or reset-pulse-length would >>> be better. delay sounds like a delay after resetting the device before it >>> can be accessed. >> >> I agree with Stephen's proposal. > > Cool. > >> This patch needs to be rebased and retested on latest version the >> mmc-pwrseq patches. > > Sure. > >> Moreover, if you think the patchset which $subject >> patch is a part of is material for 3.20, I will need to share an >> immutable branch with the mmc-pwrseq patches for ARM SOC to pull in, >> tell me if you need that. > > I don't think this will make 3.20 as I have other series with higher > priority and there's quite some work left to do on this one. If that's the case, I might as well consider this patch separately and take it through my mmc tree. Of course, that means you anyway need to rebase/test it. Kind regards Uffe -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 21 January 2015 at 15:15, Ulf Hansson <ulf.hansson@linaro.org> wrote: > On 21 January 2015 at 14:54, Tomeu Vizoso <tomeu.vizoso@collabora.com> wrote: >> On 01/21/2015 11:44 AM, Ulf Hansson wrote: >>> On 15 January 2015 at 18:33, Stephen Warren <swarren@wwwdotorg.org> wrote: >>>> On 01/15/2015 09:12 AM, Tomeu Vizoso wrote: >>>>> >>>>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> >>>> >>>> >>>> Ah, having read the explanation in the next patch, I think ... >>>> >>>>> diff --git a/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt >>>>> b/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt >>>> >>>> >>>>> +- delay : delay to wait after driving the reset gpio active [ms]. >>>> >>>> >>>> ... delay is the wrong name. reset-pulse-width or reset-pulse-length would >>>> be better. delay sounds like a delay after resetting the device before it >>>> can be accessed. >>> >>> I agree with Stephen's proposal. >> >> Cool. >> >>> This patch needs to be rebased and retested on latest version the >>> mmc-pwrseq patches. >> >> Sure. >> >>> Moreover, if you think the patchset which $subject >>> patch is a part of is material for 3.20, I will need to share an >>> immutable branch with the mmc-pwrseq patches for ARM SOC to pull in, >>> tell me if you need that. >> >> I don't think this will make 3.20 as I have other series with higher >> priority and there's quite some work left to do on this one. > > If that's the case, I might as well consider this patch separately and > take it through my mmc tree. Of course, that means you anyway need to > rebase/test it. Sounds good, I expect to send a v3 tomorrow. Regards, Tomeu > Kind regards > Uffe > -- > To unsubscribe from this list: send the line "unsubscribe linux-tegra" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt b/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt index 6fe0cd6..b353381 100644 --- a/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt +++ b/Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt @@ -14,10 +14,12 @@ Required properties: Optional properties: - reset-gpios : contains a list of GPIO specifiers, though currently only one specifier is supported. +- delay : delay to wait after driving the reset gpio active [ms]. Example: sdhci0_pwrseq { compatible = "mmc,pwrseq-simple"; reset-gpios = <&gpio1 12 0>; + delay = <20>; } diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c index 42d9836..3e521cc 100644 --- a/drivers/mmc/core/pwrseq_simple.c +++ b/drivers/mmc/core/pwrseq_simple.c @@ -12,14 +12,17 @@ #include <linux/device.h> #include <linux/err.h> #include <linux/gpio/consumer.h> +#include <linux/of_platform.h> #include <linux/mmc/host.h> +#include "core.h" #include "pwrseq.h" struct mmc_pwrseq_simple { struct mmc_pwrseq pwrseq; struct gpio_desc *reset_gpio; + unsigned int delay_ms; }; static void mmc_pwrseq_simple_pre_power_on(struct mmc_host *host) @@ -29,6 +32,9 @@ static void mmc_pwrseq_simple_pre_power_on(struct mmc_host *host) if (!IS_ERR(pwrseq->reset_gpio)) gpiod_set_value_cansleep(pwrseq->reset_gpio, 1); + + if (pwrseq->delay_ms) + mmc_delay(pwrseq->delay_ms); } static void mmc_pwrseq_simple_post_power_on(struct mmc_host *host) @@ -76,6 +82,8 @@ int mmc_pwrseq_simple_alloc(struct mmc_host *host, struct device *dev) goto free; } + of_property_read_u32(dev->of_node, "delay", &pwrseq->delay_ms); + pwrseq->pwrseq.ops = &mmc_pwrseq_simple_ops; host->pwrseq = &pwrseq->pwrseq;
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> --- Documentation/devicetree/bindings/mmc/mmc,pwrseq-simple.txt | 2 ++ drivers/mmc/core/pwrseq_simple.c | 8 ++++++++ 2 files changed, 10 insertions(+)