mach-cpuimx35: remove unecessary tsc2007 functions + style cleanup
- remove functions which are no more necessary for tsc2007 - indent platform_data for better readability Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
bd9e310dca
commit
54dc3f4674
arch/arm/mach-mx3
|
@ -31,6 +31,7 @@
|
||||||
#include <linux/usb/otg.h>
|
#include <linux/usb/otg.h>
|
||||||
#include <linux/usb/ulpi.h>
|
#include <linux/usb/ulpi.h>
|
||||||
#include <linux/fsl_devices.h>
|
#include <linux/fsl_devices.h>
|
||||||
|
#include <linux/i2c-gpio.h>
|
||||||
|
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
@ -54,38 +55,15 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||||
|
|
||||||
static const struct imxi2c_platform_data
|
static const struct imxi2c_platform_data
|
||||||
eukrea_cpuimx35_i2c0_data __initconst = {
|
eukrea_cpuimx35_i2c0_data __initconst = {
|
||||||
.bitrate = 50000,
|
.bitrate = 100000,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TSC2007_IRQGPIO (2 * 32 + 2)
|
|
||||||
static int ts_get_pendown_state(void)
|
|
||||||
{
|
|
||||||
int val = 0;
|
|
||||||
gpio_free(TSC2007_IRQGPIO);
|
|
||||||
gpio_request(TSC2007_IRQGPIO, NULL);
|
|
||||||
gpio_direction_input(TSC2007_IRQGPIO);
|
|
||||||
|
|
||||||
val = gpio_get_value(TSC2007_IRQGPIO);
|
|
||||||
|
|
||||||
gpio_free(TSC2007_IRQGPIO);
|
|
||||||
gpio_request(TSC2007_IRQGPIO, NULL);
|
|
||||||
|
|
||||||
return val ? 0 : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ts_init(void)
|
|
||||||
{
|
|
||||||
gpio_request(TSC2007_IRQGPIO, NULL);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct tsc2007_platform_data tsc2007_info = {
|
static struct tsc2007_platform_data tsc2007_info = {
|
||||||
.model = 2007,
|
.model = 2007,
|
||||||
.x_plate_ohms = 180,
|
.x_plate_ohms = 180,
|
||||||
.get_pendown_state = ts_get_pendown_state,
|
|
||||||
.init_platform_hw = ts_init,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define TSC2007_IRQGPIO (2 * 32 + 2)
|
||||||
static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
|
static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
|
||||||
{
|
{
|
||||||
I2C_BOARD_INFO("pcf8563", 0x51),
|
I2C_BOARD_INFO("pcf8563", 0x51),
|
||||||
|
|
Loading…
Reference in New Issue