On Mon, Apr 07, 2025 at 05:51:19PM +0800, Pengyu Luo wrote: > LSB, MSB and their handling are slightly confused, so improve it. > > Signed-off-by: Pengyu Luo <[email protected]> > --- > drivers/video/backlight/ktz8866.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/video/backlight/ktz8866.c > b/drivers/video/backlight/ktz8866.c > index b67ca136d..5364ecfc0 100644 > --- a/drivers/video/backlight/ktz8866.c > +++ b/drivers/video/backlight/ktz8866.c > @@ -24,7 +24,9 @@ > #define DEVICE_ID 0x01 > #define BL_CFG1 0x02 > #define BL_CFG2 0x03 > +/* least significant byte */ > #define BL_BRT_LSB 0x04 > +/* most significant byte */
I'm not convinced these comments are necessary. > #define BL_BRT_MSB 0x05 > #define BL_EN 0x08 > #define LCD_BIAS_CFG1 0x09 > @@ -47,6 +49,8 @@ > #define PWM_HYST 0x5 > > #define CURRENT_SINKS_MASK GENMASK(5, 0) > +#define LOWER_BYTE GENMASK(2, 0) I like using masks and FIELD_GET() but this is not a byte. These are the least significant bits. Daniel.
