Linux LED subsystem development
 help / color / mirror / Atom feed
From: Pengyu Luo <mitltlatltl@gmail.com>
To: krzk@kernel.org
Cc: conor+dt@kernel.org, danielt@kernel.org, deller@gmx.de,
	devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
	jingoohan1@gmail.com, krzk+dt@kernel.org, lee@kernel.org,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-leds@vger.kernel.org, lujianhua000@gmail.com,
	mitltlatltl@gmail.com, pavel@kernel.org, robh@kernel.org
Subject: Re: [PATCH 2/4] backlight: ktz8866: add slave handler
Date: Sat, 19 Apr 2025 02:17:16 +0800	[thread overview]
Message-ID: <20250418181723.207795-1-mitltlatltl@gmail.com> (raw)
In-Reply-To: <eb23737f-5b6c-47fd-8b39-637e059bd5f1@kernel.org>

On Tue, Apr 8, 2025 at 12:27 AM Daniel Thompson <daniel@riscstar.com> wrote:
> On Mon, Apr 07, 2025 at 05:51:17PM +0800, Pengyu Luo wrote:
> > Kinetic ktz8866, found in many android devices, nowadays, some oem use
> > dual ktz8866 to support a larger panel and  higher brightness, original
> > driver would only handle half backlight region on these devices,
> > registering it twice is unreasonable, so adding the slave handler to
> > support it.
> 
> Is there anything unique about KTZ8866 that allows it to be used like
> this? I think it would be better to add support for secondary backlight
> controllers into the backlight framework, rather than having to
> implement driver specific hacks for every backlight controller that
> appears in a primary/secondary configuration.
> 

According to my understanding, if I add the new api to backlight framework,
with a minimal modification, then I either do A or do B(I doubt it is my
fixed mindset)

A:
Tied two devices, registering the primary and the secondary device during
one probe, to do that, I access another KTZ8866 when probing. Those hack
is still here, that doesn't seem to help.

B:
Uncoupled, probing separately, the later one is registered as the
secondary one. Brightness control is a little uncoupled, there are two
sysfs, I doubt if userspace programs will write brightness to two
devices. Then we need synchronization, write primary => write primary
and write secondary, viceversa.

> Also, the kernel seeks to avoid adding new instances of master/slave
> terminology. See the coding style doc for suggested alternatives:
> https://www.kernel.org/doc/html/latest/process/coding-style.html#naming
> 

Agree.

Best wishes,
Pengyu

  parent reply	other threads:[~2025-04-18 18:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07  9:51 [PATCH 0/4] backlight: ktz8866: improve it and support slave Pengyu Luo
2025-04-07  9:51 ` [PATCH 1/4] dt-bindings: backlight: kinetic,ktz8866: add ktz8866 slave compatible Pengyu Luo
2025-04-07  9:57   ` Krzysztof Kozlowski
2025-04-07  9:51 ` [PATCH 2/4] backlight: ktz8866: add slave handler Pengyu Luo
2025-04-07 10:00   ` Krzysztof Kozlowski
2025-04-18 18:14     ` Pengyu Luo
2025-04-18 18:17     ` Pengyu Luo [this message]
2025-04-07 16:27   ` Daniel Thompson
2025-04-18 18:19     ` Pengyu Luo
2025-04-07  9:51 ` [PATCH 3/4] backlight: ktz8866: improve current sinks setting Pengyu Luo
2025-04-07 16:13   ` Daniel Thompson
2025-04-08  3:45   ` kernel test robot
2025-04-08  3:55   ` kernel test robot
2025-04-07  9:51 ` [PATCH 4/4] backlight: ktz8866: add definitions to make it more readable Pengyu Luo
2025-04-07 16:18   ` Daniel Thompson
2025-04-08  5:19   ` kernel test robot

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=20250418181723.207795-1-mitltlatltl@gmail.com \
    --to=mitltlatltl@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=danielt@kernel.org \
    --cc=deller@gmx.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jingoohan1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=lujianhua000@gmail.com \
    --cc=pavel@kernel.org \
    --cc=robh@kernel.org \
    /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