[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aWfEd0hldSrwrh9-@aspen.lan>
Date: Wed, 14 Jan 2026 16:29:44 +0000
From: Daniel Thompson <danielt@...nel.org>
To: Maud Spierings <maudspierings@...ontroll.com>
Cc: Daniel Thompson <daniel@...cstar.com>, Lee Jones <lee@...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>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, dri-devel@...ts.freedesktop.org,
linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-fbdev@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v6 2/4] backlight: add max25014atg backlight
On Fri, Jan 09, 2026 at 09:55:18AM +0100, Maud Spierings wrote:
> Do you have any comments about:
>
> > +static void max25014_remove(struct i2c_client *cl)
> > +{
> > + struct max25014 *maxim = i2c_get_clientdata(cl);
> > +
> > + maxim->bl->props.brightness = 0;
> > + max25014_update_status(maxim->bl);
> > + gpiod_set_value_cansleep(maxim->enable, 0);
> > + regulator_disable(maxim->vin);
> > +}
>
> I'm feeling like the setting of the brightness + update status maybe should
> be a call to backlight_device_set_brightness() or maybe it shouldn't really
> be there at all?
Using backlight_device_set_brightness() makes sense (although there is
still a window where userspace could come back in and turn the backlight
on again). And, if both the GPIO and regulator were optional then it is
sensible to set the brightness to zero before removing the driver.
Daniel.
Powered by blists - more mailing lists