Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4008e6a9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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/for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (55 commits)
  ARM: sa1100: simpad: Correct I2C GPIO offsets
  i2c: aspeed: Deassert reset in probe
  eeprom: at24: Add OF device ID table
  MAINTAINERS: new maintainer for AT24 driver
  i2c: nuc900: remove platform_data, too
  i2c: thunderx: Remove duplicate NULL check
  i2c: taos-evm: Remove duplicate NULL check
  i2c: Make i2c_unregister_device() NULL-aware
  i2c: xgene-slimpro: Support v2
  i2c: mpc: remove useless variable initialization
  i2c: omap: Trigger bus recovery in lockup case
  i2c: gpio: Add support for named gpios in DT
  dt-bindings: i2c: i2c-gpio: Add support for named gpios
  i2c: gpio: Local vars in probe
  i2c: gpio: Augment all boardfiles to use open drain
  i2c: gpio: Enforce open drain through gpiolib
  gpio: Make it possible for consumers to enforce open drain
  i2c: gpio: Convert to use descriptors
  power: supply: sbs-message: fix some code style issues
  power: supply: sbs-battery: remove unchecked return var
  ...
parents 6aa2f944 d82e99a6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ Optional properties:

  - read-only: this parameterless property disables writes to the eeprom

  - size: total eeprom size in bytes

Example:

eeprom@52 {
+5 −2
Original line number Diff line number Diff line
@@ -7,7 +7,9 @@ Required Properties:
- compatible		: should be "aspeed,ast2400-i2c-bus"
			  or "aspeed,ast2500-i2c-bus"
- 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
- interrupt-parent	: interrupt controller for bus, should reference a
			  aspeed,ast2400-i2c-ic or aspeed,ast2500-i2c-ic
@@ -40,7 +42,8 @@ i2c {
		#interrupt-cells = <1>;
		reg = <0x40 0x40>;
		compatible = "aspeed,ast2400-i2c-bus";
		clocks = <&clk_apb>;
		clocks = <&syscon ASPEED_CLK_APB>;
		resets = <&syscon ASPEED_RESET_I2C>;
		bus-frequency = <100000>;
		interrupts = <0>;
		interrupt-parent = <&i2c_ic>;
+12 −0
Original line number Diff line number Diff line
@@ -6,6 +6,18 @@ davinci/keystone i2c interface contains.
Required properties:
- compatible: "ti,davinci-i2c" or "ti,keystone-i2c";
- 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 :
- interrupts : standard interrupt property.
+23 −9
Original line number Diff line number Diff line
@@ -2,25 +2,39 @@ Device-Tree bindings for i2c gpio driver

Required properties:
	- 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:
	- 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,delay-us: delay between GPIO operations (may depend on each platform)
	- 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:

#include <dt-bindings/gpio/gpio.h>

i2c@0 {
	compatible = "i2c-gpio";
	gpios = <&pioA 23 0 /* sda */
		 &pioA 24 0 /* scl */
		>;
	i2c-gpio,sda-open-drain;
	i2c-gpio,scl-open-drain;
	sda-gpios = <&pioA 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
	scl-gpios = <&pioA 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
	i2c-gpio,delay-us = <2>;	/* ~100 kHz */
	#address-cells = <1>;
	#size-cells = <0>;
+2 −2
Original line number Diff line number Diff line
@@ -6,10 +6,10 @@ multiplexer/switch will have one child node for each child bus.

Optional properties:
- #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>;
   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
   For i2c multiplexers/switches that have child nodes that are a mixture
Loading