Skip to contentSkip to conversation

dt-bindings: Add bindings for Capella cm3323 Ambient Light Sensor

PATCH In review Siddharth Manthan 3 participants 4 messages Jul 28, 2021 – Aug 8, 2021

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

PATCH 1/2 dt-bindings: Add bindings for Capella cm3323 Ambient Light Sensor

Update trivial-devices.yaml with Capella cm3323 Ambient Light Sensor description.

---
This patch was previously sent using outlook email provider. Unfortunately I had no knowledge of outlook being banned from mailing lists. I am resending these patches using gmail. Please ignore the previous patches.

 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +2 -0
index 919a4bf03a5a..39fb27561a7b 100644
@@ -61,6 +61,8 @@ properties:
           - capella,cm32181
             # CM3232: Ambient Light Sensor
           - capella,cm3232
+            # CM3323: Ambient Light Sensor
+          - capella,cm3323
             # High-Precision Digital Thermometer
           - dallas,ds1631
             # Total-Elapsed-Time Recorder with Alarm
Signature · 1 line
2.31.1
#1 lore raw

PATCH 2/2 drivers: iio: light: cm3323: Add device tree support

Add Device Tree support for Capella cm3323 Ambient Light Sensor

---
 drivers/iio/light/cm3323.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/iio/light/cm3323.c +7 -0
index 6d1b0ffd144b..fd9a8c27de2e 100644
@@ -256,9 +256,16 @@ static const struct i2c_device_id cm3323_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, cm3323_id);
 
+static const struct of_device_id cm3323_of_match[] = {
+	{ .compatible = "capella,cm3323", },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, cm3323_of_match);
+
 static struct i2c_driver cm3323_driver = {
 	.driver = {
 		.name = CM3323_DRV_NAME,
+		.of_match_table = cm3323_of_match,
 	},
 	.probe		= cm3323_probe,
 	.id_table	= cm3323_id,
Signature · 1 line
2.31.1
maintainer Acked-by on v1 1/2
#2 lore raw
In reply to Siddharth Manthan
Quoted 12 lines · Siddharth Manthan

Update trivial-devices.yaml with Capella cm3323 Ambient Light Sensor description.

---
This patch was previously sent using outlook email provider. Unfortunately I had no knowledge of outlook being banned from mailing lists. I am resending these patches using gmail. Please ignore the previous patches.

 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)
maintainer
#3 lore raw
Quoted 10 lines · On Mon, 2 Aug 2021 15:34:16 -0600 Rob Herring <[email protected]> wrote:
Quoted 9 lines · Siddharth Manthan

Update trivial-devices.yaml with Capella cm3323 Ambient Light Sensor description.

---
This patch was previously sent using outlook email provider. Unfortunately I had no knowledge of outlook being banned from mailing lists. I am resending these patches using gmail. Please ignore the previous patches.

Quoted 5 lines
Quoted 3 lines
 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)

Seems we have two versions of this series, only one of which made it to the archive.

Anyhow, I've tweaked the message for patch 2 to remove implication that the of_device_id table is 'necessary' for dt based probing rather than nice to have.

Applied to the togreg branch of iio.git and pushed out as testing for 0-day to see if it can find anything we missed before I make a mess of linux-next.

Thanks,

Jonathan