From: Lee Jones <lee@kernel.org>
To: Joseph Strauss <jstrauss@mailbox.org>
Cc: pavel@ucw.cz, jansimon.moeller@gmx.de, conor@kernel.org,
christophe.jaillet@wanadoo.fr, linux-leds@vger.kernel.org
Subject: Re: [PATCH v7] Add multicolor support to BlinkM LED driver
Date: Thu, 13 Jun 2024 14:49:33 +0100 [thread overview]
Message-ID: <20240613134933.GC2561462@google.com> (raw)
In-Reply-To: <20240531232031.u5mphuqrwin533rj@libretux>
On Fri, 31 May 2024, Joseph Strauss wrote:
> On 24/05/31 11:38AM, Lee Jones wrote:
> > On Mon, 06 May 2024, Joseph Strauss wrote:
> >
> > > Add multicolor support to the BlinkM driver, making it easier to control
> > > from userspace. The BlinkM LED is a programmable RGB LED. The driver
> > > currently supports only the regular LED sysfs class, resulting in the
> > > creation of three distinct classes, one for red, green, and blue. The
> > > user then has to input three values into the three seperate brightness
> > > files within those classes. The multicolor LED framework makes the
> > > device easier to control with the multi_intensity file: the user can
> > > input three values at once to form a color, while still controlling the
> > > lightness with the brightness file.
> > >
> > > The main struct blinkm_led has changed slightly. The struct led_classdev
> > > for the regular sysfs classes remain. The blinkm_probe function checks
> > > CONFIG_LEDS_BLINKM_MULTICOLOR to decide whether to load the seperate
> > > sysfs classes or the single multicolor one, but never both. The
> > > blinkm_set_mc_brightness() function had to be added to calculate the
> > > three color components and then set the fields of the blinkm_data
> > > structure accordingly.
> > >
> > > Signed-off-by: Joseph Strauss <jstrauss@mailbox.org>
> > > ---
> > > Changes in v2:
> > > - Replaced instances of the constant 3 with NUM_LEDS, where applicable
> > > - Fixed formatting errors
> > > - Replaced loop inside of blinkm_set_mc_brightness() with equivalent
> > > statements
> > > - Changed id of multicolor class from 4 to 3
> > > - Replaced call to devm_kmalloc_array() with devm_kcalloc()
> > > Changes in v3:
> > > - Add CONFIG_LEDS_BLINKM_MULTICOLOR to check whether to use multicolor
> > > funcitonality
> > > - Extend well-known-leds.txt to include standard names for RGB and indicator
> > > LEDS
> > > - Change name of Blinkm sysfs class according to well-known-leds.txt
> > > - Simplify struct blinkm_led and struct blinkm_data
> > > - Remove magic numbers
> > > - Fix formatting errors
> > > - Remove unrelated changes
> > > Changes in v4:
> > > - Fix indentation
> > > - Add default case to switch statement
> > > Changes in v5:
> > > - Fix warnings related to snprintf on s390 architecture, reported by
> > > 0-DAY CI Kernel Test Service
> > > Changes in v6:
> > > - Refactored struct blinkm_led to use a union
> > > - Refactored blinkm_probe()
> > > - Clarified documentation
> > > Changes in v7:
> > > - Fix formatting and spelling errors
> > >
> > > Documentation/leds/leds-blinkm.rst | 31 +++-
> > > Documentation/leds/well-known-leds.txt | 8 +
> > > drivers/leds/Kconfig | 8 +
> > > drivers/leds/leds-blinkm.c | 224 +++++++++++++++++--------
> > > 4 files changed, 199 insertions(+), 72 deletions(-)
> >
> > Applying patch(es)
> > Applying: Add multicolor support to BlinkM LED driver
> > Using index info to reconstruct a base tree...
> > M Documentation/leds/well-known-leds.txt
> > M drivers/leds/Kconfig
> > M drivers/leds/leds-blinkm.c
> > Checking patch Documentation/leds/leds-blinkm.rst...
> > Checking patch Documentation/leds/well-known-leds.txt...
> > Checking patch drivers/leds/Kconfig...
> > Checking patch drivers/leds/leds-blinkm.c...
> > Applied patch Documentation/leds/leds-blinkm.rst cleanly.
> > Applied patch Documentation/leds/well-known-leds.txt cleanly.
> > Applied patch drivers/leds/Kconfig cleanly.
> > Applied patch drivers/leds/leds-blinkm.c cleanly.
> > Falling back to patching base and 3-way merge...
> > error: Your local changes to the following files would be overwritten by merge:
> > Documentation/leds/leds-blinkm.rst
> > Documentation/leds/well-known-leds.txt
> > drivers/leds/Kconfig
> > drivers/leds/leds-blinkm.c
> > Please commit your changes or stash them before you merge.
> > Aborting
> > error: Failed to merge in the changes.
> > Patch failed at 0001 Add multicolor support to BlinkM LED driver
> >
> > --
> > Lee Jones [李琼斯]
> Hi,
> I am having trouble recreating this issue. Maybe I am misunderstanding
> the maintainer workflow. I am working on the for-next branch of
> pavel/linux-leds.git. When I apply my generated patch file on a
> freshly cloned repository with `git am`, I don't get any errors. Any
> help is appreciated.
Pavel's for-next branch is 18 months old.
Use Linux -next.
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/
--
Lee Jones [李琼斯]
next prev parent reply other threads:[~2024-06-13 13:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 20:19 [PATCH v7] Add multicolor support to BlinkM LED driver Joseph Strauss
2024-05-31 10:38 ` Lee Jones
2024-05-31 23:20 ` Joseph Strauss
2024-06-13 13:49 ` Lee Jones [this message]
2024-06-13 13:53 ` Pavel Machek
2024-06-13 17:22 ` Lee Jones
2024-06-13 17:31 ` Lee Jones
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=20240613134933.GC2561462@google.com \
--to=lee@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=conor@kernel.org \
--cc=jansimon.moeller@gmx.de \
--cc=jstrauss@mailbox.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
/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).