mbox series

[v1,00/12] i2c: isch: Put the driver into shape

Message ID 20240911154820.2846187-1-andriy.shevchenko@linux.intel.com
Headers show
Series i2c: isch: Put the driver into shape | expand

Message

Andy Shevchenko Sept. 11, 2024, 3:39 p.m. UTC
Driver code is quite outdated WRT modern in-kernel APIs and
also has one non-critival bug.

The series is to address the above. Has been tested on
Minnowboard (Intel Tunnel Creek platform) with connected
LM95245 HW monitor chip.

Andy Shevchenko (12):
  i2c: isch: Add missed 'else'
  i2c: isch: Pass pointer to struct i2c_adapter down
  i2c: isch: Use string_choices API instead of ternary operator
  i2c: isch: Switch to memory mapped IO accessors
  i2c: isch: Use custom private data structure
  i2c: isch: switch i2c registration to devm functions
  i2c: isch: Utilize temporary variable to hold device pointer
  i2c: isch: Use read_poll_timeout()
  i2c: isch: Unify the name of the variable to hold an error code
  i2c: isch: Don't use "proxy" headers
  i2c: isch: Prefer to use octal permission
  i2c: isch: Convert to kernel-doc

 drivers/i2c/busses/i2c-isch.c | 324 +++++++++++++++++-----------------
 1 file changed, 165 insertions(+), 159 deletions(-)

Comments

Andi Shyti Sept. 11, 2024, 9:35 p.m. UTC | #1
Hi Andy,

On Wed, Sep 11, 2024 at 06:39:14PM GMT, Andy Shevchenko wrote:
> In accordance with the existing comment and code analysis
> it is quite likely that there is a missed 'else' when adapter
> times out. Add it.

Good catch! Very likely this was an oversight.

> Fixes: 5bc1200852c3 ("i2c: Add Intel SCH SMBus support")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

I merged just this patch to i2c/i2c-host-fixes.

I will take the rest of the series after the merge window.

Thanks,
Andi
Andy Shevchenko Sept. 11, 2024, 9:36 p.m. UTC | #2
On Wed, Sep 11, 2024 at 11:35:01PM +0200, Andi Shyti wrote:
> Hi Andy,
> 
> On Wed, Sep 11, 2024 at 06:39:14PM GMT, Andy Shevchenko wrote:
> > In accordance with the existing comment and code analysis
> > it is quite likely that there is a missed 'else' when adapter
> > times out. Add it.
> 
> Good catch! Very likely this was an oversight.
> 
> > Fixes: 5bc1200852c3 ("i2c: Add Intel SCH SMBus support")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> I merged just this patch to i2c/i2c-host-fixes.
> 
> I will take the rest of the series after the merge window.

Fine with me, thanks!
Andi Shyti Sept. 12, 2024, 7:33 a.m. UTC | #3
Hi Andy,

> Andy Shevchenko (12):
>   i2c: isch: Add missed 'else'
>   i2c: isch: Pass pointer to struct i2c_adapter down
>   i2c: isch: Use string_choices API instead of ternary operator
>   i2c: isch: Switch to memory mapped IO accessors
>   i2c: isch: Use custom private data structure
>   i2c: isch: switch i2c registration to devm functions
>   i2c: isch: Utilize temporary variable to hold device pointer
>   i2c: isch: Use read_poll_timeout()
>   i2c: isch: Unify the name of the variable to hold an error code
>   i2c: isch: Don't use "proxy" headers
>   i2c: isch: Prefer to use octal permission
>   i2c: isch: Convert to kernel-doc

very nice cleanup! Now this driver has a nice modern look.
Thanks!

I will leave this patch for some time to give it some more time
for review and then I will take it in.

Thanks,
Andi