2020-11-17 03:53:45

by Chunyan Zhang

[permalink] [raw]
Subject: [PATCH v2 0/3] Add support for sc2730 and sc2721

This patchset add new compatible strings and match data to support sc2730 and sc2721,
also convert the bindings to yaml schema.

Changes since v1:
* fixed the error when running dt_binding_check;

Chunyan Zhang (2):
dt-bindings: input: Convert sc27xx-vibra.txt to json-schema
dt-bindings: input: Add compatible string for SC2721 and SC2730

Nemo Han (1):
input: sc27xx: Add support for sc2730 and sc2721

.../bindings/input/sprd,sc27xx-vibra.txt | 23 -------
.../bindings/input/sprd,sc27xx-vibrator.yaml | 48 ++++++++++++++
drivers/input/misc/sc27xx-vibra.c | 64 ++++++++++++++++---
3 files changed, 102 insertions(+), 33 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/input/sprd,sc27xx-vibra.txt
create mode 100644 Documentation/devicetree/bindings/input/sprd,sc27xx-vibrator.yaml

--
2.25.1


2020-11-17 03:54:25

by Chunyan Zhang

[permalink] [raw]
Subject: [PATCH v2 2/3] dt-bindings: input: Convert sc27xx-vibra.txt to json-schema

From: Chunyan Zhang <[email protected]>

Convert the sprd sc27xx vibrator binding to DT schema using json-schema.

Signed-off-by: Chunyan Zhang <[email protected]>
---
.../bindings/input/sprd,sc27xx-vibra.txt | 23 ----------
.../bindings/input/sprd,sc27xx-vibrator.yaml | 46 +++++++++++++++++++
2 files changed, 46 insertions(+), 23 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/input/sprd,sc27xx-vibra.txt
create mode 100644 Documentation/devicetree/bindings/input/sprd,sc27xx-vibrator.yaml

diff --git a/Documentation/devicetree/bindings/input/sprd,sc27xx-vibra.txt b/Documentation/devicetree/bindings/input/sprd,sc27xx-vibra.txt
deleted file mode 100644
index f2ec0d4f2dff..000000000000
--- a/Documentation/devicetree/bindings/input/sprd,sc27xx-vibra.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Spreadtrum SC27xx PMIC Vibrator
-
-Required properties:
-- compatible: should be "sprd,sc2731-vibrator".
-- reg: address of vibrator control register.
-
-Example :
-
- sc2731_pmic: pmic@0 {
- compatible = "sprd,sc2731";
- reg = <0>;
- spi-max-frequency = <26000000>;
- interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- vibrator@eb4 {
- compatible = "sprd,sc2731-vibrator";
- reg = <0xeb4>;
- };
- };
diff --git a/Documentation/devicetree/bindings/input/sprd,sc27xx-vibrator.yaml b/Documentation/devicetree/bindings/input/sprd,sc27xx-vibrator.yaml
new file mode 100644
index 000000000000..b8a3f23ee3dd
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/sprd,sc27xx-vibrator.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2020 Unisoc Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/sprd,sc27xx-vibrator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Spreadtrum SC27xx PMIC Vibrator Device Tree Bindings
+
+maintainers:
+ - Orson Zhai <[email protected]>
+ - Baolin Wang <[email protected]>
+ - Chunyan Zhang <[email protected]>
+
+properties:
+ compatible:
+ enum:
+ - sprd,sc2731-vibrator
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ sc2731_pmic: pmic@0 {
+ compatible = "sprd,sc2731";
+ reg = <0 0>;
+ spi-max-frequency = <26000000>;
+ interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ vibrator@eb4 {
+ compatible = "sprd,sc2731-vibrator";
+ reg = <0xeb4>;
+ };
+ };
--
2.25.1

2020-11-17 03:54:33

by Chunyan Zhang

[permalink] [raw]
Subject: [PATCH v2 3/3] dt-bindings: input: Add compatible string for SC2721 and SC2730

From: Chunyan Zhang <[email protected]>

Add new compatible strings to support sc2730 and sc2721 which are
two varieties of SC27XX family.

Signed-off-by: Chunyan Zhang <[email protected]>
---
.../devicetree/bindings/input/sprd,sc27xx-vibrator.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/sprd,sc27xx-vibrator.yaml b/Documentation/devicetree/bindings/input/sprd,sc27xx-vibrator.yaml
index b8a3f23ee3dd..5d67fc8ebc18 100644
--- a/Documentation/devicetree/bindings/input/sprd,sc27xx-vibrator.yaml
+++ b/Documentation/devicetree/bindings/input/sprd,sc27xx-vibrator.yaml
@@ -15,6 +15,8 @@ maintainers:
properties:
compatible:
enum:
+ - sprd,sc2721-vibrator
+ - sprd,sc2730-vibrator
- sprd,sc2731-vibrator

reg:
--
2.25.1

2020-12-07 19:37:48

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] dt-bindings: input: Convert sc27xx-vibra.txt to json-schema

On Tue, 17 Nov 2020 11:49:48 +0800, Chunyan Zhang wrote:
> From: Chunyan Zhang <[email protected]>
>
> Convert the sprd sc27xx vibrator binding to DT schema using json-schema.
>
> Signed-off-by: Chunyan Zhang <[email protected]>
> ---
> .../bindings/input/sprd,sc27xx-vibra.txt | 23 ----------
> .../bindings/input/sprd,sc27xx-vibrator.yaml | 46 +++++++++++++++++++
> 2 files changed, 46 insertions(+), 23 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/input/sprd,sc27xx-vibra.txt
> create mode 100644 Documentation/devicetree/bindings/input/sprd,sc27xx-vibrator.yaml
>

Reviewed-by: Rob Herring <[email protected]>

2020-12-07 19:39:23

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] dt-bindings: input: Add compatible string for SC2721 and SC2730

On Tue, 17 Nov 2020 11:49:49 +0800, Chunyan Zhang wrote:
> From: Chunyan Zhang <[email protected]>
>
> Add new compatible strings to support sc2730 and sc2721 which are
> two varieties of SC27XX family.
>
> Signed-off-by: Chunyan Zhang <[email protected]>
> ---
> .../devicetree/bindings/input/sprd,sc27xx-vibrator.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>

Reviewed-by: Rob Herring <[email protected]>

2020-12-13 23:08:15

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] dt-bindings: input: Convert sc27xx-vibra.txt to json-schema

On Tue, Nov 17, 2020 at 11:49:48AM +0800, Chunyan Zhang wrote:
> From: Chunyan Zhang <[email protected]>
>
> Convert the sprd sc27xx vibrator binding to DT schema using json-schema.
>
> Signed-off-by: Chunyan Zhang <[email protected]>

Applied, thank you.

--
Dmitry

2020-12-13 23:09:19

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] dt-bindings: input: Add compatible string for SC2721 and SC2730

On Tue, Nov 17, 2020 at 11:49:49AM +0800, Chunyan Zhang wrote:
> From: Chunyan Zhang <[email protected]>
>
> Add new compatible strings to support sc2730 and sc2721 which are
> two varieties of SC27XX family.
>
> Signed-off-by: Chunyan Zhang <[email protected]>

Applied, thank you.

--
Dmitry