From 857f727674f45157ec9a5d788c8954d9f082acb7 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 30 Jun 2011 08:31:59 +0200 Subject: staging: ste_rmi4: remove cross-dependent platform data The ux500 machine was actually defining platform data for the staging driver ste_rmi4, which is not OK. Let us instead define some __weak platform data in the machine so that the staging driver can override it at compile-time and we can thus have the driver self-contained in staging. Reported-by: Axel Lin Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ste_rmi4/Makefile | 1 + .../staging/ste_rmi4/board-mop500-u8500uib-rmi4.c | 32 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 drivers/staging/ste_rmi4/board-mop500-u8500uib-rmi4.c (limited to 'drivers/staging/ste_rmi4') diff --git a/drivers/staging/ste_rmi4/Makefile b/drivers/staging/ste_rmi4/Makefile index 6cce2ed187ef..176f46900571 100644 --- a/drivers/staging/ste_rmi4/Makefile +++ b/drivers/staging/ste_rmi4/Makefile @@ -2,3 +2,4 @@ # Makefile for the RMI4 touchscreen driver. # obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += synaptics_i2c_rmi4.o +obj-$(CONFIG_MACH_U8500) += board-mop500-u8500uib-rmi4.o diff --git a/drivers/staging/ste_rmi4/board-mop500-u8500uib-rmi4.c b/drivers/staging/ste_rmi4/board-mop500-u8500uib-rmi4.c new file mode 100644 index 000000000000..a272e488e5b9 --- /dev/null +++ b/drivers/staging/ste_rmi4/board-mop500-u8500uib-rmi4.c @@ -0,0 +1,32 @@ +/* + * Some platform data for the RMI4 touchscreen that will override the __weak + * platform data in the Ux500 machine if this driver is activated. + */ +#include +#include +#include +#include +#include +#include "synaptics_i2c_rmi4.h" + +/* + * Synaptics RMI4 touchscreen interface on the U8500 UIB + */ + +/* + * Descriptor structure. + * Describes the number of i2c devices on the bus that speak RMI. + */ +static struct synaptics_rmi4_platform_data rmi4_i2c_dev_platformdata = { + .irq_number = NOMADIK_GPIO_TO_IRQ(84), + .irq_type = (IRQF_TRIGGER_FALLING | IRQF_SHARED), + .x_flip = false, + .y_flip = true, +}; + +struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = { + { + I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B), + .platform_data = &rmi4_i2c_dev_platformdata, + }, +}; -- cgit v1.2.3-55-g7522