From: Ondrej Jirman <megous@megous.com>
To: linux-kernel@vger.kernel.org
Cc: Icenowy Zheng <icenowy@aosc.io>,
Ondrej Jirman <megous@megous.com>,
Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Luca Weiss <luca@z3ntu.xyz>,
linux-iio@vger.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS)
Subject: [PATCH] iio: light: stk3310: add chip id for STK3311-X variant
Date: Fri, 3 Jul 2020 21:44:05 +0200 [thread overview]
Message-ID: <20200703194406.110855-1-megous@megous.com> (raw)
From: Icenowy Zheng <icenowy@aosc.io>
The STK3311 chip has a variant called STK3311-X, which has a different
chip id of 0x12.
Add the chip id to the driver.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
drivers/iio/light/stk3310.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index 185c24a75ae6..1a8401d198a4 100644
--- a/drivers/iio/light/stk3310.c
+++ b/drivers/iio/light/stk3310.c
@@ -37,6 +37,7 @@
#define STK3310_CHIP_ID_VAL 0x13
#define STK3311_CHIP_ID_VAL 0x1D
+#define STK3311X_CHIP_ID_VAL 0x12
#define STK3335_CHIP_ID_VAL 0x51
#define STK3310_PSINT_EN 0x01
#define STK3310_PS_MAX_VAL 0xFFFF
@@ -453,6 +454,7 @@ static int stk3310_init(struct iio_dev *indio_dev)
if (chipid != STK3310_CHIP_ID_VAL &&
chipid != STK3311_CHIP_ID_VAL &&
+ chipid != STK3311X_CHIP_ID_VAL &&
chipid != STK3335_CHIP_ID_VAL) {
dev_err(&client->dev, "invalid chip id: 0x%x\n", chipid);
return -ENODEV;
--
2.27.0
next reply other threads:[~2020-07-03 19:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 19:44 Ondrej Jirman [this message]
2020-07-04 16:29 ` [PATCH] iio: light: stk3310: add chip id for STK3311-X variant Jonathan Cameron
2020-07-04 17:09 ` Icenowy Zheng
2020-07-04 17:49 ` Ondřej Jirman
2020-07-14 10:44 ` Ondřej Jirman
2020-07-18 16:29 ` 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=20200703194406.110855-1-megous@megous.com \
--to=megous@megous.com \
--cc=icenowy@aosc.io \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca@z3ntu.xyz \
--cc=pmeerw@pmeerw.net \
/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;
as well as URLs for NNTP newsgroup(s).