[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4378f2ba-f620-b4e8-f0b3-9d08dcb6e2f3@gmail.com>
Date: Wed, 10 May 2023 10:52:13 +0200
From: Maximilian Weigand <mweigand2017@...il.com>
To: Sam Ravnborg <sam@...nborg.org>,
Maximilian Weigand <mweigand2017@...il.com>
Cc: Lee Jones <lee@...nel.org>,
Daniel Thompson <daniel.thompson@...aro.org>,
Jingoo Han <jingoohan1@...il.com>,
Helge Deller <deller@....de>,
Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pwm@...r.kernel.org
Subject: Re: [PATCH v1] backlight: lm3630a: turn off both led strings when
display is blank
>> + if (backlight_is_blank(bl) || (bl->props.brightness < 0x4))
> You could replace bl->props.brightness with backlight_get_brightness(bl)
> to avoid direct access to the properties.
Thanks. Changed in v2.
>> + /* turn the string off */
>> ret |= lm3630a_update(pchip, REG_CTRL, LM3630A_LEDA_ENABLE, 0);
>> else
>> ret |= lm3630a_update(pchip, REG_CTRL,
>> @@ -277,7 +279,9 @@ static int lm3630a_bank_b_update_status(struct backlight_device *bl)
>> usleep_range(1000, 2000);
>> /* minimum brightness is 0x04 */
>> ret = lm3630a_write(pchip, REG_BRT_B, bl->props.brightness);
>> - if (bl->props.brightness < 0x4)
>> +
>> + if (backlight_is_blank(bl) || (bl->props.brightness < 0x4))
Thanks. Changed in v2.
Powered by blists - more mailing lists