]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Input: ti_am335x_tsc - fix spelling mistake in TSC/ADC DT binding
authorFelipe Balbi <balbi@ti.com>
Mon, 11 Nov 2013 07:56:43 +0000 (23:56 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 11 Nov 2013 08:01:45 +0000 (00:01 -0800)
There was a spelling mistake on TSC/ADC binding where "coordinate" was
spelled as "coordiante".

We can't simply fix the error due to DT being an ABI, the approach taken
was to first use correct spelling and if that fails, fall back to
miss-spelled version.

It's unfortunate that has creeped into the tree.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
arch/arm/boot/dts/am335x-evm.dts
drivers/input/touchscreen/ti_am335x_tsc.c

index 491c97b783843c733444c60c00e0c7cf41843138..878549ba814d5d1684ff2b5a960bc1725854e3f2 100644 (file)
@@ -6,7 +6,7 @@ Required properties:
        ti,wires: Wires refer to application modes i.e. 4/5/8 wire touchscreen
                  support on the platform.
        ti,x-plate-resistance: X plate resistance
-       ti,coordiante-readouts: The sequencer supports a total of 16
+       ti,coordinate-readouts: The sequencer supports a total of 16
                                programmable steps each step is used to
                                read a single coordinate. A single
                                 readout is enough but multiple reads can
index e8ec8756e4985f2b616a2aa8da28682dbd043246..c5b73bcd368621288b511a4049fefc48632e395f 100644 (file)
@@ -509,7 +509,7 @@ &tscadc {
        tsc {
                ti,wires = <4>;
                ti,x-plate-resistance = <200>;
-               ti,coordiante-readouts = <5>;
+               ti,coordinate-readouts = <5>;
                ti,wire-config = <0x00 0x11 0x22 0x33>;
        };
 
index df9b24f7e2cb44efdb18e6b57fe4fa68562858b9..ad7564296ddfc6ed33eee9278e75489156981933 100644 (file)
@@ -348,8 +348,15 @@ static int titsc_parse_dt(struct platform_device *pdev,
        if (err < 0)
                return err;
 
-       err = of_property_read_u32(node, "ti,coordiante-readouts",
+       /*
+        * Try with the new binding first. If it fails, try again with
+        * bogus, miss-spelled version.
+        */
+       err = of_property_read_u32(node, "ti,coordinate-readouts",
                        &ts_dev->coordinate_readouts);
+       if (err < 0)
+               err = of_property_read_u32(node, "ti,coordiante-readouts",
+                               &ts_dev->coordinate_readouts);
        if (err < 0)
                return err;