Skip to content

Allow iio_hwmon to accept hypen in node names

Sanchayan Maity linux-arm-kernel linux-devicetree lkml lm-sensors 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest3 patches 3 repliesIn review

v1 from the cover letter

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3hwmon: iio_hwmon: Allow the driver to accept hypen in device tree node namesdrivers/hwmon/iio_hwmon.c+10 -10 replies
2/3ARM: dts: Change iio_hwmon nodes to use hypen in node namesDocumentation/devicetree/bindings/iio/iio-bindings.txt arch/arm/boot/dts/imx23.dtsi arch/arm/boot/dts/imx28.dtsi+3 -31 reply
3/3ARM: dts: vfxxx: Add iio_hwmon node for ADC temperature channelarch/arm/boot/dts/vfxxx.dtsi+5 -01 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchStefan Agner
1/3
2/3
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] Allow iio_hwmon to accept hypen in node names

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 at colibri-vf:/sys/class/hwmon/hwmon0# ls
device name of_node power subsystem temp1_input temp2_input uevent
root at colibri-vf:/sys/class/hwmon/hwmon0# cat name
iio_hwmon
root at 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(-)
Signature · 1 line
2.7.1