drivers: regulator: fixed: add u-boot, off-on-delay-us
PATCH v2 1/1 drivers: regulator: fixed: add u-boot, off-on-delay-us
Add u-boot,off-on-delay-us for fixed regulator.
Depends on board design, the gpio regulator sometimes connects with a big capacitance. When need to off, then on the regulator, if there is no enough delay, the voltage does not drop to 0, so introduce this property to handle such case.
---
V2:
Moved device tree bindings to new directory. Simon, I keep you reviewed by tag. Thanks.
doc/device-tree-bindings/regulator/fixed.txt | 1 + drivers/power/regulator/fixed.c | 6 ++++++ 2 files changed, 7 insertions(+)
doc/device-tree-bindings/regulator/fixed.txt +1 -0
@@ -11,6 +11,7 @@ Required properties: Optional properties: - gpio: GPIO to use for enable control - startup-delay-us: startup time in microseconds +- u-boot,off-on-delay-us: off delay time in microseconds - regulator constraints (binding info: regulator.txt) - enable-active-high: Polarity of GPIO is Active high. If this property is missing, the default assumed is Active low.
drivers/power/regulator/fixed.c +6 -0
@@ -16,6 +16,7 @@struct fixed_regulator_platdata {struct gpio_desc gpio;/* GPIO for regulator enable control */ unsigned int startup_delay_us; +unsigned int off_on_delay_us; };static int fixed_regulator_ofdata_to_platdata (struct udevice *dev)
@@ -50,6 +51,8 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)/* Get optional ramp up delay */ dev_pdata->startup_delay_us =dev_read_u32_default (dev,"startup-delay-us" ,0 ); + dev_pdata->off_on_delay_us = +dev_read_u32_default (dev,"u-boot,off-on-delay-us" ,0 );return 0 ; }
@@ -123,6 +126,9 @@ static int fixed_regulator_set_enable(struct udevice *dev, bool enable)udelay (dev_pdata->startup_delay_us);debug ("%s: done\n" , __func__); +if (!enable && dev_pdata->off_on_delay_us) +udelay (dev_pdata->off_on_delay_us); +return 0 ; }
Signature · 1 line
2.14.1
PATCH v2 1/1 drivers: regulator: fixed: add u-boot, off-on-delay-us
Quoted 16 lines
-----Original Message-----
From: Peng Fan
Sent: 2018年7月26日 19:47
To: sjg at chromium.org; trini at konsulko.com
Cc: yamada.masahiro at socionext.com; u-boot at lists.denx.de; Peng Fan <[email protected]>
Subject: [PATCH V2] drivers: regulator: fixed: add u-boot,off-on-delay-usAdd u-boot,off-on-delay-us for fixed regulator.
Depends on board design, the gpio regulator sometimes connects with a big capacitance. When need to off, then on the regulator, if there is no enough delay, the voltage does not drop to 0, so introduce this property to handle such case.
Quoted 8 lines
Signed-off-by Peng Fan <[email protected]>Reviewed-by Simon Glass <[email protected]>Cc Masahiro Yamada <[email protected]>---
V2:
Moved device tree bindings to new directory.
Simon, I keep you reviewed by tag. Thanks.
Sorry, this patchset should be V3 version.
Tom, should I resend a v3 out? Or you could apply this one?
Thanks,
Peng.
Quoted 52 lines
doc/device-tree-bindings/regulator/fixed.txt | 1 + drivers/power/regulator/fixed.c | 6 ++++++ 2 files changed, 7 insertions(+)doc/device-tree-bindings/regulator/fixed.txt +1
-0@@ -11,6 +11,7 @@ Required properties: Optional properties: - gpio: GPIO to use for enable control - startup-delay-us: startup time in microseconds +- u-boot,off-on-delay-us: off delay time in microseconds - regulator constraints (binding info: regulator.txt) - enable-active-high: Polarity of GPIO is Active high. If this property is missing, the default assumed is Active low.drivers/power/regulator/fixed.c +7
-1@@ -16,6 +16,7 @@struct fixed_regulator_platdata {struct gpio_desc gpio;/* GPIO for regulator enable control */ unsigned int startup_delay_us; +unsigned int off_on_delay_us; }; static int fixed_regulator_ofdata_to_platdata(struct udevice *dev) @@ -50,6 +51,8 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)/* Get optional ramp up delay */ dev_pdata->startup_delay_us = dev_read_u32_default(dev,"startup-delay-us" ,0 ); + dev_pdata->off_on_delay_us = +dev_read_u32_default (dev,"u-boot,off-on-delay-us" ,0 );return 0 ; }@@ -123,6 +126,9 @@ static int fixed_regulator_set_enable(struct udevice *dev, bool enable)udelay (dev_pdata->startup_delay_us);debug ("%s: done\n" , __func__); +if (!enable && dev_pdata->off_on_delay_us) +udelay (dev_pdata->off_on_delay_us); +return 0 ; } --2.14.1
PATCH v2 1/1 drivers: regulator: fixed: add u-boot, off-on-delay-us
Quoted 19 lines · Peng Fan
Quoted 19 lines
-----Original Message-----
From: Peng Fan
Sent: 2018年7月26日 19:47
To: sjg at chromium.org; trini at konsulko.com
Cc: yamada.masahiro at socionext.com; u-boot at lists.denx.de; Peng Fan <[email protected]>
Subject: [PATCH V2] drivers: regulator: fixed: add u-boot,off-on-delay-usAdd u-boot,off-on-delay-us for fixed regulator.
Depends on board design, the gpio regulator sometimes connects with a big capacitance. When need to off, then on the regulator, if there is no enough delay, the voltage does not drop to 0, so introduce this property to handle such case.
Signed-off-by Peng Fan <[email protected]>Reviewed-by Simon Glass <[email protected]>Cc Masahiro Yamada <[email protected]>---
Quoted 7 lines
Quoted 3 lines
V2:
Moved device tree bindings to new directory.
Simon, I keep you reviewed by tag. Thanks.Sorry, this patchset should be V3 version.
Tom, should I resend a v3 out? Or you could apply this one?
Barring further comments from people, you can just keep this version. FWIW, I think that if people register with patchwork they can manage the state of their own patches and that always helps keep me from failing to notice something / grab the wrong version :) Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180726/7d0b7e6e/attachment.sig>
PATCH v2 1/1 drivers: regulator: fixed: add u-boot, off-on-delay-us
Quoted 37 lines
-----Original Message-----
From: Tom Rini [mailto:trini at konsulko.com]
Sent: 2018年7月27日 1:06
To: Peng Fan <[email protected]>
Cc: sjg at chromium.org; yamada.masahiro at socionext.com;
u-boot at lists.denx.de
Subject: Re: [PATCH V2] drivers: regulator: fixed: add u-boot,off-on-delay-usQuoted 9 lines · Peng Fan
Quoted 9 lines
-----Original Message-----
From: Peng Fan
Sent: 2018年7月26日 19:47
To: sjg at chromium.org; trini at konsulko.com
Cc: yamada.masahiro at socionext.com; u-boot at lists.denx.de; Peng Fan <[email protected]>
Subject: [PATCH V2] drivers: regulator: fixed: add u-boot,off-on-delay-usQuoted 5 lines
Quoted 5 lines
Add u-boot,off-on-delay-us for fixed regulator.
Depends on board design, the gpio regulator sometimes connects with a big capacitance. When need to off, then on the regulator, if there is no enough delay, the voltage does not drop to 0, so introduce this property
to handle such case.
Quoted 10 lines
Quoted 9 lines
Signed-off-by Peng Fan <[email protected]>Reviewed-by Simon Glass <[email protected]>Cc Masahiro Yamada <[email protected]>---
V2:
Moved device tree bindings to new directory.
Simon, I keep you reviewed by tag. Thanks.
Quoted 8 lines
Quoted 3 lines
Sorry, this patchset should be V3 version.
Tom, should I resend a v3 out? Or you could apply this one?
Barring further comments from people, you can just keep this version. FWIW, I think that if people register with patchwork they can manage the state of their own patches and that always helps keep me from failing to notice something / grab the wrong version :) Thanks!
Thanks. I set the previous one to rejected.
Thanks,
Peng.
Quoted 3 lines
--
Tom
PATCH v2 1/1 drivers: regulator: fixed: add u-boot, off-on-delay-us
In reply to Tom RiniHi,
Would anyone pick up this patch?
Thanks,
Peng.
Quoted 46 lines
-----Original Message-----
From: Tom Rini [mailto:trini at konsulko.com]
Sent: 2018年7月27日 1:06
To: Peng Fan <[email protected]>
Cc: sjg at chromium.org; yamada.masahiro at socionext.com;
u-boot at lists.denx.de
Subject: Re: [PATCH V2] drivers: regulator: fixed: add u-boot,off-on-delay-usQuoted 9 lines · Peng Fan
Quoted 9 lines
-----Original Message-----
From: Peng Fan
Sent: 2018年7月26日 19:47
To: sjg at chromium.org; trini at konsulko.com
Cc: yamada.masahiro at socionext.com; u-boot at lists.denx.de; Peng Fan <[email protected]>
Subject: [PATCH V2] drivers: regulator: fixed: add u-boot,off-on-delay-usQuoted 5 lines
Quoted 5 lines
Add u-boot,off-on-delay-us for fixed regulator.
Depends on board design, the gpio regulator sometimes connects with a big capacitance. When need to off, then on the regulator, if there is no enough delay, the voltage does not drop to 0, so introduce this property
to handle such case.
Quoted 6 lines
Quoted 6 lines
Signed-off-by Peng Fan <[email protected]>Reviewed-by Simon Glass <[email protected]>Cc Masahiro Yamada <[email protected]>---
Quoted 7 lines
Quoted 3 lines
V2:
Moved device tree bindings to new directory.
Simon, I keep you reviewed by tag. Thanks.Sorry, this patchset should be V3 version.
Tom, should I resend a v3 out? Or you could apply this one?
Barring further comments from people, you can just keep this version. FWIW, I think that if people register with patchwork they can manage the state of their own patches and that always helps keep me from failing to notice something / grab the wrong version :) Thanks!
--
Tom
PATCH v2 1/1 drivers: regulator: fixed: add u-boot, off-on-delay-us
In reply to Peng FanQuoted 11 lines · Peng Fan
Add u-boot,off-on-delay-us for fixed regulator.
Depends on board design, the gpio regulator sometimes connects with a big capacitance. When need to off, then on the regulator, if there is no enough delay, the voltage does not drop to 0, so introduce this property to handle such case.
Signed-off-by Peng Fan <[email protected]>Reviewed-by Simon Glass <[email protected]>Cc Masahiro Yamada <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180820/3c867d23/attachment.sig>