On 3/11/23, Xiang Xiao <xiaoxiang781...@gmail.com> wrote: > On Sun, Mar 12, 2023 at 12:12 AM Tim Hardisty <t...@hardisty.co.uk> wrote: > >> I submitted a PR for a driver for the Broadcom APDS-9922 ambient light >> and >> proximity sensor, written with what one might call the "traditional" >> method of setting up the device via ioctl, then reading data when >> available >> according to the device setup, via poll notify. >> >> The reviewer (Hi Alan - I'm not complaining!!) has suggested it perhaps >> ought to use the "new" sensor methodology with a sensor_lower_half_s etc. >> >> Looking at sensors that use this I can't see any that have the range of >> set-up options of this device and are just "there", in the main apart >> from >> calibration, for example. Nor any NuttX documentation I can see? >> >> Is this following a Linux methodology, like the power devices now do? >> When >> I did a power supply device drive I was pointed in the direction of Linux >> documentation that (after much reading and cogitation) helped explain >> what >> NuttX was essentially emulating and, with the addition of some more >> members >> to the regulator_desc_s struct it was then fine and I wrote it that way. >> >> I am still not convinced that this ALS/Proximity sensor necessarily fits >> the "new" sensor methodology but if someone can point me in the direction >> of relevant documentation I will gladly take a look. >> >> > Here is an intro video: https://www.youtube.com/watch?v=ESpAE6wqy9o >
Thank you Xiang! Since this subsystem is more complex than original char driver sensor, is there plans for Documentation ? Tim, I suggest you to take a look at LTR-308 sensoe (ltr308.c) is it also an ALS. So you can use it as reference. BR, Alan