From 714199ec3461b2b5bac9796d4f5ee79f56d2eb00 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 21 May 2020 09:57:27 +0100 Subject: kernel: backport v5.8 i2c-pxa updates Add i2c-pxa updates queued for v5.8, which add bus recovery to this driver; this is needed for the uDPU platform. Signed-off-by: Russell King --- ...2c-pxa-use-master-abort-for-device-probes.patch | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 target/linux/generic/backport-5.4/820-v5.8-i2c-pxa-use-master-abort-for-device-probes.patch (limited to 'target/linux/generic/backport-5.4/820-v5.8-i2c-pxa-use-master-abort-for-device-probes.patch') diff --git a/target/linux/generic/backport-5.4/820-v5.8-i2c-pxa-use-master-abort-for-device-probes.patch b/target/linux/generic/backport-5.4/820-v5.8-i2c-pxa-use-master-abort-for-device-probes.patch new file mode 100644 index 0000000000..2fde9e7322 --- /dev/null +++ b/target/linux/generic/backport-5.4/820-v5.8-i2c-pxa-use-master-abort-for-device-probes.patch @@ -0,0 +1,40 @@ +From: Russell King +Bcc: linux@mail.armlinux.org.uk +Subject: [PATCH 6/7] i2c: pxa: use master-abort for device probes +MIME-Version: 1.0 +Content-Disposition: inline +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset="utf-8" + +Use master-abort to send the stop condition after an address cycle +rather than resetting the controller. + +Signed-off-by: Russell King +--- + drivers/i2c/busses/i2c-pxa.c | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c +index a72d07bdb793..0e194d6cd1b5 100644 +--- a/drivers/i2c/busses/i2c-pxa.c ++++ b/drivers/i2c/busses/i2c-pxa.c +@@ -940,14 +940,8 @@ static void i2c_pxa_irq_txempty(struct pxa_i2c *i2c, u32 isr) + icr &= ~ICR_ALDIE; + icr |= ICR_START | ICR_TB; + } else { +- if (i2c->msg->len == 0) { +- /* +- * Device probes have a message length of zero +- * and need the bus to be reset before it can +- * be used again. +- */ +- i2c_pxa_reset(i2c); +- } ++ if (i2c->msg->len == 0) ++ icr |= ICR_MA; + i2c_pxa_master_complete(i2c, 0); + } + +-- +2.20.1 + -- cgit v1.2.3