From: David Lechner <dlechner@baylibre.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 0/5] Update APDS990x ALS to support device trees
Date: Sat, 18 Apr 2026 17:18:54 -0500 [thread overview]
Message-ID: <ebd1fd7b-ee47-40e7-b953-cfe7bff41961@baylibre.com> (raw)
In-Reply-To: <CAPVz0n1ph0Cjw9WOqoVPaEywF0MzaNXeEjw6=0rKf4qLWiJZtw@mail.gmail.com>
On 4/18/26 2:48 PM, Svyatoslav Ryhel wrote:
> сб, 18 квіт. 2026 р. о 19:24 David Lechner <dlechner@baylibre.com> пише:
>>
>> On 4/18/26 9:47 AM, Svyatoslav Ryhel wrote:
>>> Document Avago APDS9900/9901 ALS/Proximity sensor in schema and modernize
>>> its driver to support OF bindings.
>>>
>>> Svyatoslav Ryhel (5):
>>> dt-bindings: iio: light: Document Avago APDS9900/9901 ALS/Proximity
>>> sensor
>>> misc: apds990x: Use more device managed approach in the probe
>>> misc: apds990x: Drop Vled supply
>>> misc: apds990x: Convert to use OF bindings
>>> misc: apds990x: Drop IRQF_TRIGGER_LOW trigger
>>>
>>> .../bindings/iio/light/avago,apds9900.yaml | 83 ++++++++
>>> drivers/misc/apds990x.c | 197 +++++++++---------
>>
>> As mentioned in my reply to the dt-bindings patch, there is already an
>> IIO driver that looks like it could be compatible. I'm guessing that
>> this misc driver pre-dates the IIO subsystem. I would have a look at it
>> instead (drivers/iio/light/tsl2772.c).
>>
>
> tsl2772 driver fits, thanks for pointing out. Maybe you know how
> apds9930 lux table was calculated? It is quite obscure to me.
The tsl2772 driver says:
/*
* Different devices require different coefficents, and these numbers were
* derived from the 'Lux Equation' section of the various device datasheets.
* All of these coefficients assume a Glass Attenuation (GA) factor of 1.
* The coefficients are multiplied by 1000 to avoid floating point operations.
* The two rows in each table correspond to the Lux1 and Lux2 equations from
* the datasheets.
*/
So probably just need to look up the A tsl datasheet and compare it to the
apds datasheet. The apds has some equations with GA, so just need to figure
out what Lux1 and Lux2 correspond to.
>
> Obviously this patchset is obsolete and different set of changes is required.
>
>>> include/linux/platform_data/apds990x.h | 65 ------
>>> 3 files changed, 187 insertions(+), 158 deletions(-)
>>> create mode 100644 Documentation/devicetree/bindings/iio/light/avago,apds9900.yaml
>>> delete mode 100644 include/linux/platform_data/apds990x.h
>>>
>>
next prev parent reply other threads:[~2026-04-18 22:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-18 14:47 [PATCH v1 0/5] Update APDS990x ALS to support device trees Svyatoslav Ryhel
2026-04-18 14:47 ` [PATCH v1 1/5] dt-bindings: iio: light: Document Avago APDS9900/9901 ALS/Proximity sensor Svyatoslav Ryhel
2026-04-18 16:21 ` David Lechner
2026-04-18 14:47 ` [PATCH v1 2/5] misc: apds990x: Use more device managed approach in the probe Svyatoslav Ryhel
2026-04-18 14:47 ` [PATCH v1 3/5] misc: apds990x: Drop Vled supply Svyatoslav Ryhel
2026-04-18 14:47 ` [PATCH v1 4/5] misc: apds990x: Convert to use OF bindings Svyatoslav Ryhel
2026-04-18 14:47 ` [PATCH v1 5/5] misc: apds990x: Drop IRQF_TRIGGER_LOW trigger Svyatoslav Ryhel
2026-04-18 16:24 ` [PATCH v1 0/5] Update APDS990x ALS to support device trees David Lechner
2026-04-18 19:48 ` Svyatoslav Ryhel
2026-04-18 22:18 ` David Lechner [this message]
2026-04-18 20:18 ` Arnd Bergmann
2026-04-19 8:00 ` Svyatoslav Ryhel
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=ebd1fd7b-ee47-40e7-b953-cfe7bff41961@baylibre.com \
--to=dlechner@baylibre.com \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=rdunlap@infradead.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