[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a0a4bb894689f0377ac7a3e3eb750516459fe1bb.camel@gmail.com>
Date: Fri, 18 Aug 2023 18:41:02 +0200
From: Angel Iglesias <ang.iglesiasg@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH 1/2] iio: pressure: bmp280: Allow multiple chips id per
family of devices
On Fri, 2023-08-18 at 18:57 +0300, Andy Shevchenko wrote:
> On Fri, Aug 18, 2023 at 05:52:07PM +0200, Angel Iglesias wrote:
> > On Fri, 2023-08-18 at 14:19 +0300, Andy Shevchenko wrote:
> > > On Thu, Aug 17, 2023 at 11:05:21PM +0200, Angel Iglesias wrote:
>
> ...
>
> > > > - const unsigned int chip_id;
> > >
> > > Yeah, this const makes a little sense...
> > >
> > > > + const unsigned int *chip_id;
> > >
> > > ...but not this :-)
> >
> > Isn't the same case as "const struct iio_chan_spec *channels" or "const int
> > *oversampling_temp_avail". I thoght that this meant a pointer to a constant
> > integer. On bmp280-core I declare the arrays with the modifiers static
> > const.
>
> Yes, and that is my point:
> - old code makes a little sense
> - new code makes a lot of sense
Thanks for the clarification. I initially understood the opposite :S
> > > What I'm wondering is why it's int and not u8 / u16
> > > (as it seems only a byte value there).
> >
> > Yeah, can be u8, as the reg width is 1 byte and this IDs are stored on one
> > reg.
> > I just carried over the int type from previous versions, but it's just
> > wasting
> > space :/
>
Powered by blists - more mailing lists