From: Jonathan Cameron <jic23@kernel.org>
To: Ondrej Jirman <megous@megous.com>
Cc: linux-kernel@vger.kernel.org, Icenowy Zheng <icenowy@aosc.io>,
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: Re: [PATCH] iio: light: stk3310: add chip id for STK3311-X variant
Date: Sat, 4 Jul 2020 17:29:16 +0100 [thread overview]
Message-ID: <20200704172916.7a8a7359@archlinux> (raw)
In-Reply-To: <20200703194406.110855-1-megous@megous.com>
On Fri, 3 Jul 2020 21:44:05 +0200
Ondrej Jirman <megous@megous.com> wrote:
> 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>
Given this is clearly not quite compatible with the stk3311 probably
best to also add a an id to the of id table. Any idea what else
is different?
Thanks,
Jonathan
> ---
> 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;
next prev parent reply other threads:[~2020-07-04 16:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20200704172916.7a8a7359@archlinux \
--to=jic23@kernel.org \
--cc=icenowy@aosc.io \
--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=megous@megous.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.