Thread (73 messages) 73 messages, 5 authors, 2021-09-28

Re: [PATCH v3 36/47] mfd: ti_am335x_tscadc: Support the correctly spelled DT property

From: Lee Jones <hidden>
Date: 2021-09-23 09:11:29
Also in: linux-iio, linux-omap

On Thu, 23 Sep 2021, Miquel Raynal wrote:
Hi Lee,

lee.jones@linaro.org wrote on Wed, 22 Sep 2021 16:57:10 +0100:
quoted
On Wed, 15 Sep 2021, Miquel Raynal wrote:
quoted
There was in the past a typo in the coordinate readouts property. The
bindings have been updated, the touchscreen driver as well and now
supports both. However, the MFD driver that is in charge of verifying
the validity of the property only checks the bogus one. Add support for
the correctly spelled DT property.

Fixes: c9aeb249bf72 ("Input: ti_am335x_tsc - fix spelling mistake in TSC/ADC DT binding")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/mfd/ti_am335x_tscadc.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index 155a8ed879b3..aa46ed669016 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -144,8 +144,14 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
 	if (tscadc->data->has_tsc) {
 		node = of_get_child_by_name(pdev->dev.of_node, "tsc");
 		of_property_read_u32(node, "ti,wires", &tscmag_wires);
-		of_property_read_u32(node, "ti,coordiante-readouts", &readouts);
+		err = of_property_read_u32(node, "ti,coordinate-readouts",
+					   &readouts);
+		if (err < 0)
+			of_property_read_u32(node, "ti,coordiante-readouts",
+					     &readouts);
+  
How long are you proposing that we support this churn?
Well, I am not proposing anything, I am just "fixing" the driver so
that it fits the bindings :) Given the fact that at the end of this
series there is a patch that changes the "coordiante" typo to
"coordinate" in a device tree source file, I believe it is still too
soon...
If this is something you're changing in this set, please reconsider.

I'd rather have a slightly misspelled documented property than being
forced to support 2 for any length of time.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help