summaryrefslogtreecommitdiff
path: root/drivers/iio/light/opt4060.c
AgeCommit message (Collapse)Author
2025-06-26iio: light: opt4060: use = { } instead of memset()David Lechner
Use { } instead of memset() to zero-initialize stack memory to simplify the code. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250611-iio-zero-init-stack-with-instead-of-memset-v1-20-ebb2d0a24302@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-06-26iio: light: opt4060: convert to use maple tree register cachechuguangqing
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: chuguangqing <chuguangqing@inspur.com> Link: https://patch.msgid.link/20250611085838.4761-11-chuguangqing@inspur.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-04-22iio: light: opt4060: Switch to sparse friendly iio_device_claim/release_direct()Jonathan Cameron
These new functions allow sparse to find failures to release direct mode reducing chances of bugs over the claim_direct_mode() functions that are deprecated. This is a case where the code is pinning down the mode so also has a claim on buffered mode. A follow up set may move those calls over to a sparse friendly form as well. Tested-by: Per-Daniel Olsson <perdaniel.olsson@axis.com> Reviewed-by: Per-Daniel Olsson <perdaniel.olsson@axis.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250309170633.1347476-10-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-12-28iio: light: Add support for TI OPT4060 color sensorPer-Daniel Olsson
Add support for Texas Instruments OPT4060 RGBW Color sensor. Signed-off-by: Per-Daniel Olsson <perdaniel.olsson@axis.com> Link: https://patch.msgid.link/20241218104836.2784523-3-perdaniel.olsson@axis.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>