This patch set adds devicetree support for hih6130, so it can
be properly auto-probed using devicetree files
Andreas Kemnade (2):
hwmon: (hih6130) add dtb compatibility tables
devicetree: hwmon: Add bindings documentation for HIH6130
Documentation/devicetree/bindings/hwmon/hih6130.txt | 12 ++++++++++++
drivers/hwmon/hih6130.c | 11 ++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/hwmon/hih6130.txt
--
2.11.0
This allows the hih6130 to be used in devicetree files and auto-probed
that way.
Signed-off-by: Andreas Kemnade <[email protected]>
---
drivers/hwmon/hih6130.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/hih6130.c b/drivers/hwmon/hih6130.c
index 0ae1ee1dbf76..de1b50ddc740 100644
--- a/drivers/hwmon/hih6130.c
+++ b/drivers/hwmon/hih6130.c
@@ -254,8 +254,17 @@ static const struct i2c_device_id hih6130_id[] = {
};
MODULE_DEVICE_TABLE(i2c, hih6130_id);
+static const struct of_device_id hih6130_of_match[] = {
+ { .compatible = "honeywell,hih6130", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, hih6130_of_match);
+
static struct i2c_driver hih6130_driver = {
- .driver.name = "hih6130",
+ .driver = {
+ .name = "hih6130",
+ .of_match_table = of_match_ptr(hih6130_of_match),
+ },
.probe = hih6130_probe,
.id_table = hih6130_id,
};
--
2.11.0
Add bindings documentation for HIH6130 driver.
Signed-off-by: Andreas Kemnade <[email protected]>
---
Documentation/devicetree/bindings/hwmon/hih6130.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwmon/hih6130.txt
diff --git a/Documentation/devicetree/bindings/hwmon/hih6130.txt b/Documentation/devicetree/bindings/hwmon/hih6130.txt
new file mode 100644
index 000000000000..2c43837af4c2
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/hih6130.txt
@@ -0,0 +1,12 @@
+Honeywell Humidicon HIH-6130 humidity/temperature sensor
+--------------------------------------------------------
+
+Requires node properties:
+- compatible : "honeywell,hi6130"
+- reg : the I2C address of the device. This is 0x27.
+
+Example:
+ hih6130@27 {
+ compatible = "honeywell,hih6130";
+ reg = <0x27>;
+ };
--
2.11.0
On Thu, 27 Dec 2018 16:13:49 +0100, Andreas Kemnade wrote:
> Add bindings documentation for HIH6130 driver.
>
> Signed-off-by: Andreas Kemnade <[email protected]>
> ---
> Documentation/devicetree/bindings/hwmon/hih6130.txt | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/hwmon/hih6130.txt
>
Reviewed-by: Rob Herring <[email protected]>
On Thu, Dec 27, 2018 at 04:13:48PM +0100, Andreas Kemnade wrote:
> This allows the hih6130 to be used in devicetree files and auto-probed
> that way.
>
> Signed-off-by: Andreas Kemnade <[email protected]>
Applie to hwmon-next.
Thanks,
Guenter
> ---
> drivers/hwmon/hih6130.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/hih6130.c b/drivers/hwmon/hih6130.c
> index 0ae1ee1dbf76..de1b50ddc740 100644
> --- a/drivers/hwmon/hih6130.c
> +++ b/drivers/hwmon/hih6130.c
> @@ -254,8 +254,17 @@ static const struct i2c_device_id hih6130_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, hih6130_id);
>
> +static const struct of_device_id hih6130_of_match[] = {
> + { .compatible = "honeywell,hih6130", },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, hih6130_of_match);
> +
> static struct i2c_driver hih6130_driver = {
> - .driver.name = "hih6130",
> + .driver = {
> + .name = "hih6130",
> + .of_match_table = of_match_ptr(hih6130_of_match),
> + },
> .probe = hih6130_probe,
> .id_table = hih6130_id,
> };
On Thu, Dec 27, 2018 at 04:13:49PM +0100, Andreas Kemnade wrote:
> Add bindings documentation for HIH6130 driver.
>
> Signed-off-by: Andreas Kemnade <[email protected]>
> Reviewed-by: Rob Herring <[email protected]>
Applied to hwmon-next.
Thanks,
Guenter
> ---
> Documentation/devicetree/bindings/hwmon/hih6130.txt | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/hwmon/hih6130.txt
>
> diff --git a/Documentation/devicetree/bindings/hwmon/hih6130.txt b/Documentation/devicetree/bindings/hwmon/hih6130.txt
> new file mode 100644
> index 000000000000..2c43837af4c2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/hih6130.txt
> @@ -0,0 +1,12 @@
> +Honeywell Humidicon HIH-6130 humidity/temperature sensor
> +--------------------------------------------------------
> +
> +Requires node properties:
> +- compatible : "honeywell,hi6130"
> +- reg : the I2C address of the device. This is 0x27.
> +
> +Example:
> + hih6130@27 {
> + compatible = "honeywell,hih6130";
> + reg = <0x27>;
> + };