Skip to content

Commit c298391

Browse files
dtorlag-linaro
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 70b4648 commit c298391

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

drivers/mfd/timberdale.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/module.h>
1313
#include <linux/pci.h>
1414
#include <linux/mfd/core.h>
15+
#include <linux/property.h>
1516
#include <linux/slab.h>
1617

1718
#include <linux/timb_gpio.h>
@@ -25,7 +26,6 @@
2526
#include <linux/spi/max7301.h>
2627
#include <linux/spi/mc33880.h>
2728

28-
#include <linux/platform_data/tsc2007.h>
2929
#include <linux/platform_data/media/timb_radio.h>
3030
#include <linux/platform_data/media/timb_video.h>
3131

@@ -49,16 +49,21 @@ struct timberdale_device {
4949

5050
/*--------------------------------------------------------------------------*/
5151

52-
static struct tsc2007_platform_data timberdale_tsc2007_platform_data = {
53-
.model = 2003,
54-
.x_plate_ohms = 100
52+
static const struct property_entry timberdale_tsc2007_properties[] = {
53+
PROPERTY_ENTRY_U32("ti,x-plate-ohms", 100),
54+
{ }
55+
};
56+
57+
static const struct software_node timberdale_tsc2007_node = {
58+
.name = "tsc2007",
59+
.properties = timberdale_tsc2007_properties,
5560
};
5661

5762
static struct i2c_board_info timberdale_i2c_board_info[] = {
5863
{
5964
I2C_BOARD_INFO("tsc2007", 0x48),
60-
.platform_data = &timberdale_tsc2007_platform_data,
61-
.irq = IRQ_TIMBERDALE_TSC_INT
65+
.irq = IRQ_TIMBERDALE_TSC_INT,
66+
.swnode = &timberdale_tsc2007_node,
6267
},
6368
};
6469

0 commit comments

Comments
 (0)