Skip to content

Commit

Permalink
Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/wsa/linux

Pull i2c changes from Wolfram Sang:
 - new drivers for exynos5, bcm kona, and st micro
 - bigger overhauls for drivers mxs and rcar
 - typical driver bugfixes, cleanups, improvements
 - got rid of the superfluous 'driver' member in i2c_client struct This
   touches a few drivers in other subsystems.  All acked.

* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits)
  i2c: bcm-kona: fix error return code in bcm_kona_i2c_probe()
  i2c: i2c-eg20t: do not print error message in syslog if no ACK received
  i2c: bcm-kona: Introduce Broadcom I2C Driver
  i2c: cbus-gpio: Fix device tree binding
  i2c: wmt: add missing clk_disable_unprepare() on error
  i2c: designware: add new ACPI IDs
  i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCH
  i2c: exynos5: Remove incorrect clk_disable_unprepare
  i2c: i2c-st: Add ST I2C controller
  i2c: exynos5: add High Speed I2C controller driver
  i2c: rcar: fixup rcar type naming
  i2c: scmi: remove some bogus NULL checks
  i2c: sh_mobile & rcar: Enable the driver on all ARM platforms
  i2c: sh_mobile: Convert to clk_prepare/unprepare
  i2c: mux: gpio: use reg value for i2c_add_mux_adapter
  i2c: mux: gpio: use gpio_set_value_cansleep()
  i2c: Include linux/of.h header
  i2c: mxs: Fix PIO mode on i.MX23
  i2c: mxs: Rework the PIO mode operation
  i2c: mxs: distinguish i.MX23 and i.MX28 based I2C controller
  ...
  • Loading branch information
torvalds committed Nov 18, 2013
2 parents 1ea406c + cfff1f4 commit 13509c3
Show file tree
Hide file tree
Showing 66 changed files with 3,108 additions and 241 deletions.
35 changes: 35 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-bcm-kona.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Broadcom Kona Family I2C
=========================

This I2C controller is used in the following Broadcom SoCs:

BCM11130
BCM11140
BCM11351
BCM28145
BCM28155

Required Properties
-------------------
- compatible: "brcm,bcm11351-i2c", "brcm,kona-i2c"
- reg: Physical base address and length of controller registers
- interrupts: The interrupt number used by the controller
- clocks: clock specifier for the kona i2c external clock
- clock-frequency: The I2C bus frequency in Hz
- #address-cells: Should be <1>
- #size-cells: Should be <0>

Refer to clocks/clock-bindings.txt for generic clock consumer
properties.

Example:

i2c@3e016000 {
compatible = "brcm,bcm11351-i2c","brcm,kona-i2c";
reg = <0x3e016000 0x80>;
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&bsc1_clk>;
clock-frequency = <400000>;
#address-cells = <1>;
#size-cells = <0>;
};
44 changes: 44 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
* Samsung's High Speed I2C controller

The Samsung's High Speed I2C controller is used to interface with I2C devices
at various speeds ranging from 100khz to 3.4Mhz.

Required properties:
- compatible: value should be.
-> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: interrupt number to the cpu.
- #address-cells: always 1 (for i2c addresses)
- #size-cells: always 0

- Pinctrl:
- pinctrl-0: Pin control group to be used for this controller.
- pinctrl-names: Should contain only one value - "default".

Optional properties:
- clock-frequency: Desired operating frequency in Hz of the bus.
-> If not specified, the bus operates in fast-speed mode at
at 100khz.
-> If specified, the bus operates in high-speed mode only if the
clock-frequency is >= 1Mhz.

Example:

hsi2c@12ca0000 {
compatible = "samsung,exynos5-hsi2c";
reg = <0x12ca0000 0x100>;
interrupts = <56>;
clock-frequency = <100000>;

pinctrl-0 = <&i2c4_bus>;
pinctrl-names = "default";

#address-cells = <1>;
#size-cells = <0>;

s2mps11_pmic@66 {
compatible = "samsung,s2mps11-pmic";
reg = <0x66>;
};
};
23 changes: 23 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-rcar.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
I2C for R-Car platforms

Required properties:
- compatible: Must be one of
"renesas,i2c-rcar"
"renesas,i2c-r8a7778"
"renesas,i2c-r8a7779"
"renesas,i2c-r8a7790"
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: interrupt specifier.

Optional properties:
- clock-frequency: desired I2C bus clock frequency in Hz. The absence of this
propoerty indicates the default frequency 100 kHz.

Examples :

i2c0: i2c@e6500000 {
compatible = "renesas,i2c-rcar-h2";
reg = <0 0xe6500000 0 0x428>;
interrupts = <0 174 0x4>;
};
41 changes: 41 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-st.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
ST SSC binding, for I2C mode operation

Required properties :
- compatible : Must be "st,comms-ssc-i2c" or "st,comms-ssc4-i2c"
- reg : Offset and length of the register set for the device
- interrupts : the interrupt specifier
- clock-names: Must contain "ssc".
- clocks: Must contain an entry for each name in clock-names. See the common
clock bindings.
- A pinctrl state named "default" must be defined to set pins in mode of
operation for I2C transfer.

Optional properties :
- clock-frequency : Desired I2C bus clock frequency in Hz. If not specified,
the default 100 kHz frequency will be used. As only Normal and Fast modes
are supported, possible values are 100000 and 400000.
- st,i2c-min-scl-pulse-width-us : The minimum valid SCL pulse width that is
allowed through the deglitch circuit. In units of us.
- st,i2c-min-sda-pulse-width-us : The minimum valid SDA pulse width that is
allowed through the deglitch circuit. In units of us.
- A pinctrl state named "idle" could be defined to set pins in idle state
when I2C instance is not performing a transfer.
- A pinctrl state named "sleep" could be defined to set pins in sleep state
when driver enters in suspend.



Example :

i2c0: i2c@fed40000 {
compatible = "st,comms-ssc4-i2c";
reg = <0xfed40000 0x110>;
interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&CLK_S_ICN_REG_0>;
clock-names = "ssc";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c0_default>;
st,i2c-min-scl-pulse-width-us = <0>;
st,i2c-min-sda-pulse-width-us = <5>;
};
1 change: 1 addition & 0 deletions Documentation/i2c/busses/i2c-i801
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Supported adapters:
* Intel Avoton (SOC)
* Intel Wellsburg (PCH)
* Intel Coleto Creek (PCH)
* Intel Wildcat Point-LP (PCH)
Datasheets: Publicly available at the Intel website

On Intel Patsburg and later chipsets, both the normal host SMBus controller
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ M: Wolfram Sang <[email protected]>
L: [email protected]
S: Maintained
F: drivers/misc/eeprom/at24.c
F: include/linux/i2c/at24.h
F: include/linux/platform_data/at24.h

ATA OVER ETHERNET (AOE) DRIVER
M: "Ed L. Cashin" <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/board-sam9260ek.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <linux/spi/spi.h>
#include <linux/spi/at73c213.h>
#include <linux/clk.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/board-sam9263ek.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/fb.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/board-da830-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/i2c/pcf857x.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/board-da850-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/platform_data/pca953x.h>
#include <linux/input.h>
#include <linux/input/tps6507x-ts.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/board-dm365-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <linux/i2c.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/leds.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/board-dm644x-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/i2c/pcf857x.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/board-dm646x-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/i2c/pcf857x.h>

#include <media/tvp514x.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/board-mityomapl138.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <linux/mtd/partitions.h>
#include <linux/regulator/machine.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/etherdevice.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/board-sffsdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/mach-pca100.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/dma-mapping.h>
#include <linux/spi/spi.h>
#include <linux/spi/eeprom.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/mach-pcm037.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <linux/smsc911x.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/delay.h>
#include <linux/spi/spi.h>
#include <linux/irq.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/mach-pcm038.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/io.h>
#include <linux/mtd/plat-ram.h>
#include <linux/mtd/physmap.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/mach-pcm043.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/usb/otg.h>
#include <linux/usb/ulpi.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/mach-vpr200.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <asm/mach/time.h>

#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/mfd/mc13xxx.h>

#include "common.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-kirkwood/lacie_v2-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <linux/spi/flash.h>
#include <linux/spi/spi.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/gpio.h>
#include <asm/mach/time.h>
#include <mach/kirkwood.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-osk.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ static struct omap_lcd_config osk_lcd_config __initdata = {
#ifdef CONFIG_OMAP_OSK_MISTRAL

#include <linux/input.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-cm-t35.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/gpio.h>
#include <linux/platform_data/gpio-omap.h>

#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/i2c/twl.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <linux/delay.h>
#include <linux/workqueue.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/input.h>
#include <linux/err.h>
#include <linux/clk.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-omap3stalker.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <linux/spi/spi.h>
#include <linux/interrupt.h>
#include <linux/smsc911x.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/usb/phy.h>

#include <asm/mach-types.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/stargate2.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include <linux/i2c/pxa-i2c.h>
#include <linux/i2c/pcf857x.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/smc91x.h>
#include <linux/gpio.h>
#include <linux/leds.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c24xx/mach-mini2440.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <linux/io.h>
#include <linux/serial_core.h>
#include <linux/dm9000.h>
#include <linux/i2c/at24.h>
#include <linux/platform_data/at24.h>
#include <linux/platform_device.h>
#include <linux/gpio_keys.h>
#include <linux/i2c.h>
Expand Down
8 changes: 4 additions & 4 deletions drivers/gpu/drm/drm_encoder_slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,20 @@ int drm_i2c_encoder_init(struct drm_device *dev,
goto fail;
}

if (!client->driver) {
if (!client->dev.driver) {
err = -ENODEV;
goto fail_unregister;
}

module = client->driver->driver.owner;
module = client->dev.driver->owner;
if (!try_module_get(module)) {
err = -ENODEV;
goto fail_unregister;
}

encoder->bus_priv = client;

encoder_drv = to_drm_i2c_encoder_driver(client->driver);
encoder_drv = to_drm_i2c_encoder_driver(to_i2c_driver(client->dev.driver));

err = encoder_drv->encoder_init(client, dev, encoder);
if (err)
Expand Down Expand Up @@ -111,7 +111,7 @@ void drm_i2c_encoder_destroy(struct drm_encoder *drm_encoder)
{
struct drm_encoder_slave *encoder = to_encoder_slave(drm_encoder);
struct i2c_client *client = drm_i2c_encoder_get_client(drm_encoder);
struct module *module = client->driver->driver.owner;
struct module *module = client->dev.driver->owner;

i2c_unregister_device(client);
encoder->bus_priv = NULL;
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/therm/ic.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ probe_monitoring_device(struct nouveau_i2c_port *i2c,
if (!client)
return false;

if (!client->driver || client->driver->detect(client, info)) {
if (!client->dev.driver ||
to_i2c_driver(client->dev.driver)->detect(client, info)) {
i2c_unregister_device(client);
return false;
}
Expand Down
Loading

0 comments on commit 13509c3

Please sign in to comment.