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. Thx, TimH