Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/1] dt-bindings: power/supply/sbs_sbs-battery: Addition of force_load binding Add device tree binding documentation for addition of force_load boolean value to allow loading a battery during boot even if not present at that time.
@ 2019-07-25  6:50 Richard Tresidder
  2019-08-16 21:14 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Tresidder @ 2019-07-25  6:50 UTC (permalink / raw)
  To: sre, robh+dt, mark.rutland, rtresidd, linux-pm, devicetree, linux-kernel

Signed-off-by: Richard Tresidder <rtresidd@electromag.com.au>
---

Notes:
    Add device tree binding documentation for addition of force_load
    boolean value to allow loading a battery during boot even if not
    present at that time.
    Accompanying patch to drivers/power/supply/sbs-battery.c submitted to linux-pm@vger.kernel.org

 Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt b/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt
index 4e78e51..187d7bb 100644
--- a/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt
+++ b/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt
@@ -15,7 +15,8 @@ Optional properties :
    after an external change notification.
  - sbs,battery-detect-gpios : The gpio which signals battery detection and
    a flag specifying its polarity.
-
+ - sbs,force-load : Allow loading of a hot-pluggable battery when there is no
+   GPIO detect available and the module is statically built.
 Example:
 
 	battery@b {
@@ -24,4 +25,5 @@ Example:
 		sbs,i2c-retry-count = <2>;
 		sbs,poll-retry-count = <10>;
 		sbs,battery-detect-gpios = <&gpio-controller 122 1>;
+		sbs,force-load;
 	}
-- 
1.8.3.1


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

* Re: [PATCH 1/1] dt-bindings: power/supply/sbs_sbs-battery: Addition of force_load binding Add device tree binding documentation for addition of force_load boolean value to allow loading a battery during boot even if not present at that time.
  2019-07-25  6:50 [PATCH 1/1] dt-bindings: power/supply/sbs_sbs-battery: Addition of force_load binding Add device tree binding documentation for addition of force_load boolean value to allow loading a battery during boot even if not present at that time Richard Tresidder
@ 2019-08-16 21:14 ` Rob Herring
  2019-08-19  3:33   ` Richard Tresidder
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2019-08-16 21:14 UTC (permalink / raw)
  To: Richard Tresidder; +Cc: sre, mark.rutland, linux-pm, devicetree, linux-kernel

On Thu, Jul 25, 2019 at 02:50:45PM +0800, Richard Tresidder wrote:
> Signed-off-by: Richard Tresidder <rtresidd@electromag.com.au>
> ---
> 
> Notes:
>     Add device tree binding documentation for addition of force_load
>     boolean value to allow loading a battery during boot even if not
>     present at that time.
>     Accompanying patch to drivers/power/supply/sbs-battery.c submitted to linux-pm@vger.kernel.org
> 
>  Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt b/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt
> index 4e78e51..187d7bb 100644
> --- a/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt
> +++ b/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt
> @@ -15,7 +15,8 @@ Optional properties :
>     after an external change notification.
>   - sbs,battery-detect-gpios : The gpio which signals battery detection and
>     a flag specifying its polarity.
> -
> + - sbs,force-load : Allow loading of a hot-pluggable battery when there is no
> +   GPIO detect available and the module is statically built.

What's a module? That's Linux specific and nothing to do with the 
binding. 

Can't you just force load if sbs,battery-detect-gpios is not present?

Rob

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

* Re: [PATCH 1/1] dt-bindings: power/supply/sbs_sbs-battery: Addition of force_load binding Add device tree binding documentation for addition of force_load boolean value to allow loading a battery during boot even if not present at that time.
  2019-08-16 21:14 ` Rob Herring
@ 2019-08-19  3:33   ` Richard Tresidder
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Tresidder @ 2019-08-19  3:33 UTC (permalink / raw)
  To: Rob Herring; +Cc: sre, mark.rutland, linux-pm, devicetree, linux-kernel

There is a force load option when loading the driver as a module.
This adds the equivalent methodology for the binding path.
Though I suppose you could in fact just force load if the gpio detect 
isn't present.
Thats a good idea, just wasn't the existing driver flow. I can't think 
of any reason why we couldn't do that though.

I'll update the patch and resubmit V3
Will add a note about it in the docs

Please note I'd submitted this incorrectly when using our patch script 
last time, it's now correctly part of the combined patch

Regards
   Richard Tresidder
Richard Tresidder


**
On 17/08/2019 5:14 am, Rob Herring wrote:
> On Thu, Jul 25, 2019 at 02:50:45PM +0800, Richard Tresidder wrote:
>> Signed-off-by: Richard Tresidder <rtresidd@electromag.com.au>
>> ---
>>
>> Notes:
>>      Add device tree binding documentation for addition of force_load
>>      boolean value to allow loading a battery during boot even if not
>>      present at that time.
>>      Accompanying patch to drivers/power/supply/sbs-battery.c submitted to linux-pm@vger.kernel.org
>>
>>   Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt b/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt
>> index 4e78e51..187d7bb 100644
>> --- a/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt
>> +++ b/Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt
>> @@ -15,7 +15,8 @@ Optional properties :
>>      after an external change notification.
>>    - sbs,battery-detect-gpios : The gpio which signals battery detection and
>>      a flag specifying its polarity.
>> -
>> + - sbs,force-load : Allow loading of a hot-pluggable battery when there is no
>> +   GPIO detect available and the module is statically built.
> What's a module? That's Linux specific and nothing to do with the
> binding.
>
> Can't you just force load if sbs,battery-detect-gpios is not present?
>
> Rob
>
>


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25  6:50 [PATCH 1/1] dt-bindings: power/supply/sbs_sbs-battery: Addition of force_load binding Add device tree binding documentation for addition of force_load boolean value to allow loading a battery during boot even if not present at that time Richard Tresidder
2019-08-16 21:14 ` Rob Herring
2019-08-19  3:33   ` Richard Tresidder

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org linux-pm@archiver.kernel.org
	public-inbox-index linux-pm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox