From patchwork Fri Feb 12 12:23:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanchayan X-Patchwork-Id: 8290541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B01F6BEEE5 for ; Fri, 12 Feb 2016 12:30:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1DA8203F1 for ; Fri, 12 Feb 2016 12:30:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA7D1203ED for ; Fri, 12 Feb 2016 12:30:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aUCq0-0000iX-Uk; Fri, 12 Feb 2016 12:28:40 +0000 Received: from mail-pa0-x244.google.com ([2607:f8b0:400e:c03::244]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aUCpx-0000fK-Sx for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2016 12:28:38 +0000 Received: by mail-pa0-x244.google.com with SMTP id y7so572739paa.0 for ; Fri, 12 Feb 2016 04:28:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=hrnzVXSYGxJRy60eCrPUEU+0js5jAH0FzMCZX2YLNB0=; b=hjcj10fL4GCujNf8JQPmjBIbLB47mh5ctGvKxIJPuuWFXKHNQ9GYmUQo4iMPtXrdPG k3VgNfQWnxeWLdVU24KtCTGXK0p5QbHw9PAfFLI5mll7myGdL5zTnRXa3jWLwhxZ0GA/ ftiJshd5EV0X2KNUGuANqprliah9X8Q8l2LZgOp5Z1i4qzY/zNFS0DVQ/qFR0bQJRjvL Cxngizj4sgmywtFaLfebdD7lGCy+bcF+AUQ6AV85axko//ht9mFk+OQxUK5+qA2jXW60 SN+tfVSEDVzwvfSspSPwxZealK1Ci/Xy90RIP0ZN4q5F/bbPko3/ORE80dmzLe9iKyXQ rJOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hrnzVXSYGxJRy60eCrPUEU+0js5jAH0FzMCZX2YLNB0=; b=XIkA+yZBqiLyLz8t5fn2ovfgULJIhpGEPjU245SQmFEi0qZlEiocFwMKiLwqQSVT9p O069Tn0mem8Y3zOXwLuYAHCkYe5BerEldH26lrI0dlx6+aZdSXVZnCrDbiwstpph9Hrh ZQTO6lneL5VGgkZqLsX53+LZ8yy12YWz0gJRG62OXWjmiYfIIa2mVG9FRx9lF9esp+QV fz7NJBLFE2paGrKoNMuM4EZ36A4Z5ZuN6bIYO8DLbKRpqYzAw2erLuhydatagN5h5N2W b6Jx33oaQpe6CrLVRu0+OLqoQckAau9Em+kMLRG9Tz30kMYcxFZAzYSjXp3b1FXdLZKY XmxQ== X-Gm-Message-State: AG10YOS6GiuxktYH9yQ1EpAXkVzH5wY+yYwvEROtXAocA9/vlT+NmYdTNPXaPRAq9sHZEw== X-Received: by 10.66.166.42 with SMTP id zd10mr1582386pab.159.1455280096395; Fri, 12 Feb 2016 04:28:16 -0800 (PST) Received: from localhost ([115.115.225.206]) by smtp.gmail.com with ESMTPSA id c9sm19218494pfd.90.2016.02.12.04.28.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Feb 2016 04:28:15 -0800 (PST) From: Sanchayan Maity To: shawnguo@kernel.org Subject: [PATCH v2] ARM: dts: vfxxx: Add iio_hwmon node for ADC temperature channel Date: Fri, 12 Feb 2016 17:53:00 +0530 Message-Id: X-Mailer: git-send-email 2.7.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160212_042837_972632_A158E1E6 X-CRM114-Status: GOOD ( 12.48 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Sanchayan Maity , linux-arm-kernel@lists.infradead.org, stefan@agner.ch, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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>; + }; }; };