From: Joshua Crofts <joshua.crofts1@gmail.com>
To: Zixin Wang <ywp1023456@foxmail.com>
Cc: "Kevin Tsai" <ktsai@capellamicro.com>,
"Jonathan Cameron" <jic23@kernel.org>,
linux-iio@vger.kernel.org,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>
Subject: Re: [PATCH] iio: light: cm32181: add support for the CM32183
Date: Sun, 11 Oct 2026 18:48:39 +0200 [thread overview]
Message-ID: <20261011184839.4d62884e@systembl0wer> (raw)
In-Reply-To: <tencent_C2E579008244A394105247CCC4787391C209@qq.com>
On Sun, 11 Oct 2026 08:48:56 +0000 (UTC)
Zixin Wang <ywp1023456@foxmail.com> wrote:
> The CM32183 is another member of the Capella CM3218x ambient light
> sensor family. Its device ID register (0x07) returns 0x83 in the low
> byte, following the same scheme as the already supported parts:
>
> CM3218 -> 0x18
> CM32181 -> 0x81
> CM32182 -> 0x82
> CM32183 -> 0x83
>
> The driver falls through to the default branch of the ID switch and
> returns -ENODEV, so probe() fails even though the device is present and
> functional:
>
> cm32181 i2c-CPLM3218:00: cm32181_probe: register init failed
>
> This was observed on an H3C MegaBook 14 (Intel Core Ultra 5 226V, Lunar
> Lake). Its DSDT declares the sensor as:
>
> Device (LSRD) {
> Name (_HID, "CPLM3218")
> Name (_CID, "CPLM3218")
> Name (_UID, 1)
> }
>
> on I2C at address 0x29, and additionally provides the vendor
> initialisation and calibration objects that this driver already parses.
> CPM0[0] reports a device-id of 32183, and CPM1 provides lux_per_bit =
> 2200 and calibscale = 265859.
>
> Treat the CM32183 like the CM32181.
>
> Measurements on the above machine confirm the register layout matches:
> the power-on value of the CMD register (0x0001) has bit 0 set, which is
> CM32181_CMD_ALS_DISABLE, and register 0x04 is the ALS data register.
> With this change the driver binds, the ACPI-provided initialisation
> values are written and the CPM1 calibration is taken into account
> (in_illuminance_calibscale reads back 265859). The reported illuminance
> tracks ambient light without saturating.
>
Code is good, but no need for the above to go into the commit message.
I'd have a commit message like:
Add the device ID for the CM32183. The device has the same register
layout as the CM32181.
What you wrote should IMO go under the ---.
--
Kind regards,
Joshua Crofts
next prev parent reply other threads:[~2026-10-11 16:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 8:48 [PATCH] iio: light: cm32181: add support for the CM32183 Zixin Wang
2026-10-11 16:48 ` Joshua Crofts [this message]
2026-10-13 13:19 ` Andy Shevchenko
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=20261011184839.4d62884e@systembl0wer \
--to=joshua.crofts1@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=ktsai@capellamicro.com \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=ywp1023456@foxmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.