aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-2.6.34/ts72xx/0010-ts72xx_gpio_i2c.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/linux/linux-2.6.34/ts72xx/0010-ts72xx_gpio_i2c.patch')
-rw-r--r--recipes/linux/linux-2.6.34/ts72xx/0010-ts72xx_gpio_i2c.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/recipes/linux/linux-2.6.34/ts72xx/0010-ts72xx_gpio_i2c.patch b/recipes/linux/linux-2.6.34/ts72xx/0010-ts72xx_gpio_i2c.patch
new file mode 100644
index 0000000000..b984736ffc
--- /dev/null
+++ b/recipes/linux/linux-2.6.34/ts72xx/0010-ts72xx_gpio_i2c.patch
@@ -0,0 +1,58 @@
+From 93e23786cb9a055fca63f4bdfdfaeff63bae745b Mon Sep 17 00:00:00 2001
+From: Matthieu Crapet <mcrapet@gmail.com>
+Date: Sat, 19 Jun 2010 11:45:39 +0200
+Subject: [PATCH 10/18] ts72xx_gpio_i2c
+
+---
+ arch/arm/mach-ep93xx/ts72xx.c | 21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
+index 37325c4..325b7af 100644
+--- a/arch/arm/mach-ep93xx/ts72xx.c
++++ b/arch/arm/mach-ep93xx/ts72xx.c
+@@ -16,6 +16,9 @@
+ #include <linux/io.h>
+ #include <linux/m48t86.h>
+ #include <linux/mtd/physmap.h>
++#include <linux/gpio.h>
++#include <linux/i2c.h>
++#include <linux/i2c-gpio.h>
+
+ #include <mach/hardware.h>
+ #include <mach/ts72xx.h>
+@@ -225,6 +228,21 @@ static struct ep93xx_eth_data ts72xx_eth_data = {
+ .phy_id = 1,
+ };
+
++/*************************************************************************
++ * I2C (make access through TS-72XX "DIO" 2x8 header)
++ *************************************************************************/
++static struct i2c_gpio_platform_data ts72xx_i2c_gpio_data = {
++ .sda_pin = EP93XX_GPIO_LINE_EGPIO14, // DIO_6
++ .sda_is_open_drain = 0,
++ .scl_pin = EP93XX_GPIO_LINE_EGPIO15, // DIO_7
++ .scl_is_open_drain = 0,
++ .udelay = 0, /* default is 100 kHz */
++ .timeout = 0, /* default is 100 ms */
++};
++
++static struct i2c_board_info __initdata ts72xx_i2c_board_info[] = {
++};
++
+ static void __init ts72xx_init_machine(void)
+ {
+ ep93xx_init_devices();
+@@ -233,6 +251,9 @@ static void __init ts72xx_init_machine(void)
+ platform_device_register(&ts72xx_wdt_device);
+
+ ep93xx_register_eth(&ts72xx_eth_data, 1);
++ ep93xx_register_i2c(&ts72xx_i2c_gpio_data,
++ ts72xx_i2c_board_info,
++ ARRAY_SIZE(ts72xx_i2c_board_info));
+
+ /* PWM1 is DIO_6 on TS-72xx header */
+ ep93xx_register_pwm(0, 1);
+--
+1.7.1
+