[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_P68OP1c8XcbXle@aspen.lan>
Date: Mon, 7 Apr 2025 17:18:56 +0100
From: Daniel Thompson <daniel@...cstar.com>
To: Pengyu Luo <mitltlatltl@...il.com>
Cc: Jianhua Lu <lujianhua000@...il.com>, Lee Jones <lee@...nel.org>,
Daniel Thompson <danielt@...nel.org>,
Jingoo Han <jingoohan1@...il.com>, Pavel Machek <pavel@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Helge Deller <deller@....de>,
dri-devel@...ts.freedesktop.org, linux-leds@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fbdev@...r.kernel.org
Subject: Re: [PATCH 4/4] backlight: ktz8866: add definitions to make it more
readable
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 <mitltlatltl@...il.com>
> ---
> 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.
Powered by blists - more mailing lists