Re: [PATCH v5 2/2] i2c: Add Synopsys Advanced I2C (DWC_i2c) driver
From: Mark Brown
Date: Tue Dec 01 2026 - 12:44:09 EST
On Wed, Nov 11, 2026 at 02:05:49AM +0530, Aniket Limaye wrote:
> Add a new platform driver for the Synopsys Advanced I2C (DWC_i2c),
> controller mode only.
>
> The register offsets are defined with respect to header registers for
> each block. These header registers are discovered at runtime by walking
> the block header chain.
This is working well for me, the needs of my platform are not really
demanding so that's relatively basic in terms of stress on the driver
but once I'd got the platform integration sorted everything just worked:
Tested-by: Mark Brown <broonie@xxxxxxxxxx>
Reviewed-by: Mark Brown <broonie@xxxxxxxxxx>
I need to sort some non-technical things before I can send the support
for the platform I'm working with publicly, it's all extras to support
ACPI enumeration and add the relevant device specific data. Thanks so
much for doing this, you've made my life a lot easier!
Apologies for the time it took me to complete my testing here, it's been
very hectic.
One minor note:
> +static int dwc_adv_i2c_xfer_one_part(struct dwc_adv_i2c_dev *dev)
> +{
> + if (!wait_for_completion_timeout(&dev->cmd_complete, dev->adap.timeout)) {
> + dev_err(dev->dev, "controller timed out\n");
> + i2c_recover_bus(&dev->adap);
> + dwc_adv_i2c_init(dev);
> + return -ETIMEDOUT;
> + }
We should probably disable the interrupt at the kernel level (not just
the hardware) while we're recovering from a timeout, PREEMPT_RT means
there might be some rather delayed interrupt handling still in flight.
Attachment:
signature.asc
Description: PGP signature