linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: light: stk3310: add chip id for STK3311-X variant
@ 2020-07-03 19:44 Ondrej Jirman
  2020-07-04 16:29 ` Jonathan Cameron
  0 siblings, 1 reply; 6+ messages in thread
From: Ondrej Jirman @ 2020-07-03 19:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Icenowy Zheng, Ondrej Jirman, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler, Luca Weiss,
	open list:IIO SUBSYSTEM AND DRIVERS

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-18 16:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03 19:44 [PATCH] iio: light: stk3310: add chip id for STK3311-X variant Ondrej Jirman
2020-07-04 16:29 ` 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

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).