From: Lukas Timmermann <linux@timmermann.space>
To: lee@kernel.org, pavel@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux@timmermann.space
Subject: [PATCH v8 0/2] Support for Osram as3668 LED driver
Date: Fri, 8 Aug 2025 23:31:41 +0200 [thread overview]
Message-ID: <20250808213143.146732-1-linux@timmermann.space> (raw)
This patch adds basic support for the as3668 driver IC via I2C interface.
The IC is capable of driving four individual LEDs up to 25.5mA per
channel. Hardware blinking would be theoretically possible, but this chip
only supports a few set on/off-delays which makes using that feature
unfeasable, therefore my driver doesn't offer that capability.
It's intended applications is in mobile devices such as phones,
tablets and cameras. This driver was tested and is working on
a samsung-manta which is running postmarketOS with a near mainline kernel.
Please note: This is my first suggested patch to the kernel.
checkpatch.pl runs without warnings or errors.
I've read the docs in regards to the led subsystem,
coding style and submission of patches,
but I'm still a bit unsure about the general workflow.
I will try my best.
Changes in v8:
- Rearranged constants.
- Removed more newlines.
- Changed error messages to be more clear.
- Renamed variables.
- Removed revision check.
- Removed extra i2c read&write functions.
- Made initalisation code more readable with bitmasks.
- The code now wraps around before 100 chars instead of 80.
- Link to v7: https://lore.kernel.org/all/20250708141114.134950-1-linux@timmermann.space/
Changes in v7:
- Simplified multiple error messages. They now use dev_err_probe().
- Removed some newlines.
- Link to v6: https://lore.kernel.org/all/20250611083151.22150-1-linux@timmermann.space/
Changes in v6:
- Fixed missing error handling during init
- Fixed missing newline in error messages
- Fixed size calculation for memory allocation
- Fixed error handling for memory allocation
- Link to v5: https://lore.kernel.org/lkml/20250608231854.75668-1-linux@timmermann.space/
Changes in v5:
- Fixed debug and error messages using wrong format specifiers.
- Fixed missing include bitwise.h.
- Changed commit message for dt file to fit expected style.
- Link to v4: https://lore.kernel.org/lkml/20250607215049.29259-1-linux@timmermann.space/
Changes in v4:
- Fixed some mistakes made in the dt file pointed out in v3.
- Swapped dt and driver in patch series. DT now comes first.
- Fixed errors in Kconfig due to last minute changes.
- Added dt file into MAINTAINERS file.
- Link to v3: https://lore.kernel.org/lkml/20250604225838.102910-2-linux@timmermann.space/
Changes in v3:
- Fixed an extra whitespace in the dt bindings documentation.
- Sent patch to all related lists and maintainers.
- Link to v2: https://lore.kernel.org/lkml/20250531120715.302870-4-linux@timmermann.space/
Changes in v2:
- Fixed reading led subnodes in dt incorrectly,
which caused wrong numbering and a segfault when removing the driver module
- Fixed calling of_property_read_u8 with an int, causing a compiler error
- Added more error checking during writes to the i2c bus
- Link to v1: https://lore.kernel.org/linux-leds/20250530184219.78085-3-linux@timmermann.space/
Signed-off-by: Lukas Timmermann <linux@timmermann.space>
Lukas Timmermann (2):
dt-bindings: leds: Add new as3668 support
leds: as3668: Driver for the ams Osram 4-channel i2c LED driver
.../devicetree/bindings/leds/ams,as3668.yaml | 74 +++++++
MAINTAINERS | 7 +
drivers/leds/Kconfig | 13 ++
drivers/leds/Makefile | 1 +
drivers/leds/leds-as3668.c | 196 ++++++++++++++++++
5 files changed, 291 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/ams,as3668.yaml
create mode 100644 drivers/leds/leds-as3668.c
--
2.50.1
next reply other threads:[~2025-08-08 21:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 21:31 Lukas Timmermann [this message]
2025-08-08 21:31 ` [PATCH v8 1/2] dt-bindings: leds: Add new as3668 support Lukas Timmermann
2025-08-08 21:31 ` [PATCH v8 2/2] leds: as3668: Driver for the ams Osram 4-channel i2c LED driver Lukas Timmermann
2025-09-02 7:50 ` Lee Jones
2025-09-02 8:42 ` Lukas Timmermann
2025-09-02 12:09 ` 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=20250808213143.146732-1-linux@timmermann.space \
--to=linux@timmermann.space \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).