From: Dmitry Torokhov Date: Wed, 3 Jul 2024 19:05:23 +0000 (-0700) Subject: mfd: timberdale: Attach device properties to TSC2007 board info X-Git-Tag: v6.11-rc1~147^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c298391abf6505c4040632b310a14f6bd9b7afff;p=thirdparty%2Fkernel%2Flinux.git 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 properties and is not used by the TSC2007 driver, so it can be safely dropped. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/ZoWg89A8C4gylTGX@google.com Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index 333d5b874de34..b059713db875f 100644 --- a/drivers/mfd/timberdale.c +++ b/drivers/mfd/timberdale.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -25,7 +26,6 @@ #include #include -#include #include #include @@ -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, }, };