Searched hist:bfb6cfeeb83f314dd4a09ad6c9a24678f66c3b3b (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/iio/light/ |
H A D | vcnl4000.c | diff bfb6cfeeb83f314dd4a09ad6c9a24678f66c3b3b Tue Jan 17 20:00:16 CET 2023 Mårten Lindahl <marten.lindahl@axis.com> iio: light: vcnl4000: Make irq handling more generic
This driver supports 4 chips, by which only one (vcnl4010) handles interrupts and has support for triggered buffer. The setup of these functions is hardcoded for vcnl4010 inside the generic vcnl4000_probe, and thus ignores the chip specific configuration structure where all other chip specific functions are specified.
This complicates adding interrupt handler and triggered buffer support to chips which may have support for it.
Add members for irq threads and iio_buffer_setup_ops to the generic vcnl4000_chip_spec struct, so that instead of checking a chip specific boolean irq support, we check for a chip specific triggered buffer handler, and/or a chip specific irq thread handler.
Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230117190017.3789181-3-marten.lindahl@axis.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|