linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Nam Tran <trannamatk@gmail.com>
Cc: gregkh@linuxfoundation.org, pavel@kernel.org,
	rdunlap@infradead.org, christophe.jaillet@wanadoo.fr,
	krzk+dt@kernel.org, robh@kernel.org, conor+dt@kernel.org,
	corbet@lwn.net, linux-leds@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH v18 2/3] leds: add basic support for TI/National Semiconductor LP5812 LED Driver
Date: Thu, 27 Nov 2025 11:32:13 +0000	[thread overview]
Message-ID: <20251127113213.GI3070764@google.com> (raw)
In-Reply-To: <20251126160024.141129-1-trannamatk@gmail.com>

On Wed, 26 Nov 2025, Nam Tran wrote:

> On Tue, 25 Nov 2025, Lee Jones wrote:
> 
> > > +static ssize_t parse_drive_mode(struct lp5812_chip *chip, const char *str)
> > > +{
> > > +	int i;
> > > +
> > > +	chip->u_drive_mode.s_drive_mode.mix_sel_led_0 = false;
> > > +	chip->u_drive_mode.s_drive_mode.mix_sel_led_1 = false;
> > > +	chip->u_drive_mode.s_drive_mode.mix_sel_led_2 = false;
> > > +	chip->u_drive_mode.s_drive_mode.mix_sel_led_3 = false;
> > > +
> > > +	if (sysfs_streq(str, LP5812_MODE_DIRECT_NAME)) {
> > > +		chip->u_drive_mode.s_drive_mode.led_mode = LP5812_MODE_DIRECT_VALUE;
> > > +		return 0;
> > > +	}
> > > +
> > > +	for (i = 0; i < ARRAY_SIZE(chip_mode_map); i++) {
> > > +		if (!sysfs_streq(str, chip_mode_map[i].mode_name))
> > > +			continue;
> > > +
> > > +		chip->u_drive_mode.s_drive_mode.led_mode = chip_mode_map[i].mode;
> > > +		chip->u_scan_order.s_scan_order.scan_order_0 = chip_mode_map[i].scan_order_0;
> > > +		chip->u_scan_order.s_scan_order.scan_order_1 = chip_mode_map[i].scan_order_1;
> > > +		chip->u_scan_order.s_scan_order.scan_order_2 = chip_mode_map[i].scan_order_2;
> > > +		chip->u_scan_order.s_scan_order.scan_order_3 = chip_mode_map[i].scan_order_3;
> > 
> > Where are all of these used?
> 
> These fields are part of unions (u_drive_mode and u_scan_order).
> The bitfields are packed into drive_mode_val and scan_order_val, which are
> written to DEV_CONFIG1 and DEV_CONFIG2 in lp5812_set_drive_mode_scan_order().

Sure, but where.  What line of code?

-- 
Lee Jones [李琼斯]

  reply	other threads:[~2025-11-27 11:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-23 19:10 [PATCH v18 0/3] leds: add new LED driver for TI LP5812 Nam Tran
2025-11-23 19:10 ` [PATCH v18 1/3] dt-bindings: leds: add TI/National Semiconductor LP5812 LED Driver Nam Tran
2025-11-24  7:30   ` Krzysztof Kozlowski
2025-11-24  7:55     ` Krzysztof Kozlowski
2025-11-24  7:57   ` Krzysztof Kozlowski
2025-11-24  8:02     ` Krzysztof Kozlowski
2025-11-26 16:55       ` Nam Tran
2025-11-23 19:10 ` [PATCH v18 2/3] leds: add basic support for " Nam Tran
2025-11-25 13:48   ` Lee Jones
2025-11-26 16:00     ` Nam Tran
2025-11-27 11:32       ` Lee Jones [this message]
2025-11-27 14:58         ` Nam Tran
2025-11-23 19:10 ` [PATCH v18 3/3] docs: leds: Document TI LP5812 LED driver Nam Tran
2025-11-23 19:20   ` Randy Dunlap

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=20251127113213.GI3070764@google.com \
    --to=lee@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=robh@kernel.org \
    --cc=trannamatk@gmail.com \
    /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).