From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751944AbeA2Max (ORCPT ); Mon, 29 Jan 2018 07:30:53 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33178 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751297AbeA2MaY (ORCPT ); Mon, 29 Jan 2018 07:30:24 -0500 X-Google-Smtp-Source: AH8x227cs3Y643Zs8/7z9kL+Jf8CsNxtCRgYft/G6bFVkyCmcFSkOKYr20JH1+Kp+EvIg0ulR7rUlQ== Subject: Re: [PATCH v2 01/16] dt-bindings: update the Allwinner GPADC device tree binding for H3 & A83T To: Maxime Ripard Cc: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, davem@davemloft.net, hans.verkuil@cisco.com, mchehab@kernel.org, rask@formelder.dk, clabbe.montjoie@gmail.com, sean@mess.org, krzk@kernel.org, quentin.schulz@free-electrons.com, icenowy@aosc.io, edu.molinas@gmail.com, singhalsimran0@gmail.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com References: <20180128232919.12639-1-embed3d@gmail.com> <20180128232919.12639-2-embed3d@gmail.com> <20180129091937.w3c3btvva5yaqlf6@flea.lan> From: Philipp Rossak Message-ID: Date: Mon, 29 Jan 2018 13:30:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180129091937.w3c3btvva5yaqlf6@flea.lan> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> +Example for A33: >> ths: ths@1c25000 { >> compatible = "allwinner,sun8i-a33-ths"; >> reg = <0x01c25000 0x100>; >> @@ -17,6 +40,27 @@ Example: >> #io-channel-cells = <0>; >> }; >> >> +Example for H3: >> + ths: thermal-sensor@1c25000 { >> + compatible = "allwinner,sun8i-h3-ths"; >> + reg = <0x01c25000 0x400>; >> + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; >> + clock-names = "bus", "mod"; >> + resets = <&ccu RST_BUS_THS>; >> + interrupts = ; >> + #thermal-sensor-cells = <0>; >> + #io-channel-cells = <0>; >> + }; >> + >> +Example for A83T: >> + ths: thermal-sensor@1f04000 { >> + compatible = "allwinner,sun8i-a83t-ths"; >> + reg = <0x01f04000 0x100>; >> + interrupts = ; >> + #thermal-sensor-cells = <1>; >> + #io-channel-cells = <0>; >> + }; >> + > > I'm wondering if this is actually needed. We've used this convoluted > constructs to be compatible with the old driver, but I'm not sure this > is actually worth it now, and this is causing several issues, among > which: > - We need to have a bunch of quirks to handle all the DT cases. > - We need to have an MFD, which isn't really optimal > > So I'd rather introduce a new compatible for the old SoCs, keep the > old driver around, and simplify a lot that driver code that will ease > further developments. And we can also get rid of the MFD in the > process. I discussed it with Quentin, and he was ok with it, what do > you think? > > (and that would involve creating a new file for the bindings you > introduce here). > > Maxime > I think this is a good idea, and the desired way to rework the driver. To sum up what we talked on IRC: This will end up in removing the MFD driver and moving the interrupt handling into the iio driver. At the end this will also simplify the IRQ part. Philipp From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Rossak Subject: Re: [PATCH v2 01/16] dt-bindings: update the Allwinner GPADC device tree binding for H3 & A83T Date: Mon, 29 Jan 2018 13:30:20 +0100 Message-ID: References: <20180128232919.12639-1-embed3d@gmail.com> <20180128232919.12639-2-embed3d@gmail.com> <20180129091937.w3c3btvva5yaqlf6@flea.lan> Reply-To: embed3d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <20180129091937.w3c3btvva5yaqlf6-ZC1Zs529Oq4@public.gmane.org> Content-Language: en-US List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Maxime Ripard Cc: lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, wens-jdAy2FN1RRM@public.gmane.org, linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org, jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, knaack.h-Mmb7MZpHnFY@public.gmane.org, lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org, pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org, hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org, mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, rask-SivP7zSAdNDZaaYASwVUlg@public.gmane.org, clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, sean-hENCXIMQXOg@public.gmane.org, krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org, icenowy-h8G6r0blFSE@public.gmane.org, edu.molinas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, singhalsimran0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: devicetree@vger.kernel.org >> +Example for A33: >> ths: ths@1c25000 { >> compatible = "allwinner,sun8i-a33-ths"; >> reg = <0x01c25000 0x100>; >> @@ -17,6 +40,27 @@ Example: >> #io-channel-cells = <0>; >> }; >> >> +Example for H3: >> + ths: thermal-sensor@1c25000 { >> + compatible = "allwinner,sun8i-h3-ths"; >> + reg = <0x01c25000 0x400>; >> + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; >> + clock-names = "bus", "mod"; >> + resets = <&ccu RST_BUS_THS>; >> + interrupts = ; >> + #thermal-sensor-cells = <0>; >> + #io-channel-cells = <0>; >> + }; >> + >> +Example for A83T: >> + ths: thermal-sensor@1f04000 { >> + compatible = "allwinner,sun8i-a83t-ths"; >> + reg = <0x01f04000 0x100>; >> + interrupts = ; >> + #thermal-sensor-cells = <1>; >> + #io-channel-cells = <0>; >> + }; >> + > > I'm wondering if this is actually needed. We've used this convoluted > constructs to be compatible with the old driver, but I'm not sure this > is actually worth it now, and this is causing several issues, among > which: > - We need to have a bunch of quirks to handle all the DT cases. > - We need to have an MFD, which isn't really optimal > > So I'd rather introduce a new compatible for the old SoCs, keep the > old driver around, and simplify a lot that driver code that will ease > further developments. And we can also get rid of the MFD in the > process. I discussed it with Quentin, and he was ok with it, what do > you think? > > (and that would involve creating a new file for the bindings you > introduce here). > > Maxime > I think this is a good idea, and the desired way to rework the driver. To sum up what we talked on IRC: This will end up in removing the MFD driver and moving the interrupt handling into the iio driver. At the end this will also simplify the IRQ part. Philipp From mboxrd@z Thu Jan 1 00:00:00 1970 From: embed3d@gmail.com (Philipp Rossak) Date: Mon, 29 Jan 2018 13:30:20 +0100 Subject: [PATCH v2 01/16] dt-bindings: update the Allwinner GPADC device tree binding for H3 & A83T In-Reply-To: <20180129091937.w3c3btvva5yaqlf6@flea.lan> References: <20180128232919.12639-1-embed3d@gmail.com> <20180128232919.12639-2-embed3d@gmail.com> <20180129091937.w3c3btvva5yaqlf6@flea.lan> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org >> +Example for A33: >> ths: ths at 1c25000 { >> compatible = "allwinner,sun8i-a33-ths"; >> reg = <0x01c25000 0x100>; >> @@ -17,6 +40,27 @@ Example: >> #io-channel-cells = <0>; >> }; >> >> +Example for H3: >> + ths: thermal-sensor at 1c25000 { >> + compatible = "allwinner,sun8i-h3-ths"; >> + reg = <0x01c25000 0x400>; >> + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; >> + clock-names = "bus", "mod"; >> + resets = <&ccu RST_BUS_THS>; >> + interrupts = ; >> + #thermal-sensor-cells = <0>; >> + #io-channel-cells = <0>; >> + }; >> + >> +Example for A83T: >> + ths: thermal-sensor at 1f04000 { >> + compatible = "allwinner,sun8i-a83t-ths"; >> + reg = <0x01f04000 0x100>; >> + interrupts = ; >> + #thermal-sensor-cells = <1>; >> + #io-channel-cells = <0>; >> + }; >> + > > I'm wondering if this is actually needed. We've used this convoluted > constructs to be compatible with the old driver, but I'm not sure this > is actually worth it now, and this is causing several issues, among > which: > - We need to have a bunch of quirks to handle all the DT cases. > - We need to have an MFD, which isn't really optimal > > So I'd rather introduce a new compatible for the old SoCs, keep the > old driver around, and simplify a lot that driver code that will ease > further developments. And we can also get rid of the MFD in the > process. I discussed it with Quentin, and he was ok with it, what do > you think? > > (and that would involve creating a new file for the bindings you > introduce here). > > Maxime > I think this is a good idea, and the desired way to rework the driver. To sum up what we talked on IRC: This will end up in removing the MFD driver and moving the interrupt handling into the iio driver. At the end this will also simplify the IRQ part. Philipp