Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1335001 > unrolled thread
| Started by | Sanchayan Maity <maitysanchayan@gmail.com> |
|---|---|
| First post | 2016-02-16 06:10 +0100 |
| Last post | 2016-02-17 04:40 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v3 0/3] Allow iio_hwmon to accept hypen in node names Sanchayan Maity <maitysanchayan@gmail.com> - 2016-02-16 06:10 +0100
[PATCH v3 2/3] ARM: dts: Change iio_hwmon nodes to use hypen in node names Sanchayan Maity <maitysanchayan@gmail.com> - 2016-02-16 06:10 +0100
Re: [PATCH v3 2/3] ARM: dts: Change iio_hwmon nodes to use hypen in node names Rob Herring <robh@kernel.org> - 2016-02-22 04:00 +0100
Re: [PATCH v3 0/3] Allow iio_hwmon to accept hypen in node names Guenter Roeck <linux@roeck-us.net> - 2016-02-17 04:40 +0100
| From | Sanchayan Maity <maitysanchayan@gmail.com> |
|---|---|
| Date | 2016-02-16 06:10 +0100 |
| Subject | [PATCH v3 0/3] Allow iio_hwmon to accept hypen in node names |
| Message-ID | <r2G3D-399-3@gated-at.bofh.it> |
Hello, Initial versions of the patchset intended to introduce the use of iio_hwmon for Vybrid SoC's. Currently the iio_hwmon driver has two users and as per the binding documentation, the node names use the underscore. Use of hypen in device tree node names is acceptable, however currently the hwmon core code rejects it due to perhaps user space not liking the hypen and getting confused. As per Guenter Roeck's suggestion, the first patch looks for a hypen and replaces it with a underscore in the probe call of iio_hwmon driver before calling hwmon_device_register_with_groups for registration. Any users of iio_hwmon driver can now use hypen in the node name. As per Shawn's suggestion, the existing users have been changed to use the hypen instead of the underscore and the iio-bindings document updated. Third patch introduces the usage for Vybrid itself. Patchset is based on top of shawn's for-next branch. Feedbacks and comments most welcome. Thank you for feedbacks. @Guenter I hope I understood and implemented correctly what you had in mind. Sample Output from Toradex Colibri VF50 module root@colibri-vf:/sys/class/hwmon/hwmon0# ls device name of_node power subsystem temp1_input temp2_input uevent root@colibri-vf:/sys/class/hwmon/hwmon0# cat name iio_hwmon root@colibri-vf:/sys/class/hwmon/hwmon0# uname -a Linux colibri-vf 4.5.0-rc1-12868-g88b677c #48 SMP Tue Feb 16 10:05:28 IST 2016 armv7l GNU/Linux v1: https://lkml.org/lkml/2015/9/16/932 v2: https://lkml.org/lkml/2016/2/12/168 Thanks & Regards, Sanchayan Maity. Sanchayan Maity (3): hwmon: iio_hwmon: Allow the driver to accept hypen in device tree node names ARM: dts: Change iio_hwmon nodes to use hypen in node names ARM: dts: vfxxx: Add iio_hwmon node for ADC temperature channel Documentation/devicetree/bindings/iio/iio-bindings.txt | 2 +- arch/arm/boot/dts/imx23.dtsi | 2 +- arch/arm/boot/dts/imx28.dtsi | 2 +- arch/arm/boot/dts/vfxxx.dtsi | 5 +++++ drivers/hwmon/iio_hwmon.c | 11 ++++++++++- 5 files changed, 18 insertions(+), 4 deletions(-) -- 2.7.1
[toc] | [next] | [standalone]
| From | Sanchayan Maity <maitysanchayan@gmail.com> |
|---|---|
| Date | 2016-02-16 06:10 +0100 |
| Subject | [PATCH v3 2/3] ARM: dts: Change iio_hwmon nodes to use hypen in node names |
| Message-ID | <r2G3E-399-9@gated-at.bofh.it> |
| In reply to | #1335001 |
Change iio_hwmon nodes to use hypen in node names instead of
underscore.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
---
Documentation/devicetree/bindings/iio/iio-bindings.txt | 2 +-
arch/arm/boot/dts/imx23.dtsi | 2 +-
arch/arm/boot/dts/imx28.dtsi | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/iio-bindings.txt b/Documentation/devicetree/bindings/iio/iio-bindings.txt
index 0b447d9..68d6f8c 100644
--- a/Documentation/devicetree/bindings/iio/iio-bindings.txt
+++ b/Documentation/devicetree/bindings/iio/iio-bindings.txt
@@ -82,7 +82,7 @@ vdd channel is connected to output 0 of the &ref device.
...
- iio_hwmon {
+ iio-hwmon {
compatible = "iio-hwmon";
io-channels = <&adc 0>, <&adc 1>, <&adc 2>,
<&adc 3>, <&adc 4>, <&adc 5>,
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi
index 1c6c075..302d116 100644
--- a/arch/arm/boot/dts/imx23.dtsi
+++ b/arch/arm/boot/dts/imx23.dtsi
@@ -569,7 +569,7 @@
};
};
- iio_hwmon {
+ iio-hwmon {
compatible = "iio-hwmon";
io-channels = <&lradc 8>;
};
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index fae7b90..f637ec9 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -1256,7 +1256,7 @@
};
};
- iio_hwmon {
+ iio-hwmon {
compatible = "iio-hwmon";
io-channels = <&lradc 8>;
};
--
2.7.1
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2016-02-22 04:00 +0100 |
| Subject | Re: [PATCH v3 2/3] ARM: dts: Change iio_hwmon nodes to use hypen in node names |
| Message-ID | <r4OT8-7hh-29@gated-at.bofh.it> |
| In reply to | #1335002 |
On Tue, Feb 16, 2016 at 10:30:54AM +0530, Sanchayan Maity wrote: > Change iio_hwmon nodes to use hypen in node names instead of > underscore. > > Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> > --- > Documentation/devicetree/bindings/iio/iio-bindings.txt | 2 +- > arch/arm/boot/dts/imx23.dtsi | 2 +- > arch/arm/boot/dts/imx28.dtsi | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) No real objection here though I don't think this is really necessary. While we prefer '-' to '_' it's not really strong enough to change. It bothers me more that the node name leaks to userspace. Rob
[toc] | [prev] | [next] | [standalone]
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2016-02-17 04:40 +0100 |
| Message-ID | <r3186-vI-29@gated-at.bofh.it> |
| In reply to | #1335001 |
On 02/15/2016 09:00 PM, Sanchayan Maity wrote: > Hello, > > Initial versions of the patchset intended to introduce the use of > iio_hwmon for Vybrid SoC's. Currently the iio_hwmon driver has two > users and as per the binding documentation, the node names use the > underscore. Use of hypen in device tree node names is acceptable, > however currently the hwmon core code rejects it due to perhaps user > space not liking the hypen and getting confused. > > As per Guenter Roeck's suggestion, the first patch looks for a hypen > and replaces it with a underscore in the probe call of iio_hwmon driver > before calling hwmon_device_register_with_groups for registration. Any > users of iio_hwmon driver can now use hypen in the node name. > > As per Shawn's suggestion, the existing users have been changed to use > the hypen instead of the underscore and the iio-bindings document > updated. Third patch introduces the usage for Vybrid itself. > > Patchset is based on top of shawn's for-next branch. > > Feedbacks and comments most welcome. Thank you for feedbacks. > > @Guenter > I hope I understood and implemented correctly what you had in mind. > Yes. Series applied to hwmon-next (if the dts changes also end up in an arm branch, no harm done). Thanks, Guenter
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web