Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754388AbdCPVrK (ORCPT ); Thu, 16 Mar 2017 17:47:10 -0400 Received: from www381.your-server.de ([78.46.137.84]:36985 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752849AbdCPVrG (ORCPT ); Thu, 16 Mar 2017 17:47:06 -0400 Subject: Re: [PATCH v2] ARM: zynq: Add #io-channel-cells to (x)adc node for iio-hwmon To: Moritz Fischer References: <1489003884-2489-1-git-send-email-mdf@kernel.org> <7e4fbe16-8686-5399-748d-af222c630338@xilinx.com> <37f29986-6491-67ab-144c-eb485cc1fdcc@metafoo.de> Cc: Michal Simek , Linux Kernel Mailing List , Devicetree List , =?UTF-8?Q?S=c3=b6ren_Brinkmann?= , linux-arm-kernel , Julia Cartwright From: Lars-Peter Clausen Message-ID: <1e25520c-acbf-6512-3070-77e3c852e4f8@metafoo.de> Date: Thu, 16 Mar 2017 22:23:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Authenticated-Sender: lars@metafoo.de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3102 Lines: 83 On 03/16/2017 06:54 PM, Moritz Fischer wrote: > Hi Lars, > > On Thu, Mar 16, 2017 at 9:51 AM, Lars-Peter Clausen wrote: >> On 03/16/2017 05:45 PM, Michal Simek wrote: >>> On 16.3.2017 17:39, Moritz Fischer wrote: >>>> On Thu, Mar 16, 2017 at 9:16 AM, Michal Simek wrote: >>>>> Hi, >>>>> >>>>> On 8.3.2017 21:11, Moritz Fischer wrote: >>>>>> Fix >>>>>> >>>>>> OF: /iio_hwmon: could not get #io-channel-cells for >>>>>> /amba/adc@f8007100 >>>>>> OF: /iio_hwmon: could not get #io-channel-cells for >>>>>> /amba/adc@f8007100 >>>>>> OF: /iio_hwmon: could not get #io-channel-cells for >>>>>> /amba/adc@f8007100 >>>>>> >>>>>> by adding the #io-channel-cells property. >>>>>> >>>>>> Signed-off-by: Moritz Fischer >>>>>> Cc: Michal Simek >>>>>> Cc: Sören Brinkmann >>>>>> Cc: Julia Cartwright >>>>>> Cc: linux-kernel@vger.kernel.org >>>>>> Cc: devicetree@vger.kernel.org >>>>>> --- >>>>>> >>>>>> Changes from v1: >>>>>> - fix messed up commit message >>>>>> --- >>>>>> arch/arm/boot/dts/zynq-7000.dtsi | 1 + >>>>>> 1 file changed, 1 insertion(+) >>>>>> >>>>>> diff --git a/arch/arm/boot/dts/zynq-7000.dtsi b/arch/arm/boot/dts/zynq-7000.dtsi >>>>>> index f3ac9bf..98233a8 100644 >>>>>> --- a/arch/arm/boot/dts/zynq-7000.dtsi >>>>>> +++ b/arch/arm/boot/dts/zynq-7000.dtsi >>>>>> @@ -72,6 +72,7 @@ >>>>>> interrupts = <0 7 4>; >>>>>> interrupt-parent = <&intc>; >>>>>> clocks = <&clkc 12>; >>>>>> + #io-channel-cells = <1>; >>>>>> }; >>>>>> >>>>>> can0: can@e0008000 { >>>>>> >>>>> >>>>> I think it will be good to the next step too. >>>>> It means also add iio-hwmon node too. >>>>> >>>>> What do you think? >>>> >>>> I hadn't put it in there since dts is supposed to describe hw, >>>> but obviously putting the actual hwmon in there makes it more useful. >>> >>> I had one discussion about this with Grant in past and it is common >>> mistake. It is simplification of purpose of dts. >>> >> >> If the iio-hwmon binding had gone through review it would have been rejected. >> >>>> >>>> I can resubmit with the hwmon node in there. >>> >>> If you grep kernel tree you will see that others are using it too. >>> Also there is accepted binding for that that's why I can't see big >>> problem with it. >> >> Since this is an application specific binding I wouldn't put it in the >> generic DT include file. It's a bit like adding a gpio-key binding for each >> of the GPIOs just in case somebody wants to use it. > > So is your suggestion to move the whole thing from .dtsi -> .dts? The #io-channels-cells can go into the dtsi, that's a sensible thing to do. The number of cells is part of the binding specification for the XADC and wont change. The hwmon bridge on the other hand I wouldn't put into any default devicetree. In my opinion is should only used if and only if there are legacy applications on a specific system that need to use the hwmon interface.