iio: light: vcnl4000: Check type with switch case
authorAstrid Rost <astrid.rost@axis.com>
Tue, 13 Jun 2023 13:50:19 +0000 (15:50 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 20 Jul 2023 18:21:29 +0000 (19:21 +0100)
commit2be17b68892893a43864096d02a330b280e1ebdf
treed6eb3d7ec6109868b0e55dad5ae200ddf1f1c8d3
parente55c96daf7f12d9fb36109e4eae2af16b63fd92e
iio: light: vcnl4000: Check type with switch case

Check IIO_PROXIMITY  with switch case in order to make it easier
to add further types like light.
Add check for IIO_EV_INFO_VALUE for writing rising or falling events.

Signed-off-by: Astrid Rost <astrid.rost@axis.com>
Link: https://lore.kernel.org/r/20230613135025.2596641-4-astrid.rost@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/vcnl4000.c