Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: ti_am335x_tsc - fix spelling mistake in TSC/ADC DT binding

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>

authored by

Felipe Balbi and committed by
Dmitry Torokhov
c9aeb249 a0137817

+10 -3
+1 -1
Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
··· 6 6 ti,wires: Wires refer to application modes i.e. 4/5/8 wire touchscreen 7 7 support on the platform. 8 8 ti,x-plate-resistance: X plate resistance 9 - ti,coordiante-readouts: The sequencer supports a total of 16 9 + ti,coordinate-readouts: The sequencer supports a total of 16 10 10 programmable steps each step is used to 11 11 read a single coordinate. A single 12 12 readout is enough but multiple reads can
+1 -1
arch/arm/boot/dts/am335x-evm.dts
··· 509 509 tsc { 510 510 ti,wires = <4>; 511 511 ti,x-plate-resistance = <200>; 512 - ti,coordiante-readouts = <5>; 512 + ti,coordinate-readouts = <5>; 513 513 ti,wire-config = <0x00 0x11 0x22 0x33>; 514 514 }; 515 515
+8 -1
drivers/input/touchscreen/ti_am335x_tsc.c
··· 348 348 if (err < 0) 349 349 return err; 350 350 351 - err = of_property_read_u32(node, "ti,coordiante-readouts", 351 + /* 352 + * Try with the new binding first. If it fails, try again with 353 + * bogus, miss-spelled version. 354 + */ 355 + err = of_property_read_u32(node, "ti,coordinate-readouts", 352 356 &ts_dev->coordinate_readouts); 357 + if (err < 0) 358 + err = of_property_read_u32(node, "ti,coordiante-readouts", 359 + &ts_dev->coordinate_readouts); 353 360 if (err < 0) 354 361 return err; 355 362