Skip to contentSkip to conversation

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.

PATCH In review Richard Tresidder 2 participants 3 messages Jul 25, 2019 – Aug 19, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---

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 [email protected]

 Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt +3 -1
index 4e78e51..187d7bb 100644
@@ -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;
 	}
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 17 lines · Richard Tresidder

---

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 [email protected]

 Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt +0 -0
index 4e78e51..187d7bb 100644

Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt Optional properties : · line 19

Quoted 6 lines
Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt +2 -1
@@ -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

#2 lore raw

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

**

Quoted 32 lines · Rob Herring
Quoted 17 lines · Richard Tresidder

---

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 [email protected]

  Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt +0 -0
index 4e78e51..187d7bb 100644

Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt Optional properties : · line 19

Quoted 6 lines
Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt +2 -1
@@ -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