Skip to content

Commit

Permalink
Merge tag 'i2c-for-6.10-rc1' of git:https://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/wsa/linux

Pull i2c updates from Wolfram Sang:
 "i2c core removes an argument from the i2c_mux_add_adapter() call to
  further deprecate class based I2C device instantiation. All users are
  converted, too.

  Other that that, Andi collected a number if I2C host driver patches.
  Those merges have their own description"

* tag 'i2c-for-6.10-rc1' of git:https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (72 commits)
  power: supply: sbs-manager: Remove class argument from i2c_mux_add_adapter()
  i2c: mux: Remove class argument from i2c_mux_add_adapter()
  i2c: synquacer: Fix an error handling path in synquacer_i2c_probe()
  i2c: acpi: Unbind mux adapters before delete
  i2c: designware: Replace MODULE_ALIAS() with MODULE_DEVICE_TABLE()
  i2c: pxa: use 'time_left' variable with wait_event_timeout()
  i2c: s3c2410: use 'time_left' variable with wait_event_timeout()
  i2c: rk3x: use 'time_left' variable with wait_event_timeout()
  i2c: qcom-geni: use 'time_left' variable with wait_for_completion_timeout()
  i2c: jz4780: use 'time_left' variable with wait_for_completion_timeout()
  i2c: synquacer: use 'time_left' variable with wait_for_completion_timeout()
  i2c: stm32f7: use 'time_left' variable with wait_for_completion_timeout()
  i2c: stm32f4: use 'time_left' variable with wait_for_completion_timeout()
  i2c: st: use 'time_left' variable with wait_for_completion_timeout()
  i2c: omap: use 'time_left' variable with wait_for_completion_timeout()
  i2c: imx-lpi2c: use 'time_left' variable with wait_for_completion_timeout()
  i2c: hix5hd2: use 'time_left' variable with wait_for_completion_timeout()
  i2c: exynos5: use 'time_left' variable with wait_for_completion_timeout()
  i2c: digicolor: use 'time_left' variable with wait_for_completion_timeout()
  i2c: amd-mp2-plat: use 'time_left' variable with wait_for_completion_timeout()
  ...
  • Loading branch information
torvalds committed May 20, 2024
2 parents 2de6863 + 068a95e commit 0a07e09
Show file tree
Hide file tree
Showing 79 changed files with 1,340 additions and 798 deletions.
34 changes: 0 additions & 34 deletions Documentation/devicetree/bindings/i2c/i2c-pnx.txt

This file was deleted.

46 changes: 46 additions & 0 deletions Documentation/devicetree/bindings/i2c/nxp,pnx-i2c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: https://devicetree.org/schemas/i2c/nxp,pnx-i2c.yaml#
$schema: https://devicetree.org/meta-schemas/core.yaml#

title: NXP PNX I2C Controller

maintainers:
- Animesh Agarwal <[email protected]>

allOf:
- $ref: /schemas/i2c/i2c-controller.yaml#

properties:
compatible:
const: nxp,pnx-i2c

reg:
maxItems: 1

interrupts:
maxItems: 1

clock-frequency:
default: 100000

required:
- compatible
- reg
- interrupts
- "#address-cells"
- "#size-cells"

unevaluatedProperties: false

examples:
- |
i2c@400a0000 {
compatible = "nxp,pnx-i2c";
reg = <0x400a0000 0x100>;
interrupt-parent = <&mic>;
interrupts = <51 0>;
#address-cells = <1>;
#size-cells = <0>;
};
19 changes: 19 additions & 0 deletions Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ properties:
- items:
- enum:
- qcom,sc7280-cci
- qcom,sc8280xp-cci
- qcom,sdm845-cci
- qcom,sm6350-cci
- qcom,sm8250-cci
Expand Down Expand Up @@ -176,6 +177,24 @@ allOf:
- const: cci
- const: cci_src

- if:
properties:
compatible:
contains:
enum:
- qcom,sc8280xp-cci
then:
properties:
clocks:
minItems: 4
maxItems: 4
clock-names:
items:
- const: camnoc_axi
- const: slow_ahb_src
- const: cpas_ahb
- const: cci

additionalProperties: false

examples:
Expand Down
19 changes: 11 additions & 8 deletions Documentation/devicetree/bindings/i2c/renesas,riic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ allOf:

properties:
compatible:
items:
- enum:
- renesas,riic-r7s72100 # RZ/A1H
- renesas,riic-r7s9210 # RZ/A2M
- renesas,riic-r9a07g043 # RZ/G2UL and RZ/Five
- renesas,riic-r9a07g044 # RZ/G2{L,LC}
- renesas,riic-r9a07g054 # RZ/V2L
- const: renesas,riic-rz # RZ/A or RZ/G2L
oneOf:
- items:
- enum:
- renesas,riic-r7s72100 # RZ/A1H
- renesas,riic-r7s9210 # RZ/A2M
- renesas,riic-r9a07g043 # RZ/G2UL and RZ/Five
- renesas,riic-r9a07g044 # RZ/G2{L,LC}
- renesas,riic-r9a07g054 # RZ/V2L
- const: renesas,riic-rz # RZ/A or RZ/G2L

- const: renesas,riic-r9a09g057 # RZ/V2H(P)

reg:
maxItems: 1
Expand Down
12 changes: 10 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2362,7 +2362,7 @@ M: Vladimir Zapolskiy <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Maintained
T: git git:https://github.com/vzapolskiy/linux-lpc32xx.git
F: Documentation/devicetree/bindings/i2c/i2c-pnx.txt
F: Documentation/devicetree/bindings/i2c/nxp,pnx-i2c.yaml
F: arch/arm/boot/dts/nxp/lpc/lpc32*
F: arch/arm/mach-lpc32xx/
F: drivers/i2c/busses/i2c-pnx.c
Expand Down Expand Up @@ -3082,7 +3082,7 @@ S: Orphan
F: Documentation/devicetree/bindings/i2c/i2c-wmt.txt
F: arch/arm/mach-vt8500/
F: drivers/clocksource/timer-vt8500.c
F: drivers/i2c/busses/i2c-wmt.c
F: drivers/i2c/busses/i2c-viai2c-wmt.c
F: drivers/mmc/host/wmt-sdmmc.c
F: drivers/pwm/pwm-vt8500.c
F: drivers/rtc/rtc-vt8500.c
Expand Down Expand Up @@ -10400,6 +10400,14 @@ L: [email protected]
F: Documentation/i2c/busses/i2c-ismt.rst
F: drivers/i2c/busses/i2c-ismt.c

I2C/SMBUS ZHAOXIN DRIVER
M: Hans Hu <[email protected]>
L: [email protected]
S: Maintained
W: https://www.zhaoxin.com
F: drivers/i2c/busses/i2c-viai2c-common.c
F: drivers/i2c/busses/i2c-viai2c-zhaoxin.c

I2C/SMBUS STUB DRIVER
M: Jean Delvare <[email protected]>
L: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/bridge/sii902x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ static int sii902x_init(struct sii902x *sii902x)
}

sii902x->i2cmux->priv = sii902x;
ret = i2c_mux_add_adapter(sii902x->i2cmux, 0, 0, 0);
ret = i2c_mux_add_adapter(sii902x->i2cmux, 0, 0);
if (ret)
goto err_unreg_audio;

Expand Down
49 changes: 34 additions & 15 deletions drivers/i2c/busses/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ config I2C_CCGX_UCSI

config I2C_ALI1535
tristate "ALI 1535"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the SMB
Host controller on Acer Labs Inc. (ALI) M1535 South Bridges. The SMB
Expand All @@ -30,7 +30,7 @@ config I2C_ALI1535

config I2C_ALI1563
tristate "ALI 1563"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the SMB
Host controller on Acer Labs Inc. (ALI) M1563 South Bridges. The SMB
Expand All @@ -42,7 +42,7 @@ config I2C_ALI1563

config I2C_ALI15X3
tristate "ALI 15x3"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the
Acer Labs Inc. (ALI) M1514 and M1543 motherboard I2C interfaces.
Expand All @@ -52,7 +52,7 @@ config I2C_ALI15X3

config I2C_AMD756
tristate "AMD 756/766/768/8111 and nVidia nForce"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the AMD
756/766/768 mainboard I2C interfaces. The driver also includes
Expand All @@ -77,7 +77,7 @@ config I2C_AMD756_S4882

config I2C_AMD8111
tristate "AMD 8111"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the
second (SMBus 2.0) AMD 8111 mainboard I2C interface.
Expand Down Expand Up @@ -107,7 +107,7 @@ config I2C_HIX5HD2

config I2C_I801
tristate "Intel 82801 (ICH/PCH)"
depends on PCI
depends on PCI && HAS_IOPORT
select P2SB if X86
select CHECK_SIGNATURE if X86 && DMI
select I2C_SMBUS
Expand Down Expand Up @@ -163,9 +163,17 @@ config I2C_I801
This driver can also be built as a module. If so, the module
will be called i2c-i801.

config I2C_I801_MUX
def_bool I2C_I801
depends on DMI && I2C_MUX_GPIO
depends on !(I2C_I801=y && I2C_MUX=m)
help
Optional support for multiplexed SMBUS on certain systems with
more than 8 memory slots.

config I2C_ISCH
tristate "Intel SCH SMBus 1.0"
depends on PCI
depends on PCI && HAS_IOPORT
select LPC_SCH
help
Say Y here if you want to use SMBus controller on the Intel SCH
Expand All @@ -186,7 +194,7 @@ config I2C_ISMT

config I2C_PIIX4
tristate "Intel PIIX4 and compatible (ATI/AMD/Serverworks/Broadcom/SMSC)"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the Intel
PIIX4 family of mainboard I2C interfaces. Specifically, the following
Expand Down Expand Up @@ -232,7 +240,7 @@ config I2C_CHT_WC

config I2C_NFORCE2
tristate "Nvidia nForce2, nForce3 and nForce4"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the Nvidia
nForce2, nForce3 and nForce4 families of mainboard I2C interfaces.
Expand Down Expand Up @@ -265,7 +273,7 @@ config I2C_NVIDIA_GPU

config I2C_SIS5595
tristate "SiS 5595"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the
SiS5595 SMBus (a subset of I2C) interface.
Expand All @@ -275,7 +283,7 @@ config I2C_SIS5595

config I2C_SIS630
tristate "SiS 630/730/964"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the
SiS630, SiS730 and SiS964 SMBus (a subset of I2C) interface.
Expand All @@ -285,7 +293,7 @@ config I2C_SIS630

config I2C_SIS96X
tristate "SiS 96x"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the SiS
96x SMBus (a subset of I2C) interfaces. Specifically, the following
Expand All @@ -303,7 +311,7 @@ config I2C_SIS96X

config I2C_VIA
tristate "VIA VT82C586B"
depends on PCI
depends on PCI && HAS_IOPORT
select I2C_ALGOBIT
help
If you say yes to this option, support will be included for the VIA
Expand All @@ -314,7 +322,7 @@ config I2C_VIA

config I2C_VIAPRO
tristate "VIA VT82C596/82C686/82xx and CX700/VX8xx/VX900"
depends on PCI
depends on PCI && HAS_IOPORT
help
If you say yes to this option, support will be included for the VIA
VT82C596 and later SMBus interface. Specifically, the following
Expand All @@ -336,6 +344,16 @@ config I2C_VIAPRO

if ACPI

config I2C_ZHAOXIN
tristate "Zhaoxin I2C Interface"
depends on PCI || COMPILE_TEST
help
If you say yes to this option, support will be included for the
ZHAOXIN I2C interface

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

comment "ACPI drivers"

config I2C_SCMI
Expand Down Expand Up @@ -500,7 +518,7 @@ config I2C_BRCMSTB

config I2C_CADENCE
tristate "Cadence I2C Controller"
depends on ARCH_ZYNQ || ARM64 || XTENSA || COMPILE_TEST
depends on ARCH_ZYNQ || ARM64 || XTENSA || RISCV || COMPILE_TEST
help
Say yes here to select Cadence I2C Host Controller. This controller is
e.g. used by Xilinx Zynq.
Expand Down Expand Up @@ -1397,6 +1415,7 @@ config I2C_ICY
config I2C_MLXCPLD
tristate "Mellanox I2C driver"
depends on X86_64 || (ARM64 && ACPI) || COMPILE_TEST
depends on HAS_IOPORT
help
This exposes the Mellanox platform I2C busses to the linux I2C layer
for X86 and ARM64/ACPI based systems.
Expand Down
3 changes: 3 additions & 0 deletions drivers/i2c/busses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ obj-$(CONFIG_I2C_SIS630) += i2c-sis630.o
obj-$(CONFIG_I2C_SIS96X) += i2c-sis96x.o
obj-$(CONFIG_I2C_VIA) += i2c-via.o
obj-$(CONFIG_I2C_VIAPRO) += i2c-viapro.o
i2c-zhaoxin-objs := i2c-viai2c-zhaoxin.o i2c-viai2c-common.o
obj-$(CONFIG_I2C_ZHAOXIN) += i2c-zhaoxin.o

# Mac SMBus host controller drivers
obj-$(CONFIG_I2C_HYDRA) += i2c-hydra.o
Expand Down Expand Up @@ -118,6 +120,7 @@ obj-$(CONFIG_I2C_TEGRA_BPMP) += i2c-tegra-bpmp.o
obj-$(CONFIG_I2C_UNIPHIER) += i2c-uniphier.o
obj-$(CONFIG_I2C_UNIPHIER_F) += i2c-uniphier-f.o
obj-$(CONFIG_I2C_VERSATILE) += i2c-versatile.o
i2c-wmt-objs := i2c-viai2c-wmt.o i2c-viai2c-common.o
obj-$(CONFIG_I2C_WMT) += i2c-wmt.o
i2c-octeon-objs := i2c-octeon-core.o i2c-octeon-platdrv.o
obj-$(CONFIG_I2C_OCTEON) += i2c-octeon.o
Expand Down
8 changes: 2 additions & 6 deletions drivers/i2c/busses/i2c-ali1535.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,8 @@ static int ali1535_transaction(struct i2c_adapter *adap)
&& (timeout++ < MAX_TIMEOUT));

/* If the SMBus is still busy, we give up */
if (timeout > MAX_TIMEOUT) {
if (timeout > MAX_TIMEOUT)
result = -ETIMEDOUT;
dev_err(&adap->dev, "SMBus Timeout!\n");
}

if (temp & ALI1535_STS_FAIL) {
result = -EIO;
Expand All @@ -313,10 +311,8 @@ static int ali1535_transaction(struct i2c_adapter *adap)
}

/* check to see if the "command complete" indication is set */
if (!(temp & ALI1535_STS_DONE)) {
if (!(temp & ALI1535_STS_DONE))
result = -ETIMEDOUT;
dev_err(&adap->dev, "Error: command never completed\n");
}

dev_dbg(&adap->dev, "Transaction (post): STS=%02x, TYP=%02x, "
"CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n",
Expand Down
Loading

0 comments on commit 0a07e09

Please sign in to comment.