Message ID | 1523585925-169568-1-git-send-email-shawn.lin@rock-chips.com |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | [v2,1/2] Documentation: mmc: add optional cd-delay-ms property | expand |
On Fri, Apr 13, 2018 at 10:18:44AM +0800, Shawn Lin wrote: > slot-gpio uses a fixed delay, 200ms, before detecting card after the card > is inserted. 200ms doesn't work for some platforms, so some host drivers > added their own properties for parsing that from DT, for instance, > dw_mmc and pxamci. That being said, it should also be tunable when using > slog-gpio. slot-gpio? Or is it cd-gpios? > > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> > --- > > Changes in v2: None > > Documentation/devicetree/bindings/mmc/mmc.txt | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt > index 467cd7b..215b9a2 100644 > --- a/Documentation/devicetree/bindings/mmc/mmc.txt > +++ b/Documentation/devicetree/bindings/mmc/mmc.txt > @@ -19,6 +19,8 @@ Optional properties: > - wp-gpios: Specify GPIOs for write protection, see gpio binding > - cd-inverted: when present, polarity on the CD line is inverted. See the note > below for the case, when a GPIO is used for the CD line > +- cd-delay-ms: Set delay time before detecting card after card insert interrupt. > + It's only valid when cd-gpios is present. > - wp-inverted: when present, polarity on the WP line is inverted. See the note > below for the case, when a GPIO is used for the WP line > - disable-wp: When set no physical WP line is present. This property should > -- > 1.9.1 > > > -- > 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 -- 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
Hi Rob, On 2018/4/17 3:26, Rob Herring wrote: > On Fri, Apr 13, 2018 at 10:18:44AM +0800, Shawn Lin wrote: >> slot-gpio uses a fixed delay, 200ms, before detecting card after the card >> is inserted. 200ms doesn't work for some platforms, so some host drivers >> added their own properties for parsing that from DT, for instance, >> dw_mmc and pxamci. That being said, it should also be tunable when using >> slog-gpio. > > slot-gpio? > > Or is it cd-gpios? I think actually it shoule be cd-gpios. :) Will update it. > >> >> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> >> --- >> >> Changes in v2: None >> >> Documentation/devicetree/bindings/mmc/mmc.txt | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt >> index 467cd7b..215b9a2 100644 >> --- a/Documentation/devicetree/bindings/mmc/mmc.txt >> +++ b/Documentation/devicetree/bindings/mmc/mmc.txt >> @@ -19,6 +19,8 @@ Optional properties: >> - wp-gpios: Specify GPIOs for write protection, see gpio binding >> - cd-inverted: when present, polarity on the CD line is inverted. See the note >> below for the case, when a GPIO is used for the CD line >> +- cd-delay-ms: Set delay time before detecting card after card insert interrupt. >> + It's only valid when cd-gpios is present. >> - wp-inverted: when present, polarity on the WP line is inverted. See the note >> below for the case, when a GPIO is used for the WP line >> - disable-wp: When set no physical WP line is present. This property should >> -- >> 1.9.1 >> >> >> -- >> 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 > > > -- 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 Fri, Apr 13, 2018 at 4:18 AM, Shawn Lin <shawn.lin@rock-chips.com> wrote: > Allow to use tunable delay before detecting card after card is inserted, > which either comes from firmware node, or comes from debounce value > passed on to mmc_gpiod_request_cd(). If the platform doesn't support > debounce, then we fall back to use the debounce period as the delay, > otherwise, it behaves the same as before that a HW debounce(if set) plus > a 200ms hardcode delay before detecting the card. > > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> > > --- > > Changes in v2: > - doesn't introduce new agrument for mmc_gpiod_request_cd and drop > the change for host drivers Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij -- 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.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 467cd7b..215b9a2 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt @@ -19,6 +19,8 @@ Optional properties: - wp-gpios: Specify GPIOs for write protection, see gpio binding - cd-inverted: when present, polarity on the CD line is inverted. See the note below for the case, when a GPIO is used for the CD line +- cd-delay-ms: Set delay time before detecting card after card insert interrupt. + It's only valid when cd-gpios is present. - wp-inverted: when present, polarity on the WP line is inverted. See the note below for the case, when a GPIO is used for the WP line - disable-wp: When set no physical WP line is present. This property should
slot-gpio uses a fixed delay, 200ms, before detecting card after the card is inserted. 200ms doesn't work for some platforms, so some host drivers added their own properties for parsing that from DT, for instance, dw_mmc and pxamci. That being said, it should also be tunable when using slog-gpio. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> --- Changes in v2: None Documentation/devicetree/bindings/mmc/mmc.txt | 2 ++ 1 file changed, 2 insertions(+)