Skip to contentSkip to conversation

mfd: timberdale: attach device properties to tsc2007 board info

PATCH Applied Dmitry Torokhov 2 participants 3 messages Jul 3, 2024 – Jul 11, 2024 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: timberdale: attach device properties to tsc2007 board info

Switch over to using software nodes/properties to describe the touchscreen instead of using the legacy platform data. This will allow to drop support for the platform data from tsc2007 driver and rely solely on the generic driver properties.

Note: "model" is not part of defined device propertioes and is not used by the tsc2007 driver, so it can be safely dropped.

---
 drivers/mfd/timberdale.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
drivers/mfd/timberdale.c +11 -6
index 07e5aa10a146..2fb8e850a81e 100644
@@ -12,6 +12,7 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/mfd/core.h>
+#include <linux/property.h>
 #include <linux/slab.h>
 
 #include <linux/timb_gpio.h>
@@ -25,7 +26,6 @@
 #include <linux/spi/max7301.h>
 #include <linux/spi/mc33880.h>
 
-#include <linux/platform_data/tsc2007.h>
 #include <linux/platform_data/media/timb_radio.h>
 #include <linux/platform_data/media/timb_video.h>
 
@@ -49,16 +49,21 @@ struct timberdale_device {
 
 /*--------------------------------------------------------------------------*/
 
-static struct tsc2007_platform_data timberdale_tsc2007_platform_data = {
-	.model = 2003,
-	.x_plate_ohms = 100
+static const struct property_entry timberdale_tsc2007_properties[] = {
+	PROPERTY_ENTRY_U32("ti,x-plate-ohms", 100),
+	{ }
+};
+
+static const struct software_node timberdale_tsc2007_node = {
+	.name = "tsc2007",
+	.properties = timberdale_tsc2007_properties,
 };
 
 static struct i2c_board_info timberdale_i2c_board_info[] = {
 	{
 		I2C_BOARD_INFO("tsc2007", 0x48),
-		.platform_data = &timberdale_tsc2007_platform_data,
-		.irq = IRQ_TIMBERDALE_TSC_INT
+		.irq = IRQ_TIMBERDALE_TSC_INT,
+		.swnode = &timberdale_tsc2007_node,
 	},
 };
 
Signature · 5 lines
2.45.2.803.g4e1b14247a-goog


-- 
Dmitry
maintainer Applied
#1 lore raw

Re: (subset) [PATCH] mfd: timberdale: attach device properties to tsc2007 board info

Quoted 9 lines · Dmitry Torokhov

Switch over to using software nodes/properties to describe the touchscreen instead of using the legacy platform data. This will allow to drop support for the platform data from tsc2007 driver and rely solely on the generic driver properties.

Note: "model" is not part of defined device propertioes and is not used by the tsc2007 driver, so it can be safely dropped.

[...]

Applied, thanks!

[1/1] mfd: timberdale: attach device properties to tsc2007 board info

      commit: c298391abf6505c4040632b310a14f6bd9b7afff

--
Lee Jones [李琼斯]

maintainer
#2 lore raw

Re: (subset) [PATCH] mfd: timberdale: attach device properties to tsc2007 board info

Quoted 9 lines · Lee Jones
Quoted 8 lines · Dmitry Torokhov

Switch over to using software nodes/properties to describe the touchscreen instead of using the legacy platform data. This will allow to drop support for the platform data from tsc2007 driver and rely solely on the generic driver properties.

Note: "model" is not part of defined device propertioes and is not used by the tsc2007 driver, so it can be safely dropped.

Quoted 6 lines
Quoted 1 line

[...]

Applied, thanks!

[1/1] mfd: timberdale: attach device properties to tsc2007 board info

      commit: c298391abf6505c4040632b310a14f6bd9b7afff

Remember to run spell-check on commit messages.

If fixed the issues and applied, thanks.

Signature · 1 line
Lee Jones [李琼斯]