lkml.org 
[lkml]   [2022]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 4/6] leds: is31fl319x: Use non-wildcard names for vars, structs and defines
On Fri, Jul 1, 2022 at 3:45 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, stuctures and defines in preparation of the splitting.

structures

> No functional nor behaviour change.

...

> +#define IS31FL3196_CONFIG2_CS_MASK 0x7

GENMASK() ?

...

> +#define IS31FL3196_CURRENT_MIN ((u32)5000)
> +#define IS31FL3196_CURRENT_MAX ((u32)40000)
> +#define IS31FL3196_CURRENT_STEP ((u32)5000)
> +#define IS31FL3196_CURRENT_DEFAULT ((u32)20000)

> +#define IS31FL3196_AUDIO_GAIN_DB_MAX ((u32)21)
> +#define IS31FL3196_AUDIO_GAIN_DB_STEP ((u32)3)

Why do you need all these castings? Wouldn't u/U suffice if you really
want to have them unsigned?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-07-01 22:50    [W:0.088 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site