devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sanchayan Maity <maitysanchayan@gmail.com>
To: shawnguo@kernel.org
Cc: stefan@agner.ch, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sanchayan Maity <maitysanchayan@gmail.com>
Subject: [PATCH v2] ARM: dts: vfxxx: Add iio_hwmon node for ADC temperature channel
Date: Fri, 12 Feb 2016 17:53:00 +0530	[thread overview]
Message-ID: <cd32f1664a04b38b8a025414d039bd015cb9a5ff.1455278754.git.maitysanchayan@gmail.com> (raw)

Add iio_hwmon node to expose the temperature channel on Vybrid as
hardware monitor device using the iio_hwmon driver.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
---

Hello,

The first version of the patch was send quite a while ago.
https://lkml.org/lkml/2015/9/16/932

Shawn you had requested that hyphen rather than underscore should
be used in node name. I looked into that.

The iio_hwmon driver calls hwmon_device register_with_groups inside
hwmon.c and this
http://lxr.free-electrons.com/source/drivers/hwmon/hwmon.c#L103

does not allow hyphen in hwmon name attribute. I was not aware of
this but while trying to test the change, the device probe failed
with EINVAL. I think we should stick to the existing use of the
bindings or we need to change the hwmon code as well along with the
existing device tree files and binding documentation.

Changes since v1:
1. Expose ADC1 temperature channel as well
2. Move the entry outside of the aips1 bus node

Best Regards,
Sanchayan Maity.
---
 arch/arm/boot/dts/vfxxx.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/vfxxx.dtsi b/arch/arm/boot/dts/vfxxx.dtsi
index a5f07e3..8ed8e47 100644
--- a/arch/arm/boot/dts/vfxxx.dtsi
+++ b/arch/arm/boot/dts/vfxxx.dtsi
@@ -673,5 +673,10 @@
 				status = "disabled";
 			};
 		};
+
+		iio_hwmon {
+			compatible = "iio-hwmon";
+			io-channels = <&adc0 16>, <&adc1 16>;
+		};
 	};
 };
-- 
2.7.1

             reply	other threads:[~2016-02-12 12:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12 12:23 Sanchayan Maity [this message]
2016-02-14  8:33 ` [PATCH v2] ARM: dts: vfxxx: Add iio_hwmon node for ADC temperature channel Shawn Guo
2016-02-15  4:42   ` maitysanchayan
     [not found]     ` <20160215044214.GA5545-2b/appYahYAQpivJYWJ5AnfHJb42ZiuNiBNltiLz+yw@public.gmane.org>
2016-02-15  5:14       ` 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=cd32f1664a04b38b8a025414d039bd015cb9a5ff.1455278754.git.maitysanchayan@gmail.com \
    --to=maitysanchayan@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=stefan@agner.ch \
    /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).