From: Subhajit Ghosh <subhajit.ghosh@vixtechnology.com>
To: matt.ranostay@konsulko.com, jic23@kernel.org, lars@metafoo.de,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org
Cc: Subhajit Ghosh <subhajit.ghosh@vixtechnology.com>
Subject: [PATCH] iio: light: apds9960: Fix iio_event_spec structures
Date: Thu, 10 Nov 2022 18:12:41 +0800 [thread overview]
Message-ID: <20221110101241.10576-1-subhajit.ghosh@vixtechnology.com> (raw)
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: Subhajit Ghosh <subhajit.ghosh@vixtechnology.com>
---
drivers/iio/light/apds9960.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
index 4141c0fa7bc4..df9ccbcf0ffe 100644
--- a/drivers/iio/light/apds9960.c
+++ b/drivers/iio/light/apds9960.c
@@ -223,14 +223,16 @@ static const struct iio_event_spec apds9960_pxs_event_spec[] = {
{
.type = IIO_EV_TYPE_THRESH,
.dir = IIO_EV_DIR_RISING,
- .mask_separate = BIT(IIO_EV_INFO_VALUE) |
- BIT(IIO_EV_INFO_ENABLE),
+ .mask_separate = BIT(IIO_EV_INFO_VALUE),
},
{
.type = IIO_EV_TYPE_THRESH,
.dir = IIO_EV_DIR_FALLING,
- .mask_separate = BIT(IIO_EV_INFO_VALUE) |
- BIT(IIO_EV_INFO_ENABLE),
+ .mask_separate = BIT(IIO_EV_INFO_VALUE),
+ },
+ {
+ .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[] = {
{
.type = IIO_EV_TYPE_THRESH,
.dir = IIO_EV_DIR_RISING,
- .mask_separate = BIT(IIO_EV_INFO_VALUE) |
- BIT(IIO_EV_INFO_ENABLE),
+ .mask_separate = BIT(IIO_EV_INFO_VALUE),
},
{
.type = IIO_EV_TYPE_THRESH,
.dir = IIO_EV_DIR_FALLING,
- .mask_separate = BIT(IIO_EV_INFO_VALUE) |
- BIT(IIO_EV_INFO_ENABLE),
+ .mask_separate = BIT(IIO_EV_INFO_VALUE),
+ },
+ {
+ .type = IIO_EV_TYPE_THRESH,
+ .mask_separate = BIT(IIO_EV_INFO_ENABLE),
},
};
--
2.34.1
--
This email is confidential. If you have received this email in error please
notify us immediately by return email and delete this email and any
attachments. Vix accepts no liability for any damage caused by this email
or any attachments due to viruses, interference, interception, corruption
or unauthorised access.
next reply other threads:[~2022-11-10 10:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 10:12 Subhajit Ghosh [this message]
2022-11-10 13:29 ` [PATCH] iio: light: apds9960: Fix iio_event_spec structures Matt Ranostay
2022-11-10 14:45 ` Subhajit Ghosh
2022-11-11 2:50 ` Matt Ranostay
2022-11-11 7:04 ` Subhajit Ghosh
2022-11-11 11:10 ` Jonathan Cameron
2022-11-11 13:44 ` Subhajit Ghosh
2022-11-12 17:47 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221110101241.10576-1-subhajit.ghosh@vixtechnology.com \
--to=subhajit.ghosh@vixtechnology.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.ranostay@konsulko.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox