Re: [PATCHv2 18/38] dt-bindings: power: supply: n900-battery: Convert to DT schema format

2021-03-17 Thread Pali Rohár
On Wednesday 17 March 2021 14:48:44 Sebastian Reichel wrote:
> Convert the binding to DT schema format.
> 
> Cc: Pali Rohár 

Rejected-by: Pali Rohár 

> Signed-off-by: Sebastian Reichel 

Hello Sebastian! I'm really really sorry, I have nothing against you,
but personally I cannot ack change signed by company where some people
are supporting censorship, GPL violations and other similar immoral
activities against other individual developers.

> ---
>  .../power/supply/nokia,n900-battery.yaml  | 49 +++
>  .../bindings/power/supply/rx51-battery.txt| 25 --
>  2 files changed, 49 insertions(+), 25 deletions(-)
>  create mode 100644 
> Documentation/devicetree/bindings/power/supply/nokia,n900-battery.yaml
>  delete mode 100644 
> Documentation/devicetree/bindings/power/supply/rx51-battery.txt


[PATCHv2 18/38] dt-bindings: power: supply: n900-battery: Convert to DT schema format

2021-03-17 Thread Sebastian Reichel
Convert the binding to DT schema format.

Cc: Pali Rohár 
Signed-off-by: Sebastian Reichel 
---
 .../power/supply/nokia,n900-battery.yaml  | 49 +++
 .../bindings/power/supply/rx51-battery.txt| 25 --
 2 files changed, 49 insertions(+), 25 deletions(-)
 create mode 100644 
Documentation/devicetree/bindings/power/supply/nokia,n900-battery.yaml
 delete mode 100644 
Documentation/devicetree/bindings/power/supply/rx51-battery.txt

diff --git 
a/Documentation/devicetree/bindings/power/supply/nokia,n900-battery.yaml 
b/Documentation/devicetree/bindings/power/supply/nokia,n900-battery.yaml
new file mode 100644
index ..4a1489f2b28d
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/nokia,n900-battery.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/nokia,n900-battery.yaml#;
+$schema: "http://devicetree.org/meta-schemas/core.yaml#;
+
+title: Nokia N900 battery
+
+maintainers:
+  - Pali Rohár 
+  - Sebastian Reichel 
+
+allOf:
+  - $ref: power-supply.yaml#
+
+properties:
+  compatible:
+const: nokia,n900-battery
+
+  io-channels:
+items:
+  - description: ADC channel for temperature reading
+  - description: ADC channel for battery size identification
+  - description: ADC channel to measure the battery voltage
+
+  io-channel-names:
+items:
+  - const: temp
+  - const: bsi
+  - const: vbat
+
+required:
+  - compatible
+  - io-channels
+  - io-channel-names
+
+additionalProperties: false
+
+examples:
+  - |
+battery {
+  compatible = "nokia,n900-battery";
+  io-channels = <_madc 0>,
+<_madc 4>,
+<_madc 12>;
+  io-channel-names = "temp",
+ "bsi",
+ "vbat";
+};
diff --git a/Documentation/devicetree/bindings/power/supply/rx51-battery.txt 
b/Documentation/devicetree/bindings/power/supply/rx51-battery.txt
deleted file mode 100644
index 90438453db58..
--- a/Documentation/devicetree/bindings/power/supply/rx51-battery.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Binding for Nokia N900 battery
-
-The Nokia N900 battery status can be read via the TWL4030's A/D converter.
-
-Required properties:
-- compatible: Should contain one of the following:
- * "nokia,n900-battery"
-- io-channels: Should contain IIO channel specifiers
-   for each element in io-channel-names.
-- io-channel-names: Should contain the following values:
- * "temp" - The ADC channel for temperature reading
- * "bsi"  - The ADC channel for battery size identification
- * "vbat" - The ADC channel to measure the battery voltage
-
-Example from Nokia N900:
-
-battery: n900-battery {
-   compatible = "nokia,n900-battery";
-   io-channels = <_madc 0>,
- <_madc 4>,
- <_madc 12>;
-   io-channel-names = "temp",
-  "bsi",
-  "vbat";
-};
-- 
2.30.2