提交 5ae34494 编写于 作者: S Subhajit Ghosh 提交者: Jonathan Cameron

iio: light: apds9960: Fix iio_event_spec structures

There is only one interrupt enable option for both ALS low and high
thresholds, and one for both Proximity low and high thresholds.
Signed-off-by: NSubhajit Ghosh <subhajit.ghosh@vixtechnology.com>
Reviewed-by: NMatt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20221110101241.10576-1-subhajit.ghosh@vixtechnology.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
上级 7b445238
...@@ -223,14 +223,16 @@ static const struct iio_event_spec apds9960_pxs_event_spec[] = { ...@@ -223,14 +223,16 @@ static const struct iio_event_spec apds9960_pxs_event_spec[] = {
{ {
.type = IIO_EV_TYPE_THRESH, .type = IIO_EV_TYPE_THRESH,
.dir = IIO_EV_DIR_RISING, .dir = IIO_EV_DIR_RISING,
.mask_separate = BIT(IIO_EV_INFO_VALUE) | .mask_separate = BIT(IIO_EV_INFO_VALUE),
BIT(IIO_EV_INFO_ENABLE),
}, },
{ {
.type = IIO_EV_TYPE_THRESH, .type = IIO_EV_TYPE_THRESH,
.dir = IIO_EV_DIR_FALLING, .dir = IIO_EV_DIR_FALLING,
.mask_separate = BIT(IIO_EV_INFO_VALUE) | .mask_separate = BIT(IIO_EV_INFO_VALUE),
BIT(IIO_EV_INFO_ENABLE), },
{
.type = IIO_EV_TYPE_THRESH,
.mask_separate = BIT(IIO_EV_INFO_ENABLE),
}, },
}; };
...@@ -238,14 +240,16 @@ static const struct iio_event_spec apds9960_als_event_spec[] = { ...@@ -238,14 +240,16 @@ static const struct iio_event_spec apds9960_als_event_spec[] = {
{ {
.type = IIO_EV_TYPE_THRESH, .type = IIO_EV_TYPE_THRESH,
.dir = IIO_EV_DIR_RISING, .dir = IIO_EV_DIR_RISING,
.mask_separate = BIT(IIO_EV_INFO_VALUE) | .mask_separate = BIT(IIO_EV_INFO_VALUE),
BIT(IIO_EV_INFO_ENABLE),
}, },
{ {
.type = IIO_EV_TYPE_THRESH, .type = IIO_EV_TYPE_THRESH,
.dir = IIO_EV_DIR_FALLING, .dir = IIO_EV_DIR_FALLING,
.mask_separate = BIT(IIO_EV_INFO_VALUE) | .mask_separate = BIT(IIO_EV_INFO_VALUE),
BIT(IIO_EV_INFO_ENABLE), },
{
.type = IIO_EV_TYPE_THRESH,
.mask_separate = BIT(IIO_EV_INFO_ENABLE),
}, },
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册