lkml.org 
[lkml]   [2022]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 4/6] leds: is31fl319x: Use non-wildcard names for vars, structs and defines
On Tue, Jul 5, 2022 at 6:32 PM Vincent Knecht <vincent.knecht@mailoo.org> wrote:
>
> In order to add real support for is31fl3190, is31fl3191 and is31fl3193,
> rename variant-dependent elements to not use 319X where needed.
>
> 3190 suffix is used for is31fl3190, is31fl3191 and is31fl3193 circuits.
> 3196 suffix is used for is31fl3196 and is31fl3199.
>
> Those two groups have different register maps, current settings and even
> a different interpretation of the software shutdown bit:
> https://lumissil.com/assets/pdf/core/IS31FL3190_DS.pdf
> https://lumissil.com/assets/pdf/core/IS31FL3191_DS.pdf
> https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf
> https://lumissil.com/assets/pdf/core/IS31FL3196_DS.pdf
> https://lumissil.com/assets/pdf/core/IS31FL3199_DS.pdf
>
> Rename variables, structures and defines in preparation of the splitting.
> No functional nor behaviour change.

...

> +static bool is31fl3196_volatile_reg(struct device *dev, unsigned int reg)

> { /* volatile registers are not cached */

This is a rather non-standard place for comments. Are you going to
address this in the future?

> }

...

> +static const struct reg_default is31fl3196_reg_defaults[] = {
> + { IS31FL3196_CONFIG1, 0x00},
> + { IS31FL3196_CONFIG2, 0x00},
> + { IS31FL3196_PWM(0), 0x00},
> + { IS31FL3196_PWM(1), 0x00},
> + { IS31FL3196_PWM(2), 0x00},
> + { IS31FL3196_PWM(3), 0x00},
> + { IS31FL3196_PWM(4), 0x00},
> + { IS31FL3196_PWM(5), 0x00},
> + { IS31FL3196_PWM(6), 0x00},
> + { IS31FL3196_PWM(7), 0x00},
> + { IS31FL3196_PWM(8), 0x00},

While at it, add a space before }. This seems in many places like
this. Perhaps address the rest in a separate patch?

> };

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-07-05 20:49    [W:0.164 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site