Re: [PATCH v13 2/4] dt-bindings: power: Convert battery.txt to battery.yaml

From: Dan Murphy
Date: Tue Jun 30 2020 - 08:12:26 EST


Rob

On 6/29/20 5:56 PM, Rob Herring wrote:
On Mon, Jun 22, 2020 at 02:18:35PM -0500, Ricardo Rivera-Matos wrote:
From: Dan Murphy<dmurphy@xxxxxx>

Convert the battery.txt file to yaml and fix up the examples.

Signed-off-by: Dan Murphy<dmurphy@xxxxxx>
---
.../bindings/power/supply/battery.txt | 83 +----------
.../bindings/power/supply/battery.yaml | 139 ++++++++++++++++++
2 files changed, 141 insertions(+), 81 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/supply/battery.yaml

diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt
index 5e29595edd74..4c5216fcb760 100644
--- a/Documentation/devicetree/bindings/power/supply/battery.txt
+++ b/Documentation/devicetree/bindings/power/supply/battery.txt
@@ -1,87 +1,8 @@
-Battery Characteristics
-
-The devicetree battery node provides static battery characteristics.
-In smart batteries, these are typically stored in non-volatile memory
-on a fuel gauge chip. The battery node should be used where there is
-no appropriate non-volatile memory, or it is unprogrammed/incorrect.
-
-Upstream dts files should not include battery nodes, unless the battery
-represented cannot easily be replaced in the system by one of a
-different type. This prevents unpredictable, potentially harmful,
-behavior should a replacement that changes the battery type occur
-without a corresponding update to the dtb.
+The contents of this file has been moved to battery.yaml
Please note that not all charger drivers respect all of the properties.
-Required Properties:
- - compatible: Must be "simple-battery"
-
-Optional Properties:
- over-voltage-threshold-microvolt: battery over-voltage limit
- re-charge-voltage-microvolt: limit to automatically start charging again
Why are some things not moved?

These were applied recently to the text file on May 8th. They just showed up in the 5.8 kernel.

Not sure if there are any more pending changes for the battery.txt but they should be on hold until the yaml is applied.

We will update the yaml

Dan