Commit 45182e4e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull i2c updates from Wolfram Sang:

 - API for late atomic transfers (e.g. to shut down via PMIC). We have a
   seperate callback now which is called under clearly defined
   conditions. In-kernel users are converted, too.

 - new driver for the AMD PCIe MP2 I2C controller

 - large refactoring for at91 and bcm-iproc (both gain slave support due
   to this)

 - and a good share of various driver improvements anf fixes

* 'i2c/for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (57 commits)
  dt-bindings: i2c: riic: document r7s9210 support
  i2c: imx-lpi2c: Use __maybe_unused instead of #if CONFIG_PM_SLEEP
  i2c-piix4: Add Hygon Dhyana SMBus support
  i2c: core: apply 'is_suspended' check for SMBus, too
  i2c: core: ratelimit 'transfer when suspended' errors
  i2c: iproc: Change driver to use 'BIT' macro
  i2c: riic: Add Runtime PM support
  i2c: mux: demux-pinctrl: use struct_size() in devm_kzalloc()
  i2c: mux: pca954x: allow management of device idle state via sysfs
  i2c: mux: pca9541: remove support for unused platform data
  i2c: mux: pca954x: remove support for unused platform data
  dt-bindings: i2c: i2c-mtk: add support for MT8516
  i2c: axxia: use auto cmd for last message
  i2c: gpio: flag atomic capability if possible
  i2c: algo: bit: add flag to whitelist atomic transfers
  i2c: stu300: use xfer_atomic callback to bail out early
  i2c: ocores: enable atomic xfers
  i2c: ocores: refactor setup for polling
  i2c: tegra-bpmp: convert to use new atomic callbacks
  i2c: omap: Add the master_xfer_atomic hook
  ...
parents 06cbd26d e6ae3ca2
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
What:		/sys/bus/i2c/.../idle_state
Date:		January 2019
KernelVersion:	5.2
Contact:	Robert Shearman <robert.shearman@att.com>
Description:
		Value that exists only for mux devices that can be
		written to control the behaviour of the multiplexer on
		idle. Possible values:
		-2 - disconnect on idle, i.e. deselect the last used
		     channel, which is useful when there is a device
		     with an address that conflicts with another
		     device on another mux on the same parent bus.
		-1 - leave the mux as-is, which is the most optimal
		     setting in terms of I2C operations and is the
		     default mode.
		0..<nchans> - set the mux to a predetermined channel,
		     which is useful if there is one channel that is
		     used almost always, and you want to reduce the
		     latency for normal operations after rare
		     transactions on other channels
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ Required properties:

                "nxp,se97b" - the fallback is "atmel,24c02",
                "renesas,r1ex24002" - the fallback is "atmel,24c02"
                "renesas,r1ex24016" - the fallback is "atmel,24c16"
                "renesas,r1ex24128" - the fallback is "atmel,24c128"
                "rohm,br24t01" - the fallback is "atmel,24c01"

+13 −4
Original line number Diff line number Diff line
@@ -3,15 +3,12 @@ Broadcom iProc I2C controller
Required properties:

- compatible:
    Must be "brcm,iproc-i2c"
    Must be "brcm,iproc-i2c" or "brcm,iproc-nic-i2c"

- reg:
    Define the base and range of the I/O address space that contain the iProc
    I2C controller registers

- interrupts:
    Should contain the I2C interrupt

- clock-frequency:
    This is the I2C bus clock. Need to be either 100000 or 400000

@@ -21,6 +18,18 @@ Required properties:
- #size-cells:
    Always 0

Optional properties:

- interrupts:
    Should contain the I2C interrupt. For certain revisions of the I2C
    controller, I2C interrupt is unwired to the interrupt controller. In such
    case, this property should be left unspecified, and driver will fall back
    to polling mode

- brcm,ape-hsls-addr-mask:
    Required for "brcm,iproc-nic-i2c". Host view of address mask into the
    'APE' co-processor. Value must be unsigned, 32-bit

Example:
	i2c0: i2c@18008000 {
		compatible = "brcm,iproc-i2c";
+9 −0
Original line number Diff line number Diff line
@@ -6,12 +6,21 @@ Required properties :
                or "mscc,ocelot-i2c" with "snps,designware-i2c" for fallback
 - reg : Offset and length of the register set for the device
 - interrupts : <IRQ> where IRQ is the interrupt number.
 - clocks : phandles for the clocks, see the description of clock-names below.
   The phandle for the "ic_clk" clock is required. The phandle for the "pclk"
   clock is optional. If a single clock is specified but no clock-name, it is
   the "ic_clk" clock. If both clocks are listed, the "ic_clk" must be first.

Recommended properties :

 - clock-frequency : desired I2C bus clock frequency in Hz.

Optional properties :

 - clock-names : Contains the names of the clocks:
    "ic_clk", for the core clock used to generate the external I2C clock.
    "pclk", the interface clock, required for register access.

 - reg : for "mscc,ocelot-i2c", a second register set to configure the SDA hold
   time, named ICPU_CFG:TWI_DELAY in the datasheet.

+4 −1
Original line number Diff line number Diff line
@@ -12,13 +12,16 @@ Required properties:
      "mediatek,mt7623-i2c", "mediatek,mt6577-i2c": for MediaTek MT7623
      "mediatek,mt7629-i2c", "mediatek,mt2712-i2c": for MediaTek MT7629
      "mediatek,mt8173-i2c": for MediaTek MT8173
      "mediatek,mt8183-i2c": for MediaTek MT8183
      "mediatek,mt8516-i2c", "mediatek,mt2712-i2c": for MediaTek MT8516
  - reg: physical base address of the controller and dma base, length of memory
    mapped region.
  - interrupts: interrupt number to the cpu.
  - clock-div: the fixed value for frequency divider of clock source in i2c
    module. Each IC may be different.
  - clocks: clock name from clock manager
  - clock-names: Must include "main" and "dma", if enable have-pmic need include
  - clock-names: Must include "main" and "dma", "arb" is for multi-master that
    one bus has more than two i2c controllers, if enable have-pmic need include
    "pmic" extra.

Optional properties:
Loading