From: Liam Beguin <liambeguin@gmail.com>
To: liambeguin@gmail.com, jdelvare@suse.com, linux@roeck-us.net,
jic23@kernel.org, lars@metafoo.de, pmeerw@pmeerw.net
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
robh+dt@kernel.org
Subject: [RFC PATCH v1 2/2] dt-bindings: hwmon: add iio-hwmon bindings
Date: Sun, 16 May 2021 00:43:15 -0400 [thread overview]
Message-ID: <20210516044315.116290-3-liambeguin@gmail.com> (raw)
In-Reply-To: <20210516044315.116290-1-liambeguin@gmail.com>
Document devicetree bindings for the iio-hwmon driver.
Also add documentation for the channel-types option.
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
---
.../devicetree/bindings/hwmon/iio-hwmon.yaml | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml
diff --git a/Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml b/Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml
new file mode 100644
index 000000000000..fb8b437112a5
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/hwmon/iio-hwmon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: bindings for the IIO hwmon bridge
+
+maintainers:
+ - Jean Delvare <jdelvare@suse.com>
+ - Guenter Roeck <linux@roeck-us.net>
+
+properties:
+ compatible:
+ enum:
+ - iio-hwmon
+
+ io-channels:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+ io-channel-names:
+ $ref: /schemas/types.yaml#/definitions/string-array
+
+ channel-types:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: |
+ an array of channel types used to override the IIO type of each channel.
+
+additionalProperties: false
+
+examples:
+ - |
+ #define IIO_VOLTAGE 0
+ #define IIO_CURRENT 1
+ iio_hwmon_adc0 {
+ compatible = "iio-hwmon";
+ io-channels = <&adc 0>, <&adc 1>;
+ io-channel-names = "input_current", "input_voltage" ;
+ channel-types = <IIO_CURRENT>, <IIO_VOLTAGE>;
+ };
--
2.30.1.489.g328c10930387
next prev parent reply other threads:[~2021-05-16 4:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-16 4:43 [RFC PATCH v1 0/2] hwmon: (iio_hwmon) optionally force iio channel type Liam Beguin
2021-05-16 4:43 ` [RFC PATCH v1 1/2] " Liam Beguin
2021-05-16 4:43 ` Liam Beguin [this message]
2021-05-16 8:56 ` [RFC PATCH v1 0/2] " Guenter Roeck
2021-05-16 14:55 ` Liam Beguin
2021-05-16 9:06 ` Jonathan Cameron
2021-05-16 15:02 ` Liam Beguin
2021-05-16 15:54 ` Guenter Roeck
2021-05-16 16:26 ` Jonathan Cameron
2021-05-16 18:14 ` Liam Beguin
2021-05-16 23:10 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210516044315.116290-3-liambeguin@gmail.com \
--to=liambeguin@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).