* [PATCH 1/2] iio: si7005: Add device tree support
2023-10-12 20:07 [PATCH 0/2] iio: Add device tree support for silabs,si7005 Javier Carrasco
@ 2023-10-12 20:07 ` Javier Carrasco
2023-10-12 20:07 ` [PATCH 2/2] dt-bindings: trivial-devices: add silabs,si7005 Javier Carrasco
2023-10-14 16:14 ` [PATCH 0/2] iio: Add device tree support for silabs,si7005 Jonathan Cameron
2 siblings, 0 replies; 5+ messages in thread
From: Javier Carrasco @ 2023-10-12 20:07 UTC (permalink / raw)
To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-iio, linux-kernel, Rob Herring, devicetree, Javier Carrasco
This device supports ACPI detection but lacks of the device tree
counterpart. Add device tree support.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
drivers/iio/humidity/si7005.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/iio/humidity/si7005.c b/drivers/iio/humidity/si7005.c
index ebfb79bc9edc..9465908cc65e 100644
--- a/drivers/iio/humidity/si7005.c
+++ b/drivers/iio/humidity/si7005.c
@@ -169,9 +169,16 @@ static const struct i2c_device_id si7005_id[] = {
};
MODULE_DEVICE_TABLE(i2c, si7005_id);
+static const struct of_device_id si7005_dt_ids[] = {
+ { .compatible = "silabs,si7005" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, si7005_dt_ids);
+
static struct i2c_driver si7005_driver = {
.driver = {
.name = "si7005",
+ .of_match_table = si7005_dt_ids,
},
.probe = si7005_probe,
.id_table = si7005_id,
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] dt-bindings: trivial-devices: add silabs,si7005
2023-10-12 20:07 [PATCH 0/2] iio: Add device tree support for silabs,si7005 Javier Carrasco
2023-10-12 20:07 ` [PATCH 1/2] iio: si7005: Add device tree support Javier Carrasco
@ 2023-10-12 20:07 ` Javier Carrasco
2023-10-13 7:07 ` Krzysztof Kozlowski
2023-10-14 16:14 ` [PATCH 0/2] iio: Add device tree support for silabs,si7005 Jonathan Cameron
2 siblings, 1 reply; 5+ messages in thread
From: Javier Carrasco @ 2023-10-12 20:07 UTC (permalink / raw)
To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-iio, linux-kernel, Rob Herring, devicetree, Javier Carrasco
This simple I2C humidity sensor does not have any additional properties
and can be added to the trivial-devices binding.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index 430a814f64a5..05bf410ca9dd 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -348,6 +348,8 @@ properties:
# Silicon Labs SI3210 Programmable CMOS SLIC/CODEC with SPI interface
- silabs,si3210
# Relative Humidity and Temperature Sensors
+ - silabs,si7005
+ # Relative Humidity and Temperature Sensors
- silabs,si7020
# Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply
- skyworks,sky81452
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] dt-bindings: trivial-devices: add silabs,si7005
2023-10-12 20:07 ` [PATCH 2/2] dt-bindings: trivial-devices: add silabs,si7005 Javier Carrasco
@ 2023-10-13 7:07 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-10-13 7:07 UTC (permalink / raw)
To: Javier Carrasco, Jonathan Cameron, Lars-Peter Clausen,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-iio, linux-kernel, Rob Herring, devicetree
On 12/10/2023 22:07, Javier Carrasco wrote:
> This simple I2C humidity sensor does not have any additional properties
> and can be added to the trivial-devices binding.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] iio: Add device tree support for silabs,si7005
2023-10-12 20:07 [PATCH 0/2] iio: Add device tree support for silabs,si7005 Javier Carrasco
2023-10-12 20:07 ` [PATCH 1/2] iio: si7005: Add device tree support Javier Carrasco
2023-10-12 20:07 ` [PATCH 2/2] dt-bindings: trivial-devices: add silabs,si7005 Javier Carrasco
@ 2023-10-14 16:14 ` Jonathan Cameron
2 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2023-10-14 16:14 UTC (permalink / raw)
To: Javier Carrasco
Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-iio, linux-kernel, Rob Herring, devicetree
On Thu, 12 Oct 2023 22:07:06 +0200
Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:
> This series adds device tree support for the IIO humidity sensor si7005
> and extends the trivial-devices binding to document the addition.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
> Javier Carrasco (2):
> iio: si7005: Add device tree support
> dt-bindings: trivial-devices: add silabs,si7005
>
> Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
> drivers/iio/humidity/si7005.c | 7 +++++++
> 2 files changed, 9 insertions(+)
> ---
> base-commit: 401644852d0b2a278811de38081be23f74b5bb04
> change-id: 20231012-topic-si7005_devicetree-644b61b62178
>
> Best regards,
Applied to the togreg branch of iiog.it and pushed out as testing for
0-day to take a look at it.
I'll note though that I would expect the fallback path for i2c bindings
to have worked here in which it matches the 'device' bit of the compatible
(ignoring the vendor) with entries in the i2c_device_id table.
I prefer explicit support like you have added here though as that
avoids clashes when different manufacturers use the same part number etc.
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread