|
|
Log in / Subscribe / Register

Add support for I2C bus recovery for riic driver

From:  Prabhakar <prabhakar.csengg-AT-gmail.com>
To:  Chris Brandt <chris.brandt-AT-renesas.com>, Andi Shyti <andi.shyti-AT-kernel.org>, Philipp Zabel <p.zabel-AT-pengutronix.de>, Wolfram Sang <wsa-AT-kernel.org>, Geert Uytterhoeven <geert+renesas-AT-glider.be>
Subject:  [PATCH 0/9] Add support for I2C bus recovery for riic driver
Date:  Fri, 13 Dec 2024 17:58:19 +0000
Message-ID:  <20241213175828.909987-1-prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc:  linux-renesas-soc-AT-vger.kernel.org, linux-i2c-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, Prabhakar <prabhakar.csengg-AT-gmail.com>, Biju Das <biju.das.jz-AT-bp.renesas.com>, Fabrizio Castro <fabrizio.castro.jz-AT-renesas.com>, Lad Prabhakar <prabhakar.mahadev-lad.rj-AT-bp.renesas.com>
Archive-link:  Article

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi All,

This patch series introduces support for I2C bus recovery in the RIIC driver,
which is utilized in RZ series SoCs. The addition of bus recovery functionality
enhances the reliability of the I2C interface by allowing it to recover from
error conditions that might leave the bus in an unusable state.

Alongside the bus recovery implementation, the series includes several cleanup
and improvement patches that simplify and modernize the driver code. These
include replacing `dev_err` calls with `dev_err_probe`, consistent usage of the
`BIT` and `GENMASK` macros, leveraging devres helpers for reset management, and
improving code readability by marking static data as `const`.

Cheers,
Prabhakar

Lad Prabhakar (9):
  i2c: riic: Replace dev_err with dev_err_probe in probe function
  i2c: riic: Use local `dev` pointer in `dev_err_probe()`
  i2c: riic: Use BIT macro consistently
  i2c: riic: Use GENMASK() macro for bitmask definitions
  i2c: riic: Make use of devres helper to request deasserted reset line
  i2c: riic: Mark riic_irqs array as const
  i2c: riic: Use predefined macro and simplify clock tick calculation
  i2c: riic: Add `riic_bus_barrier()` to check bus availability
  i2c: riic: Implement bus recovery

 drivers/i2c/busses/i2c-riic.c | 222 ++++++++++++++++++++++++----------
 1 file changed, 155 insertions(+), 67 deletions(-)

-- 
2.43.0




Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds