Commit 4008e6a9 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'i2c/for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:
 "This contains two bigger than usual tree-wide changes this time. They
  all have proper acks, caused no merge conflicts in linux-next where
  they have been for a while. They are namely:

   - to-gpiod conversion of the i2c-gpio driver and its users (touching
     arch/* and drivers/mfd/*)

   - adding a sbs-manager based on I2C core updates to SMBus alerts
     (touching drivers/power/*)

  Other notable changes:

   - i2c_boardinfo can now carry a dev_name to be used when the device
     is created. This is because some devices in ACPI world need fixed
     names to find the regulators.

   - the designware driver got a long discussed overhaul of its PM
     handling. img-scb and davinci got PM support, too.

   - at24 driver has way better OF support. And it has a new maintainer.
     Thanks Bartosz for stepping up!

  The rest is regular driver updates and fixes"

* 'i2c/fo...
parents 6aa2f944 d82e99a6
...@@ -36,6 +36,8 @@ Optional properties: ...@@ -36,6 +36,8 @@ Optional properties:
- read-only: this parameterless property disables writes to the eeprom - read-only: this parameterless property disables writes to the eeprom
- size: total eeprom size in bytes
Example: Example:
eeprom@52 { eeprom@52 {
......
...@@ -7,7 +7,9 @@ Required Properties: ...@@ -7,7 +7,9 @@ Required Properties:
- compatible : should be "aspeed,ast2400-i2c-bus" - compatible : should be "aspeed,ast2400-i2c-bus"
or "aspeed,ast2500-i2c-bus" or "aspeed,ast2500-i2c-bus"
- clocks : root clock of bus, should reference the APB - clocks : root clock of bus, should reference the APB
clock clock in the second cell
- resets : phandle to reset controller with the reset number in
the second cell
- interrupts : interrupt number - interrupts : interrupt number
- interrupt-parent : interrupt controller for bus, should reference a - interrupt-parent : interrupt controller for bus, should reference a
aspeed,ast2400-i2c-ic or aspeed,ast2500-i2c-ic aspeed,ast2400-i2c-ic or aspeed,ast2500-i2c-ic
...@@ -40,7 +42,8 @@ i2c { ...@@ -40,7 +42,8 @@ i2c {
#interrupt-cells = <1>; #interrupt-cells = <1>;
reg = <0x40 0x40>; reg = <0x40 0x40>;
compatible = "aspeed,ast2400-i2c-bus"; compatible = "aspeed,ast2400-i2c-bus";
clocks = <&clk_apb>; clocks = <&syscon ASPEED_CLK_APB>;
resets = <&syscon ASPEED_RESET_I2C>;
bus-frequency = <100000>; bus-frequency = <100000>;
interrupts = <0>; interrupts = <0>;
interrupt-parent = <&i2c_ic>; interrupt-parent = <&i2c_ic>;
......
...@@ -6,6 +6,18 @@ davinci/keystone i2c interface contains. ...@@ -6,6 +6,18 @@ davinci/keystone i2c interface contains.
Required properties: Required properties:
- compatible: "ti,davinci-i2c" or "ti,keystone-i2c"; - compatible: "ti,davinci-i2c" or "ti,keystone-i2c";
- reg : Offset and length of the register set for the device - reg : Offset and length of the register set for the device
- clocks: I2C functional clock phandle.
For 66AK2G this property should be set per binding,
Documentation/devicetree/bindings/clock/ti,sci-clk.txt
SoC-specific Required Properties:
The following are mandatory properties for Keystone 2 66AK2G SoCs only:
- power-domains: Should contain a phandle to a PM domain provider node
and an args specifier containing the I2C device id
value. This property is as per the binding,
Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
Recommended properties : Recommended properties :
- interrupts : standard interrupt property. - interrupts : standard interrupt property.
......
...@@ -2,25 +2,39 @@ Device-Tree bindings for i2c gpio driver ...@@ -2,25 +2,39 @@ Device-Tree bindings for i2c gpio driver
Required properties: Required properties:
- compatible = "i2c-gpio"; - compatible = "i2c-gpio";
- gpios: sda and scl gpio - sda-gpios: gpio used for the sda signal, this should be flagged as
active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)
from <dt-bindings/gpio/gpio.h> since the signal is by definition
open drain.
- scl-gpios: gpio used for the scl signal, this should be flagged as
active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)
from <dt-bindings/gpio/gpio.h> since the signal is by definition
open drain.
Optional properties: Optional properties:
- i2c-gpio,sda-open-drain: sda as open drain
- i2c-gpio,scl-open-drain: scl as open drain
- i2c-gpio,scl-output-only: scl as output only - i2c-gpio,scl-output-only: scl as output only
- i2c-gpio,delay-us: delay between GPIO operations (may depend on each platform) - i2c-gpio,delay-us: delay between GPIO operations (may depend on each platform)
- i2c-gpio,timeout-ms: timeout to get data - i2c-gpio,timeout-ms: timeout to get data
Deprecated properties, do not use in new device tree sources:
- gpios: sda and scl gpio, alternative for {sda,scl}-gpios
- i2c-gpio,sda-open-drain: this means that something outside of our
control has put the GPIO line used for SDA into open drain mode, and
that something is not the GPIO chip. It is essentially an
inconsistency flag.
- i2c-gpio,scl-open-drain: this means that something outside of our
control has put the GPIO line used for SCL into open drain mode, and
that something is not the GPIO chip. It is essentially an
inconsistency flag.
Example nodes: Example nodes:
#include <dt-bindings/gpio/gpio.h>
i2c@0 { i2c@0 {
compatible = "i2c-gpio"; compatible = "i2c-gpio";
gpios = <&pioA 23 0 /* sda */ sda-gpios = <&pioA 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
&pioA 24 0 /* scl */ scl-gpios = <&pioA 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
>;
i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain;
i2c-gpio,delay-us = <2>; /* ~100 kHz */ i2c-gpio,delay-us = <2>; /* ~100 kHz */
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
......
...@@ -6,10 +6,10 @@ multiplexer/switch will have one child node for each child bus. ...@@ -6,10 +6,10 @@ multiplexer/switch will have one child node for each child bus.
Optional properties: Optional properties:
- #address-cells = <1>; - #address-cells = <1>;
This property is required is the i2c-mux child node does not exist. This property is required if the i2c-mux child node does not exist.
- #size-cells = <0>; - #size-cells = <0>;
This property is required is the i2c-mux child node does not exist. This property is required if the i2c-mux child node does not exist.
- i2c-mux - i2c-mux
For i2c multiplexers/switches that have child nodes that are a mixture For i2c multiplexers/switches that have child nodes that are a mixture
......
...@@ -13,6 +13,7 @@ Required properties: ...@@ -13,6 +13,7 @@ Required properties:
"renesas,i2c-r8a7794" if the device is a part of a R8A7794 SoC. "renesas,i2c-r8a7794" if the device is a part of a R8A7794 SoC.
"renesas,i2c-r8a7795" if the device is a part of a R8A7795 SoC. "renesas,i2c-r8a7795" if the device is a part of a R8A7795 SoC.
"renesas,i2c-r8a7796" if the device is a part of a R8A7796 SoC. "renesas,i2c-r8a7796" if the device is a part of a R8A7796 SoC.
"renesas,i2c-r8a77970" if the device is a part of a R8A77970 SoC.
"renesas,rcar-gen1-i2c" for a generic R-Car Gen1 compatible device. "renesas,rcar-gen1-i2c" for a generic R-Car Gen1 compatible device.
"renesas,rcar-gen2-i2c" for a generic R-Car Gen2 or RZ/G1 compatible "renesas,rcar-gen2-i2c" for a generic R-Car Gen2 or RZ/G1 compatible
device. device.
......
...@@ -59,8 +59,8 @@ wants to support one of the below features, it should adapt the bindings below. ...@@ -59,8 +59,8 @@ wants to support one of the below features, it should adapt the bindings below.
interrupts used by the device. interrupts used by the device.
- interrupt-names - interrupt-names
"irq" and "wakeup" names are recognized by I2C core, other names are "irq", "wakeup" and "smbus_alert" names are recognized by I2C core,
left to individual drivers. other names are left to individual drivers.
- host-notify - host-notify
device uses SMBus host notify protocol instead of interrupt line. device uses SMBus host notify protocol instead of interrupt line.
......
Binding for sbs-manager
Required properties:
- compatible: "<vendor>,<part-number>", "sbs,sbs-charger" as fallback. The part
number compatible string might be used in order to take care of vendor
specific registers.
- reg: integer, i2c address of the device. Should be <0xa>.
Optional properties:
- gpio-controller: Marks the port as GPIO controller.
See "gpio-specifier" in .../devicetree/bindings/gpio/gpio.txt.
- #gpio-cells: Should be <2>. The first cell is the pin number, the second cell
is used to specify optional parameters:
See "gpio-specifier" in .../devicetree/bindings/gpio/gpio.txt.
From OS view the device is basically an i2c-mux used to communicate with up to
four smart battery devices at address 0xb. The driver actually implements this
behaviour. So standard i2c-mux nodes can be used to register up to four slave
batteries. Channels will be numerated starting from 1 to 4.
Example:
batman@a {
compatible = "lltc,ltc1760", "sbs,sbs-manager";
reg = <0x0a>;
#address-cells = <1>;
#size-cells = <0>;
gpio-controller;
#gpio-cells = <2>;
i2c@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
battery@b {
compatible = "ti,bq2060", "sbs,sbs-battery";
reg = <0x0b>;
sbs,battery-detect-gpios = <&batman 1 1>;
};
};
i2c@2 {
#address-cells = <1>;
#size-cells = <0>;
reg = <2>;
battery@b {
compatible = "ti,bq2060", "sbs,sbs-battery";
reg = <0x0b>;
sbs,battery-detect-gpios = <&batman 2 1>;
};
};
i2c@3 {
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
battery@b {
compatible = "ti,bq2060", "sbs,sbs-battery";
reg = <0x0b>;
sbs,battery-detect-gpios = <&batman 3 1>;
};
};
};
...@@ -2249,7 +2249,7 @@ F: include/linux/dmaengine.h ...@@ -2249,7 +2249,7 @@ F: include/linux/dmaengine.h
F: include/linux/async_tx.h F: include/linux/async_tx.h
AT24 EEPROM DRIVER AT24 EEPROM DRIVER
M: Wolfram Sang <wsa@the-dreams.de> M: Bartosz Golaszewski <brgl@bgdev.pl>
L: linux-i2c@vger.kernel.org L: linux-i2c@vger.kernel.org
S: Maintained S: Maintained
F: drivers/misc/eeprom/at24.c F: drivers/misc/eeprom/at24.c
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <linux/amba/serial.h> #include <linux/amba/serial.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-gpio.h> #include <linux/gpio/machine.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/irqchip/arm-vic.h> #include <linux/irqchip/arm-vic.h>
...@@ -320,42 +320,47 @@ void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr) ...@@ -320,42 +320,47 @@ void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr)
/************************************************************************* /*************************************************************************
* EP93xx i2c peripheral handling * EP93xx i2c peripheral handling
*************************************************************************/ *************************************************************************/
static struct i2c_gpio_platform_data ep93xx_i2c_data;
/* All EP93xx devices use the same two GPIO pins for I2C bit-banging */
static struct gpiod_lookup_table ep93xx_i2c_gpiod_table = {
.dev_id = "i2c-gpio",
.table = {
/* Use local offsets on gpiochip/port "G" */
GPIO_LOOKUP_IDX("G", 1, NULL, 0,
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
GPIO_LOOKUP_IDX("G", 0, NULL, 1,
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
},
};
static struct platform_device ep93xx_i2c_device = { static struct platform_device ep93xx_i2c_device = {
.name = "i2c-gpio", .name = "i2c-gpio",
.id = 0, .id = 0,
.dev = { .dev = {
.platform_data = &ep93xx_i2c_data, .platform_data = NULL,
}, },
}; };
/** /**
* ep93xx_register_i2c - Register the i2c platform device. * ep93xx_register_i2c - Register the i2c platform device.
* @data: platform specific i2c-gpio configuration (__initdata)
* @devices: platform specific i2c bus device information (__initdata) * @devices: platform specific i2c bus device information (__initdata)
* @num: the number of devices on the i2c bus * @num: the number of devices on the i2c bus
*/ */
void __init ep93xx_register_i2c(struct i2c_gpio_platform_data *data, void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num)
struct i2c_board_info *devices, int num)
{ {
/* /*
* Set the EEPROM interface pin drive type control. * FIXME: this just sets the two pins as non-opendrain, as no
* Defines the driver type for the EECLK and EEDAT pins as either * platforms tries to do that anyway. Flag the applicable lines
* open drain, which will require an external pull-up, or a normal * as open drain in the GPIO_LOOKUP above and the driver or
* CMOS driver. * gpiolib will handle open drain/open drain emulation as need
* be. Right now i2c-gpio emulates open drain which is not
* optimal.
*/ */
if (data->sda_is_open_drain && data->sda_pin != EP93XX_GPIO_LINE_EEDAT) __raw_writel((0 << 1) | (0 << 0),
pr_warning("sda != EEDAT, open drain has no effect\n");
if (data->scl_is_open_drain && data->scl_pin != EP93XX_GPIO_LINE_EECLK)
pr_warning("scl != EECLK, open drain has no effect\n");
__raw_writel((data->sda_is_open_drain << 1) |
(data->scl_is_open_drain << 0),
EP93XX_GPIO_EEDRIVE); EP93XX_GPIO_EEDRIVE);
ep93xx_i2c_data = *data;
i2c_register_board_info(0, devices, num); i2c_register_board_info(0, devices, num);
gpiod_add_lookup_table(&ep93xx_i2c_gpiod_table);
platform_device_register(&ep93xx_i2c_device); platform_device_register(&ep93xx_i2c_device);
} }
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <sound/cs4271.h> #include <sound/cs4271.h>
...@@ -61,14 +60,6 @@ static struct ep93xx_eth_data __initdata edb93xx_eth_data = { ...@@ -61,14 +60,6 @@ static struct ep93xx_eth_data __initdata edb93xx_eth_data = {
/************************************************************************* /*************************************************************************
* EDB93xx i2c peripheral handling * EDB93xx i2c peripheral handling
*************************************************************************/ *************************************************************************/
static struct i2c_gpio_platform_data __initdata edb93xx_i2c_gpio_data = {
.sda_pin = EP93XX_GPIO_LINE_EEDAT,
.sda_is_open_drain = 0,
.scl_pin = EP93XX_GPIO_LINE_EECLK,
.scl_is_open_drain = 0,
.udelay = 0, /* default to 100 kHz */
.timeout = 0, /* default to 100 ms */
};
static struct i2c_board_info __initdata edb93xxa_i2c_board_info[] = { static struct i2c_board_info __initdata edb93xxa_i2c_board_info[] = {
{ {
...@@ -86,13 +77,11 @@ static void __init edb93xx_register_i2c(void) ...@@ -86,13 +77,11 @@ static void __init edb93xx_register_i2c(void)
{ {
if (machine_is_edb9302a() || machine_is_edb9307a() || if (machine_is_edb9302a() || machine_is_edb9307a() ||
machine_is_edb9315a()) { machine_is_edb9315a()) {
ep93xx_register_i2c(&edb93xx_i2c_gpio_data, ep93xx_register_i2c(edb93xxa_i2c_board_info,
edb93xxa_i2c_board_info,
ARRAY_SIZE(edb93xxa_i2c_board_info)); ARRAY_SIZE(edb93xxa_i2c_board_info));
} else if (machine_is_edb9302() || machine_is_edb9307() } else if (machine_is_edb9302() || machine_is_edb9307()
|| machine_is_edb9312() || machine_is_edb9315()) { || machine_is_edb9312() || machine_is_edb9315()) {
ep93xx_register_i2c(&edb93xx_i2c_gpio_data, ep93xx_register_i2c(edb93xx_i2c_board_info,
edb93xx_i2c_board_info,
ARRAY_SIZE(edb93xx_i2c_board_info)); ARRAY_SIZE(edb93xx_i2c_board_info));
} }
} }
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <linux/reboot.h> #include <linux/reboot.h>
struct device; struct device;
struct i2c_gpio_platform_data;
struct i2c_board_info; struct i2c_board_info;
struct spi_board_info; struct spi_board_info;
struct platform_device; struct platform_device;
...@@ -37,8 +36,7 @@ void ep93xx_register_flash(unsigned int width, ...@@ -37,8 +36,7 @@ void ep93xx_register_flash(unsigned int width,
resource_size_t start, resource_size_t size); resource_size_t start, resource_size_t size);
void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr);
void ep93xx_register_i2c(struct i2c_gpio_platform_data *data, void ep93xx_register_i2c(struct i2c_board_info *devices, int num);
struct i2c_board_info *devices, int num);
void ep93xx_register_spi(struct ep93xx_spi_info *info, void ep93xx_register_spi(struct ep93xx_spi_info *info,
struct spi_board_info *devices, int num); struct spi_board_info *devices, int num);
void ep93xx_register_fb(struct ep93xxfb_mach_info *data); void ep93xx_register_fb(struct ep93xxfb_mach_info *data);
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/mmc_spi.h> #include <linux/spi/mmc_spi.h>
...@@ -129,15 +128,6 @@ static struct ep93xx_spi_info simone_spi_info __initdata = { ...@@ -129,15 +128,6 @@ static struct ep93xx_spi_info simone_spi_info __initdata = {
.use_dma = 1, .use_dma = 1,
}; };
static struct i2c_gpio_platform_data __initdata simone_i2c_gpio_data = {
.sda_pin = EP93XX_GPIO_LINE_EEDAT,
.sda_is_open_drain = 0,
.scl_pin = EP93XX_GPIO_LINE_EECLK,
.scl_is_open_drain = 0,
.udelay = 0,
.timeout = 0,
};
static struct i2c_board_info __initdata simone_i2c_board_info[] = { static struct i2c_board_info __initdata simone_i2c_board_info[] = {
{ {
I2C_BOARD_INFO("ds1337", 0x68), I2C_BOARD_INFO("ds1337", 0x68),
...@@ -161,7 +151,7 @@ static void __init simone_init_machine(void) ...@@ -161,7 +151,7 @@ static void __init simone_init_machine(void)
ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_8M); ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_8M);
ep93xx_register_eth(&simone_eth_data, 1); ep93xx_register_eth(&simone_eth_data, 1);
ep93xx_register_fb(&simone_fb_info); ep93xx_register_fb(&simone_fb_info);
ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info, ep93xx_register_i2c(simone_i2c_board_info,
ARRAY_SIZE(simone_i2c_board_info)); ARRAY_SIZE(simone_i2c_board_info));
ep93xx_register_spi(&simone_spi_info, simone_spi_devices, ep93xx_register_spi(&simone_spi_info, simone_spi_devices,
ARRAY_SIZE(simone_spi_devices)); ARRAY_SIZE(simone_spi_devices));
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
...@@ -127,15 +126,6 @@ static struct ep93xx_eth_data __initdata snappercl15_eth_data = { ...@@ -127,15 +126,6 @@ static struct ep93xx_eth_data __initdata snappercl15_eth_data = {
.phy_id = 1, .phy_id = 1,
}; };
static struct i2c_gpio_platform_data __initdata snappercl15_i2c_gpio_data = {
.sda_pin = EP93XX_GPIO_LINE_EEDAT,
.sda_is_open_drain = 0,
.scl_pin = EP93XX_GPIO_LINE_EECLK,
.scl_is_open_drain = 0,
.udelay = 0,
.timeout = 0,
};
static struct i2c_board_info __initdata snappercl15_i2c_data[] = { static struct i2c_board_info __initdata snappercl15_i2c_data[] = {
{ {
/* Audio codec */ /* Audio codec */
...@@ -161,7 +151,7 @@ static void __init snappercl15_init_machine(void) ...@@ -161,7 +151,7 @@ static void __init snappercl15_init_machine(void)
{ {
ep93xx_init_devices(); ep93xx_init_devices();
ep93xx_register_eth(&snappercl15_eth_data, 1); ep93xx_register_eth(&snappercl15_eth_data, 1);
ep93xx_register_i2c(&snappercl15_i2c_gpio_data, snappercl15_i2c_data, ep93xx_register_i2c(snappercl15_i2c_data,
ARRAY_SIZE(snappercl15_i2c_data)); ARRAY_SIZE(snappercl15_i2c_data));
ep93xx_register_fb(&snappercl15_fb_info); ep93xx_register_fb(&snappercl15_fb_info);
snappercl15_register_audio(); snappercl15_register_audio();
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <linux/platform_data/pca953x.h> #include <linux/platform_data/pca953x.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
...@@ -144,10 +143,6 @@ static struct pca953x_platform_data pca953x_77_gpio_data = { ...@@ -144,10 +143,6 @@ static struct pca953x_platform_data pca953x_77_gpio_data = {
/************************************************************************* /*************************************************************************
* I2C Bus * I2C Bus
*************************************************************************/ *************************************************************************/
static struct i2c_gpio_platform_data vision_i2c_gpio_data __initdata = {
.sda_pin = EP93XX_GPIO_LINE_EEDAT,
.scl_pin = EP93XX_GPIO_LINE_EECLK,
};
static struct i2c_board_info vision_i2c_info[] __initdata = { static struct i2c_board_info vision_i2c_info[] __initdata = {
{ {
...@@ -289,7 +284,7 @@ static void __init vision_init_machine(void) ...@@ -289,7 +284,7 @@ static void __init vision_init_machine(void)
vision_i2c_info[1].irq = gpio_to_irq(EP93XX_GPIO_LINE_F(7)); vision_i2c_info[1].irq = gpio_to_irq(EP93XX_GPIO_LINE_F(7));
ep93xx_register_i2c(&vision_i2c_gpio_data, vision_i2c_info, ep93xx_register_i2c(vision_i2c_info,
ARRAY_SIZE(vision_i2c_info)); ARRAY_SIZE(vision_i2c_info));
ep93xx_register_spi(&vision_spi_master, vision_spi_board_info, ep93xx_register_spi(&vision_spi_master, vision_spi_board_info,
ARRAY_SIZE(vision_spi_board_info)); ARRAY_SIZE(vision_spi_board_info));
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/i2c-gpio.h> #include <linux/gpio/machine.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/memory.h> #include <asm/memory.h>
...@@ -50,16 +50,21 @@ static struct platform_device avila_flash = { ...@@ -50,16 +50,21 @@ static struct platform_device avila_flash = {
.resource = &avila_flash_resource, .resource = &avila_flash_resource,
}; };