Commit 857f7276 authored by Linus Walleij's avatar Linus Walleij Committed by Greg Kroah-Hartman

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6977a271
...@@ -12,34 +12,14 @@ ...@@ -12,34 +12,14 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/mfd/tc3589x.h> #include <linux/mfd/tc3589x.h>
#include <linux/input/matrix_keypad.h> #include <linux/input/matrix_keypad.h>
#include <../drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include "board-mop500.h" #include "board-mop500.h"
/* /* Dummy data that can be overridden by staging driver */
* Synaptics RMI4 touchscreen interface on the U8500 UIB struct i2c_board_info __initdata __weak mop500_i2c3_devices_u8500[] = {
*/
/*
* 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,
.regulator_en = false,
};
static struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = {
{
I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B),
.platform_data = &rmi4_i2c_dev_platformdata,
},
}; };
/* /*
......
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
# Makefile for the RMI4 touchscreen driver. # Makefile for the RMI4 touchscreen driver.
# #
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += synaptics_i2c_rmi4.o obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += synaptics_i2c_rmi4.o
obj-$(CONFIG_MACH_U8500) += board-mop500-u8500uib-rmi4.o
/*
* Some platform data for the RMI4 touchscreen that will override the __weak
* platform data in the Ux500 machine if this driver is activated.
*/
#include <linux/i2c.h>
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <mach/gpio.h>
#include <mach/irqs.h>
#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,
},
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment