Skip to content

Commit

Permalink
Input: ti_am335x_tsc - fix spelling mistake in TSC/ADC DT binding
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi authored and Dmitry Torokhov committed Nov 11, 2013
1 parent a013781 commit c9aeb24
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/am335x-evm.dts
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@
tsc {
ti,wires = <4>;
ti,x-plate-resistance = <200>;
ti,coordiante-readouts = <5>;
ti,coordinate-readouts = <5>;
ti,wire-config = <0x00 0x11 0x22 0x33>;
};

Expand Down
9 changes: 8 additions & 1 deletion drivers/input/touchscreen/ti_am335x_tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c9aeb24

Please sign in to comment.