Skip to content

Commit

Permalink
Merge branch 'i2c/for-3.19' 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 updates from Wolfram Sang:
 "For 3.19, the I2C subsystem has to offer special candy this time.
  Right in time for Christmas :)

   - I2C slave framework: finally, a generic mechanism for Linux being
     an I2C slave (if the bus driver supports that).  Docs are still
     missing but will come later this cycle, the code is good enough to
     go.
   - I2C muxes represent their topology in sysfs much more detailed.
     This will help users to navigate around much easier.
   - irq population of i2c clients is now done at probe time, not device
     creation time, to have better support for deferred probing.
   - new drivers for Imagination SCB, Amlogic Meson
   - DMA support added for Freescale IMX, Renesas SHMobile
   - slightly bigger driver updates to OMAP, i801, AT91, and rk3x
     (mostly quirk handling, timing updates, and using better kernel
     interfaces)
   - eeprom driver can now write with byte-access (very slow, but OK to
     have)
   - and the bunch of smaller fixes, cleanups, ID updates..."

* 'i2c/for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (56 commits)
  i2c: sh_mobile: remove unneeded DMA mask
  i2c: rcar: add slave support
  i2c: slave-eeprom: add eeprom simulator driver
  i2c: core changes for slave support
  MAINTAINERS: add I2C dt bindings also to I2C realm
  i2c: designware: Fix falling time bindings doc
  i2c: davinci: switch to use platform_get_irq
  Documentation: i2c: Use PM ops instead of legacy suspend/resume
  i2c: sh_mobile: optimize irq entry
  i2c: pxa: add support for SCCB devices
  omap: i2c: don't check bus state IP rev3.3 and earlier
  i2c: s3c2410: Handle i2c sys_cfg register in i2c driver
  i2c: rk3x: add Kconfig dependency on COMMON_CLK
  i2c: omap: add notes related to i2c multimaster mode
  i2c: omap: don't reset controller if Arbitration Lost detected
  i2c: omap: implement workaround for handling invalid BB-bit values
  i2c: omap: cleanup register definitions
  i2c: rk3x: handle dynamic clock rate changes correctly
  i2c: at91: enable probe deferring on dma channel request
  i2c: at91: remove legacy DMA support
  ...
  • Loading branch information
Linus Torvalds committed Dec 14, 2014
2 parents 8fd9589 + 6cf710d commit 9689519
Show file tree
Hide file tree
Showing 36 changed files with 3,608 additions and 187 deletions.
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/i2c/i2c-designware.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Optional properties :
- i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds.
This option is only supported in hardware blocks version 1.11a or newer.

- i2c-scl-falling-time : should contain the SCL falling time in nanoseconds.
- i2c-scl-falling-time-ns : should contain the SCL falling time in nanoseconds.
This value which is by default 300ns is used to compute the tLOW period.

- i2c-sda-falling-time : should contain the SDA falling time in nanoseconds.
- i2c-sda-falling-time-ns : should contain the SDA falling time in nanoseconds.
This value which is by default 300ns is used to compute the tHIGH period.

Example :
Expand Down
26 changes: 26 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-img-scb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
IMG Serial Control Bus (SCB) I2C Controller

Required Properties:
- compatible: "img,scb-i2c"
- reg: Physical base address and length of controller registers
- interrupts: Interrupt number used by the controller
- clocks : Should contain a clock specifier for each entry in clock-names
- clock-names : Should contain the following entries:
"scb", for the SCB core clock.
"sys", for the system clock.
- clock-frequency: The I2C bus frequency in Hz
- #address-cells: Should be <1>
- #size-cells: Should be <0>

Example:

i2c@18100000 {
compatible = "img,scb-i2c";
reg = <0x18100000 0x200>;
interrupts = <GIC_SHARED 2 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&i2c0_clk>, <&system_clk>;
clock-names = "scb", "sys";
clock-frequency = <400000>;
#address-cells = <1>;
#size-cells = <0>;
};
11 changes: 11 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-imx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Required properties:
Optional properties:
- clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz.
The absence of the propoerty indicates the default frequency 100 kHz.
- dmas: A list of two dma specifiers, one for each entry in dma-names.
- dma-names: should contain "tx" and "rx".

Examples:

Expand All @@ -26,3 +28,12 @@ i2c@70038000 { /* HS-I2C on i.MX51 */
interrupts = <64>;
clock-frequency = <400000>;
};

i2c0: i2c@40066000 { /* i2c0 on vf610 */
compatible = "fsl,vf610-i2c";
reg = <0x40066000 0x1000>;
interrupts =<0 71 0x04>;
dmas = <&edma0 0 50>,
<&edma0 0 51>;
dma-names = "rx","tx";
};
24 changes: 24 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-meson.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Amlogic Meson I2C controller

Required properties:
- compatible: must be "amlogic,meson6-i2c"
- reg: physical address and length of the device registers
- interrupts: a single interrupt specifier
- clocks: clock for the device
- #address-cells: should be <1>
- #size-cells: should be <0>

Optional properties:
- clock-frequency: the desired I2C bus clock frequency in Hz; in
absence of this property the default value is used (100 kHz).

Examples:

i2c@c8100500 {
compatible = "amlogic,meson6-i2c";
reg = <0xc8100500 0x20>;
interrupts = <0 92 1>;
clocks = <&clk81>;
#address-cells = <1>;
#size-cells = <0>;
};
14 changes: 14 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ Device tree configuration for Renesas IIC (sh_mobile) driver

Required properties:
- compatible : "renesas,iic-<soctype>". "renesas,rmobile-iic" as fallback
Examples with soctypes are:
- "renesas,iic-r8a73a4" (R-Mobile APE6)
- "renesas,iic-r8a7740" (R-Mobile A1)
- "renesas,iic-r8a7790" (R-Car H2)
- "renesas,iic-r8a7791" (R-Car M2-W)
- "renesas,iic-r8a7792" (R-Car V2H)
- "renesas,iic-r8a7793" (R-Car M2-N)
- "renesas,iic-r8a7794" (R-Car E2)
- "renesas,iic-sh73a0" (SH-Mobile AG5)
- reg : address start and address range size of device
- interrupts : interrupt of device
- clocks : clock for device
Expand All @@ -10,6 +19,11 @@ Required properties:

Optional properties:
- clock-frequency : frequency of bus clock in Hz. Default 100kHz if unset.
- dmas : Must contain a list of two references to DMA
specifiers, one for transmission, and one for
reception.
- dma-names : Must contain a list of two DMA names, "tx" and "rx".


Pinctrl properties might be needed, too. See there.

Expand Down
8 changes: 8 additions & 0 deletions Documentation/devicetree/bindings/i2c/trivial-devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ adi,adt7473 +/-1C TDM Extended Temp Range I.C
adi,adt7475 +/-1C TDM Extended Temp Range I.C
adi,adt7476 +/-1C TDM Extended Temp Range I.C
adi,adt7490 +/-1C TDM Extended Temp Range I.C
adi,adxl345 Three-Axis Digital Accelerometer
adi,adxl346 Three-Axis Digital Accelerometer
adi,adxl34x Three-Axis Digital Accelerometer
at,24c08 i2c serial eeprom (24cxx)
atmel,24c00 i2c serial eeprom (24cxx)
atmel,24c01 i2c serial eeprom (24cxx)
Expand Down Expand Up @@ -76,7 +79,12 @@ ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI an
pericom,pt7c4338 Real-time Clock Module
plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
ramtron,24c64 i2c serial eeprom (24cxx)
ricoh,r2025sd I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
ricoh,r2221tl I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
ricoh,rs5c372a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
ricoh,rs5c372b I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
ricoh,rv5c386 I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
ricoh,rv5c387a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power)
sii,s35390a 2-wire CMOS real-time clock
st-micro,24c256 i2c serial eeprom (24cxx)
Expand Down
1 change: 1 addition & 0 deletions Documentation/i2c/busses/i2c-i801
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Supported adapters:
* Intel Wildcat Point-LP (PCH)
* Intel BayTrail (SOC)
* Intel Sunrise Point-H (PCH)
* Intel Sunrise Point-LP (PCH)
Datasheets: Publicly available at the Intel website

On Intel Patsburg and later chipsets, both the normal host SMBus controller
Expand Down
6 changes: 2 additions & 4 deletions Documentation/i2c/upgrading-clients
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,10 @@ static struct i2c_driver example_driver = {
.driver = {
.owner = THIS_MODULE,
.name = "example",
.pm = &example_pm_ops,
},
.attach_adapter = example_attach_adapter,
.detach_client = example_detach,
.suspend = example_suspend,
.resume = example_resume,
};


Expand Down Expand Up @@ -272,10 +271,9 @@ static struct i2c_driver example_driver = {
.driver = {
.owner = THIS_MODULE,
.name = "example",
.pm = &example_pm_ops,
},
.id_table = example_idtable,
.probe = example_probe,
.remove = example_remove,
.suspend = example_suspend,
.resume = example_resume,
};
8 changes: 4 additions & 4 deletions Documentation/i2c/writing-clients
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ MODULE_DEVICE_TABLE(i2c, foo_idtable);
static struct i2c_driver foo_driver = {
.driver = {
.name = "foo",
.pm = &foo_pm_ops, /* optional */
},

.id_table = foo_idtable,
Expand All @@ -47,8 +48,6 @@ static struct i2c_driver foo_driver = {
.address_list = normal_i2c,

.shutdown = foo_shutdown, /* optional */
.suspend = foo_suspend, /* optional */
.resume = foo_resume, /* optional */
.command = foo_command, /* optional, deprecated */
}

Expand Down Expand Up @@ -279,8 +278,9 @@ Power Management

If your I2C device needs special handling when entering a system low
power state -- like putting a transceiver into a low power mode, or
activating a system wakeup mechanism -- do that in the suspend() method.
The resume() method should reverse what the suspend() method does.
activating a system wakeup mechanism -- do that by implementing the
appropriate callbacks for the dev_pm_ops of the driver (like suspend
and resume).

These are standard driver model calls, and they work just like they
would for any other driver stack. The calls can sleep, and can use
Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4657,6 +4657,7 @@ W: https://i2c.wiki.kernel.org/
Q: https://patchwork.ozlabs.org/project/linux-i2c/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
S: Maintained
F: Documentation/devicetree/bindings/i2c/
F: Documentation/i2c/
F: drivers/i2c/
F: include/linux/i2c.h
Expand Down
10 changes: 10 additions & 0 deletions drivers/i2c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ config I2C_STUB

If you don't know what to do here, definitely say N.

config I2C_SLAVE
bool "I2C slave support"

if I2C_SLAVE

config I2C_SLAVE_EEPROM
tristate "I2C eeprom slave driver"

endif

config I2C_DEBUG_CORE
bool "I2C Core debugging messages"
help
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o
obj-$(CONFIG_I2C_MUX) += i2c-mux.o
obj-y += algos/ busses/ muxes/
obj-$(CONFIG_I2C_STUB) += i2c-stub.o
obj-$(CONFIG_I2C_SLAVE_EEPROM) += i2c-slave-eeprom.o

ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG
CFLAGS_i2c-core.o := -Wno-deprecated-declarations
20 changes: 19 additions & 1 deletion drivers/i2c/busses/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ config I2C_I801
Wildcat Point-LP (PCH)
BayTrail (SOC)
Sunrise Point-H (PCH)
Sunrise Point-LP (PCH)

This driver can also be built as a module. If so, the module
will be called i2c-i801.
Expand Down Expand Up @@ -523,6 +524,16 @@ config I2C_IBM_IIC
This driver can also be built as a module. If so, the module
will be called i2c-ibm_iic.

config I2C_IMG
tristate "Imagination Technologies I2C SCB Controller"
depends on MIPS || METAG || COMPILE_TEST
help
Say Y here if you want to use the IMG I2C SCB controller,
available on the TZ1090 and other IMG SoCs.

This driver can also be built as a module. If so, the module
will be called i2c-img-scb.

config I2C_IMX
tristate "IMX I2C interface"
depends on ARCH_MXC
Expand Down Expand Up @@ -553,6 +564,13 @@ config I2C_KEMPLD
This driver can also be built as a module. If so, the module
will be called i2c-kempld.

config I2C_MESON
tristate "Amlogic Meson I2C controller"
depends on ARCH_MESON
help
If you say yes to this option, support will be included for the
I2C interface on the Amlogic Meson family of SoCs.

config I2C_MPC
tristate "MPC107/824x/85xx/512x/52xx/83xx/86xx"
depends on PPC
Expand Down Expand Up @@ -702,7 +720,7 @@ config I2C_RIIC

config I2C_RK3X
tristate "Rockchip RK3xxx I2C adapter"
depends on OF
depends on OF && COMMON_CLK
help
Say Y here to include support for the I2C adapter in Rockchip RK3xxx
SoCs.
Expand Down
2 changes: 2 additions & 0 deletions drivers/i2c/busses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ obj-$(CONFIG_I2C_GPIO) += i2c-gpio.o
obj-$(CONFIG_I2C_HIGHLANDER) += i2c-highlander.o
obj-$(CONFIG_I2C_HIX5HD2) += i2c-hix5hd2.o
obj-$(CONFIG_I2C_IBM_IIC) += i2c-ibm_iic.o
obj-$(CONFIG_I2C_IMG) += i2c-img-scb.o
obj-$(CONFIG_I2C_IMX) += i2c-imx.o
obj-$(CONFIG_I2C_IOP3XX) += i2c-iop3xx.o
obj-$(CONFIG_I2C_KEMPLD) += i2c-kempld.o
obj-$(CONFIG_I2C_MESON) += i2c-meson.o
obj-$(CONFIG_I2C_MPC) += i2c-mpc.o
obj-$(CONFIG_I2C_MV64XXX) += i2c-mv64xxx.o
obj-$(CONFIG_I2C_MXS) += i2c-mxs.o
Expand Down
Loading

0 comments on commit 9689519

Please sign in to comment.