From: Daniel Thompson <danielt@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Rob Herring <robh@kernel.org>,
lee@kernel.org, jingoohan1@gmail.com, neil.armstrong@linaro.org,
jessica.zhang@oss.qualcomm.com, deller@gmx.de,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
airlied@gmail.com, simona@ffwll.ch, fnkl.kernel@gmail.com,
j@jannau.net, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com,
sven@kernel.org, alyssa@rosenzweig.io, neal@gompa.dev,
support.opensource@diasemi.com, duje.mihanovic@skole.hr,
dri-devel@lists.freedesktop.org, asahi@lists.linux.dev,
platform-driver-x86@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2 13/15] backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h>
Date: Mon, 15 Sep 2025 16:01:03 +0100 [thread overview]
Message-ID: <aMgqL-ZeSkICqRih@aspen.lan> (raw)
In-Reply-To: <26a9a762-23bc-4367-9cb3-c2b081d641c6@suse.de>
On Wed, Jul 16, 2025 at 08:39:03AM +0200, Thomas Zimmermann wrote:
> Hi
>
> Am 15.07.25 um 15:34 schrieb Rob Herring:
> > On Tue, Jul 15, 2025 at 7:30 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> > > Include <linux/of.h> to declare struct device_node and include
> > > <linux/mod_devicetable.h> to declare struct of_device_id. Avoids
> > > dependency on backlight header to include it.
> > struct device_node should be opaque...
> >
> > /*
> > * If there is a phandle pointing to the device node we can
> > * assume that another device will manage the status changes.
> > * If not we make sure the backlight is in a consistent state.
> > */
> > if (!dev->of_node->phandle)
> > backlight_update_status(bd);
> >
> > Well, that is ugly. IMO, we should just drop the check. A DT built
> > with "-@" option will have phandle set, so that's not a reliable test.
>
> Not that I disagree, but fixing it is out of scope for this series.
This pattern appears in several places. It is used to guess whether
the initial state of the backlight should be on or off (which avoids
flickering artefacts during boot).
You won't get much argument from me about the ugliness either. However
this patch makes the presence of this logic more obvious rather than
less. On that basis I view it as moving in the right direction rather
than the wrong one and therefore:
Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
Daniel.
next prev parent reply other threads:[~2025-09-15 15:01 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 12:24 [PATCH v2 00/15] backlight: Do not include <linux/fb.h> in header file Thomas Zimmermann
2025-07-15 12:24 ` [PATCH v2 01/15] platform/x86: dell-uart-backlight: Use blacklight power constant Thomas Zimmermann
2025-07-21 11:43 ` Ilpo Järvinen
2025-07-21 19:42 ` Thomas Zimmermann
2025-07-22 13:03 ` Ilpo Järvinen
2025-07-15 12:24 ` [PATCH v2 02/15] drm/panel: panel-samsung-s6e63m0: Include <linux/of.h> Thomas Zimmermann
2025-07-15 13:19 ` Simona Vetter
2025-07-15 23:43 ` Sebastian Reichel
2025-07-16 6:37 ` Thomas Zimmermann
2025-07-15 12:24 ` [PATCH v2 03/15] drm/panel: panel-samsung-s6e88a0-ams427ap24: " Thomas Zimmermann
2025-07-15 12:24 ` [PATCH v2 04/15] drm/panel: panel-summit: " Thomas Zimmermann
2025-07-15 13:28 ` Rob Herring
2025-07-15 12:24 ` [PATCH v2 05/15] fbcon: Add necessary include statements and forward declarations Thomas Zimmermann
2025-07-15 13:20 ` Simona Vetter
2025-07-15 12:24 ` [PATCH v2 06/15] backlight: Include <linux/of.h> Thomas Zimmermann
2025-09-15 14:47 ` Daniel Thompson
2025-07-15 12:24 ` [PATCH v2 07/15] backlight: apple_dwi_bl: Include <linux/mod_devicetable.h> Thomas Zimmermann
2025-09-15 14:49 ` Daniel Thompson
2025-07-15 12:24 ` [PATCH v2 08/15] backlight: as3711_bl: Include <linux/of.h> Thomas Zimmermann
2025-09-15 14:49 ` Daniel Thompson
2025-07-15 12:24 ` [PATCH v2 09/15] backlight: da9052_bl: Include <linux/mod_devicetable.h> Thomas Zimmermann
2025-09-15 14:51 ` Daniel Thompson
2025-07-15 12:24 ` [PATCH v2 10/15] backlight: jornada720: Include <linux/io.h> Thomas Zimmermann
2025-09-15 14:51 ` Daniel Thompson
2025-07-15 12:24 ` [PATCH v2 11/15] backlight: ktd2801: Include <linux/mod_devicetable.h> Thomas Zimmermann
2025-09-15 14:52 ` Daniel Thompson
2025-07-15 12:24 ` [PATCH v2 12/15] backlight: led_bl: Include <linux/of.h> Thomas Zimmermann
2025-09-15 14:52 ` Daniel Thompson
2025-07-15 12:24 ` [PATCH v2 13/15] backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h> Thomas Zimmermann
2025-07-15 13:34 ` Rob Herring
2025-07-16 6:39 ` Thomas Zimmermann
2025-09-15 15:01 ` Daniel Thompson [this message]
2025-07-15 12:24 ` [PATCH v2 14/15] backlight: rt4831: Include <linux/mod_devicetable.h> Thomas Zimmermann
2025-09-15 15:01 ` Daniel Thompson
2025-07-15 12:24 ` [PATCH v2 15/15] backlight: Do not include <linux/fb.h> in header file Thomas Zimmermann
2025-07-15 13:22 ` Simona Vetter
2025-07-16 6:44 ` Thomas Zimmermann
2025-09-15 15:02 ` Daniel Thompson
2025-09-15 15:10 ` Thomas Zimmermann
[not found] ` <175803873238.3892705.12154571803108246655.b4-ty@kernel.org>
2025-10-01 13:43 ` (subset) [PATCH v2 00/15] " Lee Jones
-- strict thread matches above, loose matches on Subject: below --
2025-06-24 13:45 Thomas Zimmermann
2025-06-24 13:45 ` [PATCH v2 13/15] backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h> Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aMgqL-ZeSkICqRih@aspen.lan \
--to=danielt@kernel.org \
--cc=airlied@gmail.com \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=duje.mihanovic@skole.hr \
--cc=fnkl.kernel@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=j@jannau.net \
--cc=jessica.zhang@oss.qualcomm.com \
--cc=jingoohan1@gmail.com \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neal@gompa.dev \
--cc=neil.armstrong@linaro.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=support.opensource@diasemi.com \
--cc=sven@kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).