iio: light: tsl2563: Do not hardcode interrupt trigger type
authorFerry Toth <ftoth@exalondelft.nl>
Wed, 7 Dec 2022 19:03:38 +0000 (21:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:34 +0000 (09:39 +0100)
commit806d411350514e42029b5bf827f77059c154cb1d
treee2aad3159e45080485578a41246b2fdcb8578eea
parent0d6282dc2bd3247ca0bd5b83f294f1f58871edd6
iio: light: tsl2563: Do not hardcode interrupt trigger type

[ Upstream commit 027641b52fe37b64af61025298ce160c8b9b7a73 ]

Instead of hardcoding IRQ trigger type to IRQF_TRIGGER_RAISING,
let's respect the settings specified in the firmware description.
To be compatible with the older firmware descriptions, if trigger
type is not set up there, we'll set it to default (raising edge).

Fixes: 388be4883952 ("staging:iio: tsl2563 abi fixes and interrupt handling")
Fixes: bdab1001738f ("staging:iio:light:tsl2563 remove old style event registration.")
Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221207190348.9347-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/light/tsl2563.c