[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yo0LKQchQwitJVHm@smile.fi.intel.com>
Date: Tue, 24 May 2022 19:43:21 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Dinh Nguyen <dinguyen@...nel.org>
Cc: jarkko.nikula@...ux.intel.com, mika.westerberg@...ux.intel.com,
robh+dt@...nel.org, krzk+dt@...nel.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCHv2 1/2] i2c: designware: introduce a custom scl recovery
for SoCFPGA platforms
On Tue, May 24, 2022 at 08:54:40AM -0500, Dinh Nguyen wrote:
> The I2C pins on the SoCFPGA platforms do not go through a GPIO module,
> thus cannot be recovered by the default method of by doing a GPIO access.
> Only a reset of the I2C IP block can a recovery be successful.
Better now, but see my additional comments.
...
> + switch (dev->flags & MODEL_MASK) {
> + case MODEL_SOCFPGA:
> + rinfo->recover_bus = i2c_socfpga_scl_recovery;
> + break;
> + default:
> + rinfo->recover_bus = i2c_generic_scl_recovery;
> + break;
> + }
> + adap->bus_recovery_info = rinfo;
Usually we do not assign the pointer while data structure is incomplete.
That's said, please leave this line as it was.
On top of that, why you can't move the above switch to the place where old
function was assigned?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists