All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Ondřej 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>,
	"open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: light: stk3310: add chip id for STK3311-X variant
Date: Sat, 18 Jul 2020 17:29:37 +0100	[thread overview]
Message-ID: <20200718172937.59f24822@archlinux> (raw)
In-Reply-To: <20200714104441.nrnaauqunjst67ix@core.my.home>

On Tue, 14 Jul 2020 12:44:41 +0200
Ondřej Jirman <megous@megous.com> wrote:

> Hello Jonathan,
> 
> On Sat, Jul 04, 2020 at 05:29:16PM +0100, Jonathan Cameron wrote:
> > 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?  
> 
> I've looked at it more, and there's no stk3311 either. It always has
> some suffix, like -sa -9 -a -wv -x, .... So I don't think a new
> ID in the table is neccessary. The driver can differentiate based on
> chip id, in case it will ever become necessary.
> 
Thanks for info.  In that case, applied to the togreg branch of iio.git
and pushed out as testing for the autobuilders to poke at it.

Thanks,

Jonathan

> regards,
> 	o.
> 
> > 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;  
> >   


      reply	other threads:[~2020-07-18 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
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 message]

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=20200718172937.59f24822@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.