Re: [PATCH v7 1/8] ARM: dt: Binding documentation for imx25 ADC/TSC

2015-03-07 Thread Jonathan Cameron
On 03/03/15 07:58, Markus Pargmann wrote:
 This documentation describes the devicetree bindings for the
 ADC/Touchscreen unit of the i.MX25 SoC.
 
 Signed-off-by: Markus Pargmann m...@pengutronix.de
Straight forward and sensible.

Acked-by: Jonathan Cameron ji...@kernel.org

 ---
 
 Notes:
 Changes in v6:
  - Removed adc-ref property and replaced it with refp and refn for 
 positive and
negative references. The properties are optional now as the default
behaviour is a positive internal reference voltage and ADC GND as 
 negative
reference.
 
  .../devicetree/bindings/mfd/fsl-imx25-tsadc.txt| 46 
 ++
  1 file changed, 46 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt
 
 diff --git a/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt 
 b/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt
 new file mode 100644
 index ..a857af0eb68c
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt
 @@ -0,0 +1,46 @@
 +Freescale mx25 ADC/TSC multifunction device
 +
 +This device combines two general purpose conversion queues one used for 
 general
 +ADC and the other used for touchscreens.
 +
 +Required properties:
 + - compatible: Should be fsl,imx25-tsadc.
 + - reg: Memory range of the device.
 + - interrupts: Interrupt for this device as described in
 +   interrupts/interrupts.txt
 + - clocks: An 'ipg' clock defined as described in clocks/clock.txt
 + - interrupt-controller: This device is an interrupt controller. It controls
 +   the interrupts of both conversion queues.
 + - #interrupt-cells: Should be '1'.
 + - #address-cells: Should be '1'.
 + - #size-cells: Should be '1'.
 + - ranges
 +
 +This device includes two conversion queues which can be added as subnodes.
 +The first queue is for the touchscreen, the second for general purpose ADC.
 +
 +Example:
 + tscadc: tscadc@5003 {
 + compatible = fsl,imx25-tsadc;
 + reg = 0x5003 0xc;
 + interrupts = 46;
 + clocks = clks 119;
 + clock-names = ipg;
 + interrupt-controller;
 + #interrupt-cells = 1;
 + #address-cells = 1;
 + #size-cells = 1;
 + ranges;
 +
 + tsc: tcq@50030400 {
 + compatible = fsl,imx25-tcq;
 + reg = 0x50030400 0x60;
 + ...
 + };
 +
 + adc: gcq@50030800 {
 + compatible = fsl,imx25-gcq;
 + reg = 0x50030800 0x60;
 + ...
 + };
 + };
 

--
To unsubscribe from this list: send the line unsubscribe linux-input in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v7 1/8] ARM: dt: Binding documentation for imx25 ADC/TSC

2015-03-07 Thread Jonathan Cameron
On 05/03/15 07:12, Markus Pargmann wrote:
 Hi,
 
 On Tue, Mar 03, 2015 at 10:02:12AM +0100, Arnd Bergmann wrote:
 On Tuesday 03 March 2015 08:58:11 Markus Pargmann wrote:
 +Example:
 +   tscadc: tscadc@5003 {
 +   compatible = fsl,imx25-tsadc;
 +   reg = 0x5003 0xc;
 +   interrupts = 46;
 +   clocks = clks 119;
 +   clock-names = ipg;
 +   interrupt-controller;
 +   #interrupt-cells = 1;
 +   #address-cells = 1;
 +   #size-cells = 1;
 +   ranges;
 +
 +   tsc: tcq@50030400 {
 +   compatible = fsl,imx25-tcq;
 +   reg = 0x50030400 0x60;
 +   ...
 +   };
 +
 +   adc: gcq@50030800 {
 +   compatible = fsl,imx25-gcq;
 +   reg = 0x50030800 0x60;
 +   ...
 +   };
 +   };


 I wonder if we should just treat this MFD as a single IIO device
 that also registers to the input layer.

 Are there any other registers in the 0x5003-0x50031000
 range, or could the fsl,imx25-tcq and fsl,imx25-gcq devices
 be reused outside of a fsl,imx25-tsadc device?
 
 There are no other registers in this range. The tcq and gcq devices can
 not be used outside of the tsadc. gcq and tcq are identical units so it
 may work to use both of them as gcq for example but nothing else.
 
 It may work to have this as single IIO device. However this would be a
 major rework of this series. There are a lot less users of imx25 than
 imx6 for example. And of these users barely anyone uses this unit at
 all. I really would like to get these drivers mainline so others can use
 it. But after 1 year and 7 versions of this series I don't want to put
 a lot of work into these drivers. I think there are other components in
 the kernel where the time is better used.
 
 Best Regards,
 
 Markus
 
I was pretty much against the IIO driver registering with input at least
where it was vaguely separable.  Pushed a few drivers in this direction.
Slightly more code, but often these devices are pretty separable (even
if like here it's two identical hardware blocks) and we normally get
a whole chunk of touch screen specific magic hardware that isn't of
general use.

It would be lovely to try and generalize some of this stuff and have
the touchscreen driver act as a client of IIO, but the
hardware is too fiddly for it to be obvious how to do it so far.

Jonathan


--
To unsubscribe from this list: send the line unsubscribe linux-input in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v7 1/8] ARM: dt: Binding documentation for imx25 ADC/TSC

2015-03-04 Thread Markus Pargmann
Hi,

On Tue, Mar 03, 2015 at 10:02:12AM +0100, Arnd Bergmann wrote:
 On Tuesday 03 March 2015 08:58:11 Markus Pargmann wrote:
  +Example:
  +   tscadc: tscadc@5003 {
  +   compatible = fsl,imx25-tsadc;
  +   reg = 0x5003 0xc;
  +   interrupts = 46;
  +   clocks = clks 119;
  +   clock-names = ipg;
  +   interrupt-controller;
  +   #interrupt-cells = 1;
  +   #address-cells = 1;
  +   #size-cells = 1;
  +   ranges;
  +
  +   tsc: tcq@50030400 {
  +   compatible = fsl,imx25-tcq;
  +   reg = 0x50030400 0x60;
  +   ...
  +   };
  +
  +   adc: gcq@50030800 {
  +   compatible = fsl,imx25-gcq;
  +   reg = 0x50030800 0x60;
  +   ...
  +   };
  +   };
  
 
 I wonder if we should just treat this MFD as a single IIO device
 that also registers to the input layer.
 
 Are there any other registers in the 0x5003-0x50031000
 range, or could the fsl,imx25-tcq and fsl,imx25-gcq devices
 be reused outside of a fsl,imx25-tsadc device?

There are no other registers in this range. The tcq and gcq devices can
not be used outside of the tsadc. gcq and tcq are identical units so it
may work to use both of them as gcq for example but nothing else.

It may work to have this as single IIO device. However this would be a
major rework of this series. There are a lot less users of imx25 than
imx6 for example. And of these users barely anyone uses this unit at
all. I really would like to get these drivers mainline so others can use
it. But after 1 year and 7 versions of this series I don't want to put
a lot of work into these drivers. I think there are other components in
the kernel where the time is better used.

Best Regards,

Markus

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |


signature.asc
Description: Digital signature


Re: [PATCH v7 1/8] ARM: dt: Binding documentation for imx25 ADC/TSC

2015-03-03 Thread Arnd Bergmann
On Tuesday 03 March 2015 08:58:11 Markus Pargmann wrote:
 +Example:
 +   tscadc: tscadc@5003 {
 +   compatible = fsl,imx25-tsadc;
 +   reg = 0x5003 0xc;
 +   interrupts = 46;
 +   clocks = clks 119;
 +   clock-names = ipg;
 +   interrupt-controller;
 +   #interrupt-cells = 1;
 +   #address-cells = 1;
 +   #size-cells = 1;
 +   ranges;
 +
 +   tsc: tcq@50030400 {
 +   compatible = fsl,imx25-tcq;
 +   reg = 0x50030400 0x60;
 +   ...
 +   };
 +
 +   adc: gcq@50030800 {
 +   compatible = fsl,imx25-gcq;
 +   reg = 0x50030800 0x60;
 +   ...
 +   };
 +   };
 

I wonder if we should just treat this MFD as a single IIO device
that also registers to the input layer.

Are there any other registers in the 0x5003-0x50031000
range, or could the fsl,imx25-tcq and fsl,imx25-gcq devices
be reused outside of a fsl,imx25-tsadc device?

Arnd
--
To unsubscribe from this list: send the line unsubscribe linux-input in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v7 1/8] ARM: dt: Binding documentation for imx25 ADC/TSC

2015-03-02 Thread Markus Pargmann
This documentation describes the devicetree bindings for the
ADC/Touchscreen unit of the i.MX25 SoC.

Signed-off-by: Markus Pargmann m...@pengutronix.de
---

Notes:
Changes in v6:
 - Removed adc-ref property and replaced it with refp and refn for positive 
and
   negative references. The properties are optional now as the default
   behaviour is a positive internal reference voltage and ADC GND as 
negative
   reference.

 .../devicetree/bindings/mfd/fsl-imx25-tsadc.txt| 46 ++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt

diff --git a/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt 
b/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt
new file mode 100644
index ..a857af0eb68c
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/fsl-imx25-tsadc.txt
@@ -0,0 +1,46 @@
+Freescale mx25 ADC/TSC multifunction device
+
+This device combines two general purpose conversion queues one used for general
+ADC and the other used for touchscreens.
+
+Required properties:
+ - compatible: Should be fsl,imx25-tsadc.
+ - reg: Memory range of the device.
+ - interrupts: Interrupt for this device as described in
+   interrupts/interrupts.txt
+ - clocks: An 'ipg' clock defined as described in clocks/clock.txt
+ - interrupt-controller: This device is an interrupt controller. It controls
+   the interrupts of both conversion queues.
+ - #interrupt-cells: Should be '1'.
+ - #address-cells: Should be '1'.
+ - #size-cells: Should be '1'.
+ - ranges
+
+This device includes two conversion queues which can be added as subnodes.
+The first queue is for the touchscreen, the second for general purpose ADC.
+
+Example:
+   tscadc: tscadc@5003 {
+   compatible = fsl,imx25-tsadc;
+   reg = 0x5003 0xc;
+   interrupts = 46;
+   clocks = clks 119;
+   clock-names = ipg;
+   interrupt-controller;
+   #interrupt-cells = 1;
+   #address-cells = 1;
+   #size-cells = 1;
+   ranges;
+
+   tsc: tcq@50030400 {
+   compatible = fsl,imx25-tcq;
+   reg = 0x50030400 0x60;
+   ...
+   };
+
+   adc: gcq@50030800 {
+   compatible = fsl,imx25-gcq;
+   reg = 0x50030800 0x60;
+   ...
+   };
+   };
-- 
2.1.4

--
To unsubscribe from this list: send the line unsubscribe linux-input in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html