Message ID | 1455866326-15095-1-git-send-email-s.hauer@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Feb 19, 2016 at 08:18:46AM +0100, Sascha Hauer wrote: > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > --- > > This is a supplement to the MTK Thermal series which was lacking the > description for the AUXADC. So it will be applied with that I presume. Acked-by: Rob Herring <robh@kernel.org>
On 23/02/16 21:32, Rob Herring wrote: > On Fri, Feb 19, 2016 at 08:18:46AM +0100, Sascha Hauer wrote: >> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> >> --- >> >> This is a supplement to the MTK Thermal series which was lacking the >> description for the AUXADC. > > So it will be applied with that I presume. > > Acked-by: Rob Herring <robh@kernel.org> > Well the basic problem that I see is, that the auxadc has some more registers (at least in mt6589) for the touch screen registers. So this makes it a candidate for syscon and regmap. But this needs a patch in the thermal driver first...
Hi Matthias, On Wed, Feb 24, 2016 at 03:36:46PM +0100, Matthias Brugger wrote: > > > On 23/02/16 21:32, Rob Herring wrote: > >On Fri, Feb 19, 2016 at 08:18:46AM +0100, Sascha Hauer wrote: > >>Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > >>--- > >> > >>This is a supplement to the MTK Thermal series which was lacking the > >>description for the AUXADC. > > > >So it will be applied with that I presume. > > > >Acked-by: Rob Herring <robh@kernel.org> > > > > Well the basic problem that I see is, that the auxadc has some more > registers (at least in mt6589) for the touch screen registers. > So this makes it a candidate for syscon and regmap. > But this needs a patch in the thermal driver first... When we want to have a driver for the auxadc we are free to write one. No need to use syscon and/or regmap for it. Note that the auxadc is not used by the thermal *driver*, it's used by the thermal *hardware*. It's the hardware that directly reads/writes auxadc registers. If MTK did it right then a real auxadc driver should not be disturbed by the thermal controller accesses. At least from checking the datasheet the registers the thermal controller accesses are completely orthogonal to the ones a auxadc driver would use. Sascha
On 24/02/16 16:12, Sascha Hauer wrote: > Hi Matthias, > > On Wed, Feb 24, 2016 at 03:36:46PM +0100, Matthias Brugger wrote: >> >> >> On 23/02/16 21:32, Rob Herring wrote: >>> On Fri, Feb 19, 2016 at 08:18:46AM +0100, Sascha Hauer wrote: >>>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> >>>> --- >>>> >>>> This is a supplement to the MTK Thermal series which was lacking the >>>> description for the AUXADC. >>> >>> So it will be applied with that I presume. >>> >>> Acked-by: Rob Herring <robh@kernel.org> >>> >> >> Well the basic problem that I see is, that the auxadc has some more >> registers (at least in mt6589) for the touch screen registers. >> So this makes it a candidate for syscon and regmap. >> But this needs a patch in the thermal driver first... > > When we want to have a driver for the auxadc we are free to write one. > No need to use syscon and/or regmap for it. > > Note that the auxadc is not used by the thermal *driver*, it's used by > the thermal *hardware*. It's the hardware that directly reads/writes > auxadc registers. If MTK did it right then a real auxadc driver should > not be disturbed by the thermal controller accesses. At least from Right, didn't realize this. > checking the datasheet the registers the thermal controller accesses > are completely orthogonal to the ones a auxadc driver would use. > As you already explained, syscon/regmap is not needed here. Just for completion: we already had completely orthogonal registers for the reset controller, and we decided to use regmap there as well. We should stay consistent on this. Thanks, Matthias
On Wed, Feb 24, 2016 at 07:34:19PM +0100, Matthias Brugger wrote: > > > On 24/02/16 16:12, Sascha Hauer wrote: > >Hi Matthias, > > > >On Wed, Feb 24, 2016 at 03:36:46PM +0100, Matthias Brugger wrote: > >> > >> > >>On 23/02/16 21:32, Rob Herring wrote: > >>>On Fri, Feb 19, 2016 at 08:18:46AM +0100, Sascha Hauer wrote: > >>>>Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > >>>>--- > >>>> > >>>>This is a supplement to the MTK Thermal series which was lacking the > >>>>description for the AUXADC. > >>> > >>>So it will be applied with that I presume. > >>> > >>>Acked-by: Rob Herring <robh@kernel.org> > >>> > >> > >>Well the basic problem that I see is, that the auxadc has some more > >>registers (at least in mt6589) for the touch screen registers. > >>So this makes it a candidate for syscon and regmap. > >>But this needs a patch in the thermal driver first... > > > >When we want to have a driver for the auxadc we are free to write one. > >No need to use syscon and/or regmap for it. > > > >Note that the auxadc is not used by the thermal *driver*, it's used by > >the thermal *hardware*. It's the hardware that directly reads/writes > >auxadc registers. If MTK did it right then a real auxadc driver should > >not be disturbed by the thermal controller accesses. At least from > > Right, didn't realize this. > > >checking the datasheet the registers the thermal controller accesses > >are completely orthogonal to the ones a auxadc driver would use. > > > > As you already explained, syscon/regmap is not needed here. Just for > completion: we already had completely orthogonal registers for the reset > controller, and we decided to use regmap there as well. > We should stay consistent on this. Matthias, is this some kind of action topic for me? We can use regmap for the AUXADC driver if we want to, I have no problem with that. Sascha
Hi Matthias, On Mon, 2016-03-07 at 14:52 +0800, Sascha Hauer wrote: > On Wed, Feb 24, 2016 at 07:34:19PM +0100, Matthias Brugger wrote: > > > > > > On 24/02/16 16:12, Sascha Hauer wrote: > > >Hi Matthias, > > > > > >On Wed, Feb 24, 2016 at 03:36:46PM +0100, Matthias Brugger wrote: > > >> > > >> > > >>On 23/02/16 21:32, Rob Herring wrote: > > >>>On Fri, Feb 19, 2016 at 08:18:46AM +0100, Sascha Hauer wrote: > > >>>>Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > >>>>--- > > >>>> > > >>>>This is a supplement to the MTK Thermal series which was lacking the > > >>>>description for the AUXADC. > > >>> > > >>>So it will be applied with that I presume. > > >>> > > >>>Acked-by: Rob Herring <robh@kernel.org> > > >>> > > >> > > >>Well the basic problem that I see is, that the auxadc has some more > > >>registers (at least in mt6589) for the touch screen registers. > > >>So this makes it a candidate for syscon and regmap. > > >>But this needs a patch in the thermal driver first... > > > > > >When we want to have a driver for the auxadc we are free to write one. > > >No need to use syscon and/or regmap for it. > > > > > >Note that the auxadc is not used by the thermal *driver*, it's used by > > >the thermal *hardware*. It's the hardware that directly reads/writes > > >auxadc registers. If MTK did it right then a real auxadc driver should > > >not be disturbed by the thermal controller accesses. At least from > > > > Right, didn't realize this. > > > > >checking the datasheet the registers the thermal controller accesses > > >are completely orthogonal to the ones a auxadc driver would use. > > > > > > > As you already explained, syscon/regmap is not needed here. Just for > > completion: we already had completely orthogonal registers for the reset > > controller, and we decided to use regmap there as well. > > We should stay consistent on this. > > Matthias, is this some kind of action topic for me? We can use regmap > for the AUXADC driver if we want to, I have no problem with that. > So you want to add compatible = "mediatek,mt8173-auxadc", "syscon"; And use regmap to access auxadc register in thermal driver. Then you will accept this patch and thermal dts patch, right ? Eddie
Hi Sascha, On 07/03/16 07:52, Sascha Hauer wrote: > On Wed, Feb 24, 2016 at 07:34:19PM +0100, Matthias Brugger wrote: >> >> >> On 24/02/16 16:12, Sascha Hauer wrote: >>> Hi Matthias, >>> >>> On Wed, Feb 24, 2016 at 03:36:46PM +0100, Matthias Brugger wrote: >>>> >>>> >>>> On 23/02/16 21:32, Rob Herring wrote: >>>>> On Fri, Feb 19, 2016 at 08:18:46AM +0100, Sascha Hauer wrote: >>>>>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> >>>>>> --- >>>>>> >>>>>> This is a supplement to the MTK Thermal series which was lacking the >>>>>> description for the AUXADC. >>>>> >>>>> So it will be applied with that I presume. >>>>> >>>>> Acked-by: Rob Herring <robh@kernel.org> >>>>> >>>> >>>> Well the basic problem that I see is, that the auxadc has some more >>>> registers (at least in mt6589) for the touch screen registers. >>>> So this makes it a candidate for syscon and regmap. >>>> But this needs a patch in the thermal driver first... >>> >>> When we want to have a driver for the auxadc we are free to write one. >>> No need to use syscon and/or regmap for it. >>> >>> Note that the auxadc is not used by the thermal *driver*, it's used by >>> the thermal *hardware*. It's the hardware that directly reads/writes >>> auxadc registers. If MTK did it right then a real auxadc driver should >>> not be disturbed by the thermal controller accesses. At least from >> >> Right, didn't realize this. >> >>> checking the datasheet the registers the thermal controller accesses >>> are completely orthogonal to the ones a auxadc driver would use. >>> >> >> As you already explained, syscon/regmap is not needed here. Just for >> completion: we already had completely orthogonal registers for the reset >> controller, and we decided to use regmap there as well. >> We should stay consistent on this. > > Matthias, is this some kind of action topic for me? We can use regmap > for the AUXADC driver if we want to, I have no problem with that. > No, no need for that, I will take the patch as is. I will let you know when it got queued. Sorry for the delay.
On 17/03/16 16:39, Matthias Brugger wrote: > Hi Sascha, > > On 07/03/16 07:52, Sascha Hauer wrote: >> On Wed, Feb 24, 2016 at 07:34:19PM +0100, Matthias Brugger wrote: >>> >>> >>> On 24/02/16 16:12, Sascha Hauer wrote: >>>> Hi Matthias, >>>> >>>> On Wed, Feb 24, 2016 at 03:36:46PM +0100, Matthias Brugger wrote: >>>>> >>>>> >>>>> On 23/02/16 21:32, Rob Herring wrote: >>>>>> On Fri, Feb 19, 2016 at 08:18:46AM +0100, Sascha Hauer wrote: >>>>>>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> >>>>>>> --- >>>>>>> >>>>>>> This is a supplement to the MTK Thermal series which was lacking the >>>>>>> description for the AUXADC. >>>>>> >>>>>> So it will be applied with that I presume. >>>>>> >>>>>> Acked-by: Rob Herring <robh@kernel.org> >>>>>> >>>>> >>>>> Well the basic problem that I see is, that the auxadc has some more >>>>> registers (at least in mt6589) for the touch screen registers. >>>>> So this makes it a candidate for syscon and regmap. >>>>> But this needs a patch in the thermal driver first... >>>> >>>> When we want to have a driver for the auxadc we are free to write one. >>>> No need to use syscon and/or regmap for it. >>>> >>>> Note that the auxadc is not used by the thermal *driver*, it's used by >>>> the thermal *hardware*. It's the hardware that directly reads/writes >>>> auxadc registers. If MTK did it right then a real auxadc driver should >>>> not be disturbed by the thermal controller accesses. At least from >>> >>> Right, didn't realize this. >>> >>>> checking the datasheet the registers the thermal controller accesses >>>> are completely orthogonal to the ones a auxadc driver would use. >>>> >>> >>> As you already explained, syscon/regmap is not needed here. Just for >>> completion: we already had completely orthogonal registers for the reset >>> controller, and we decided to use regmap there as well. >>> We should stay consistent on this. >> >> Matthias, is this some kind of action topic for me? We can use regmap >> for the AUXADC driver if we want to, I have no problem with that. >> > > No, no need for that, I will take the patch as is. I will let you know > when it got queued. > > Sorry for the delay. Applied, thanks.
diff --git a/Documentation/devicetree/bindings/soc/mediatek/auxadc.txt b/Documentation/devicetree/bindings/soc/mediatek/auxadc.txt new file mode 100644 index 0000000..bdb7829 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/mediatek/auxadc.txt @@ -0,0 +1,21 @@ +MediaTek AUXADC +=============== + +The Auxiliary Analog/Digital Converter (AUXADC) is an ADC found +in some Mediatek SoCs which among other things measures the temperatures +in the SoC. It can be used directly with register accesses, but it is also +used by thermal controller which reads the temperatures from the AUXADC +directly via its own bus interface. See +Documentation/devicetree/bindings/thermal/mediatek-thermal.txt +for the Thermal Controller which holds a phandle to the AUXADC. + +Required properties: +- compatible: Must be "mediatek,mt8173-auxadc" +- reg: Address range of the AUXADC unit + +Example: + +auxadc: auxadc@11001000 { + compatible = "mediatek,mt8173-auxadc"; + reg = <0 0x11001000 0 0x1000>; +};
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- This is a supplement to the MTK Thermal series which was lacking the description for the AUXADC. .../devicetree/bindings/soc/mediatek/auxadc.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/auxadc.txt