Skip to contentSkip to conversation

Add support for ocp8110 flash

PATCH Superseded André Apitzsch 3 participants 18 messages Nov 17, 2021 – Mar 21, 2022

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

cover Add support for ocp8110 flash

The led is used as front flash of BQ Aquaris M5.

https://github.com/bq/aquaris-M5/blob/901d0b2ca05c0b0af49786fb548eb0fc289867ff/arch/arm/boot/dts/qcom/piccolo-msm8939-camera-sensor-qrd.dtsi#L16

André Apitzsch (3):
leds: sgm3140: Add ocs,ocp8110 compatible
dt-bindings: vendor-prefixes: Add ocs prefix
dt-bindings: leds: sgm3140: Document ocp8110 compatible

 Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 4 +++-
 Documentation/devicetree/bindings/vendor-prefixes.yaml   | 2 ++
 drivers/leds/flash/leds-sgm3140.c                        | 1 +
 3 files changed, 6 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.0
#1 lore raw

PATCH 1/3 leds: sgm3140: Add ocs,ocp8110 compatible

Orient-Chip's ocp8110 has the same pin configuration as the sgm3140. The data sheet can be found at:
https://cdn.datasheetspdf.com/pdf-down/O/C/P/OCP8110-OrientChip.pdf

---
 drivers/leds/flash/leds-sgm3140.c | 1 +
 1 file changed, 1 insertion(+)
drivers/leds/flash/leds-sgm3140.c +1 -0
index f4f831570f11..d3a30ad94ac4 100644
@@ -290,6 +290,7 @@ static int sgm3140_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id sgm3140_dt_match[] = {
+	{ .compatible = "ocs,ocp8110" },
 	{ .compatible = "sgmicro,sgm3140" },
 	{ /* sentinel */ }
 };
Signature · 1 line
2.34.0
#2 lore raw

PATCH 2/3 dt-bindings: vendor-prefixes: Add ocs prefix

In reply to André Apitzsch

Add the prefix for Orient Chip Technology.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 66d6432fd781..b077092905c7 100644
@@ -842,6 +842,8 @@ patternProperties:
     description: NXP Semiconductors
   "^oceanic,.*":
     description: Oceanic Systems (UK) Ltd.
+  "^ocs,.*":
+    description: Orient Chip Technology Co., Ltd.
   "^oct,.*":
     description: Octavo Systems LLC
   "^okaya,.*":
Signature · 1 line
2.34.0
#3 lore raw

PATCH 3/3 dt-bindings: leds: sgm3140: Document ocp8110 compatible

In reply to André Apitzsch
---
 Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/leds/leds-sgm3140.yaml +3 -1
index f68259619488..1c345cf16d08 100644
@@ -18,7 +18,9 @@ description: |
 
 properties:
   compatible:
-    const: sgmicro,sgm3140
+    enum:
+      - ocs,ocp8110
+      - sgmicro,sgm3140
 
   enable-gpios:
     maxItems: 1
Signature · 1 line
2.34.0
#4 lore raw

v2 cover Add support for ocp8110 flash

In reply to André Apitzsch

The led is used as front flash of BQ Aquaris M5.

https://github.com/bq/aquaris-M5/blob/901d0b2ca05c0b0af49786fb548eb0fc289867ff/arch/arm/boot/dts/qcom/piccolo-msm8939-camera-sensor-qrd.dtsi#L16

v2: Reorder patches

André Apitzsch (3):
dt-bindings: vendor-prefixes: Add ocs prefix
dt-bindings: leds: sgm3140: Document ocp8110 compatible
leds: sgm3140: Add ocs,ocp8110 compatible

 Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 4 +++-
 Documentation/devicetree/bindings/vendor-prefixes.yaml   | 2 ++
 drivers/leds/flash/leds-sgm3140.c                        | 1 +
 3 files changed, 6 insertions(+), 1 deletion(-)

base-commit: 2ade8eef993c37a2a43e51a9b1f6c25509a2acce

Signature · 1 line
2.35.1
#5 lore raw

PATCH v2 1/3 dt-bindings: vendor-prefixes: Add ocs prefix

Add the prefix for Orient Chip Technology.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 294093d45a23..9ffffa9773ca 100644
@@ -854,6 +854,8 @@ patternProperties:
     description: NXP Semiconductors
   "^oceanic,.*":
     description: Oceanic Systems (UK) Ltd.
+  "^ocs,.*":
+    description: Orient Chip Technology Co., Ltd.
   "^oct,.*":
     description: Octavo Systems LLC
   "^okaya,.*":
Signature · 1 line
2.35.1
#7 lore raw

PATCH v2 2/3 dt-bindings: leds: sgm3140: Document ocp8110 compatible

In reply to André Apitzsch
---
 Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/leds/leds-sgm3140.yaml +3 -1
index f68259619488..1c345cf16d08 100644
@@ -18,7 +18,9 @@ description: |
 
 properties:
   compatible:
-    const: sgmicro,sgm3140
+    enum:
+      - ocs,ocp8110
+      - sgmicro,sgm3140
 
   enable-gpios:
     maxItems: 1
Signature · 1 line
2.35.1
maintainer
#8 lore raw

Re: [PATCH v2 2/3] dt-bindings: leds: sgm3140: Document ocp8110 compatible

Quoted 1 line · André Apitzsch

Commit msg? What's this h/w?

Quoted 23 lines
---
 Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/leds/leds-sgm3140.yaml +3 -1
index f68259619488..1c345cf16d08 100644
@@ -18,7 +18,9 @@ description: |
 
 properties:
   compatible:
-    const: sgmicro,sgm3140
+    enum:
+      - ocs,ocp8110
+      - sgmicro,sgm3140
 
   enable-gpios:
     maxItems: 1
Signature · 1 line
2.35.1
#9 lore raw

Re: [PATCH v2 2/3] dt-bindings: leds: sgm3140: Document ocp8110 compatible

Am Freitag, dem 11.02.2022 um 10:34 -0600 schrieb Rob Herring:

Quoted 5 lines · André Apitzsch
Quoted 1 line

Commit msg? What's this h/w?

Thanks for the feedback.

Would the following message be sufficient?

"""
dt-bindings: leds: sgm3140: Document ocp8110 compatible

Add devicetree binding for Orient Chip OCP8110 charge pump used for camera flash LEDs.
"""

Quoted 23 lines
Quoted 23 lines
---
 Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/leds/leds-sgm3140.yaml +3 -1
index f68259619488..1c345cf16d08 100644
@@ -18,7 +18,9 @@ description: |
 
 properties:
   compatible:
-    const: sgmicro,sgm3140
+    enum:
+      - ocs,ocp8110
+      - sgmicro,sgm3140
 
   enable-gpios:
     maxItems: 1
Signature · 1 line
2.35.1
#10 lore raw

Re: [PATCH v2 2/3] dt-bindings: leds: sgm3140: Document ocp8110 compatible

Quoted 8 lines · André Apitzsch

Am Freitag, dem 11.02.2022 um 10:34 -0600 schrieb Rob Herring:

Quoted 5 lines · André Apitzsch
Quoted 1 line

Commit msg? What's this h/w?

Thanks for the feedback.

Quoted 8 lines

Would the following message be sufficient?

"""
dt-bindings: leds: sgm3140: Document ocp8110 compatible

Add devicetree binding for Orient Chip OCP8110 charge pump used for camera flash LEDs.
"""

Sounds good to me.
Pavel

Signature · 1 line
http://www.livejournal.com/~pavelmachek
#11 lore raw

PATCH v2 3/3 leds: sgm3140: Add ocs,ocp8110 compatible

In reply to André Apitzsch

Orient-Chip's ocp8110 has the same pin configuration as the sgm3140. The data sheet can be found at:
https://cdn.datasheetspdf.com/pdf-down/O/C/P/OCP8110-OrientChip.pdf

---
 drivers/leds/flash/leds-sgm3140.c | 1 +
 1 file changed, 1 insertion(+)
drivers/leds/flash/leds-sgm3140.c +1 -0
index f4f831570f11..d3a30ad94ac4 100644
@@ -290,6 +290,7 @@ static int sgm3140_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id sgm3140_dt_match[] = {
+	{ .compatible = "ocs,ocp8110" },
 	{ .compatible = "sgmicro,sgm3140" },
 	{ /* sentinel */ }
 };
Signature · 1 line
2.35.1
#13 lore raw

PATCH v3 1/3 dt-bindings: vendor-prefixes: Add ocs prefix

In reply to André Apitzsch

Add the prefix for Orient Chip Technology.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 294093d45a23..9ffffa9773ca 100644
@@ -854,6 +854,8 @@ patternProperties:
     description: NXP Semiconductors
   "^oceanic,.*":
     description: Oceanic Systems (UK) Ltd.
+  "^ocs,.*":
+    description: Orient Chip Technology Co., Ltd.
   "^oct,.*":
     description: Octavo Systems LLC
   "^okaya,.*":
Signature · 1 line
2.35.1
#14 lore raw

PATCH v3 2/3 dt-bindings: leds: sgm3140: Document ocp8110 compatible

In reply to André Apitzsch

Add devicetree binding for Orient Chip OCP8110 charge pump used for camera flash LEDs.

---
V2 -> V3: Add commit message, h/w info

 Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/leds/leds-sgm3140.yaml +3 -1
index f68259619488..1c345cf16d08 100644
@@ -18,7 +18,9 @@ description: |
 
 properties:
   compatible:
-    const: sgmicro,sgm3140
+    enum:
+      - ocs,ocp8110
+      - sgmicro,sgm3140
 
   enable-gpios:
     maxItems: 1
Signature · 1 line
2.35.1
maintainer Reviewed-by on v3 2/3
#15 lore raw

Re: [PATCH v3 2/3] dt-bindings: leds: sgm3140: Document ocp8110 compatible

Quoted 10 lines · André Apitzsch

Add devicetree binding for Orient Chip OCP8110 charge pump used for camera flash LEDs.

---
V2 -> V3: Add commit message, h/w info

 Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
#16 lore raw

Re: [PATCH v3 2/3] dt-bindings: leds: sgm3140: Document ocp8110 compatible

Am Dienstag, dem 22.02.2022 um 14:56 -0600 schrieb Rob Herring:

Quoted 8 lines · André Apitzsch
Quoted 7 lines

Add devicetree binding for Orient Chip OCP8110 charge pump used for camera flash LEDs.

---
V2 -> V3: Add commit message, h/w info

Quoted 5 lines
Quoted 3 lines
 Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Hello Pavel,

kind reminder that patch 2/3 hasn't been applied to [1], yet.

Is there anything that needs to be done from my side?

Best regards,
André

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/log/?h=for-next

#17 lore raw

PATCH v3 3/3 leds: sgm3140: Add ocs,ocp8110 compatible

In reply to André Apitzsch

Orient-Chip's ocp8110 has the same pin configuration as the sgm3140. The data sheet can be found at:
https://cdn.datasheetspdf.com/pdf-down/O/C/P/OCP8110-OrientChip.pdf

---
 drivers/leds/flash/leds-sgm3140.c | 1 +
 1 file changed, 1 insertion(+)
drivers/leds/flash/leds-sgm3140.c +1 -0
index f4f831570f11..d3a30ad94ac4 100644
@@ -290,6 +290,7 @@ static int sgm3140_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id sgm3140_dt_match[] = {
+	{ .compatible = "ocs,ocp8110" },
 	{ .compatible = "sgmicro,sgm3140" },
 	{ /* sentinel */ }
 };
Signature · 1 line
2.35.1