devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Angel Iglesias <ang.iglesiasg@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-iio@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Nikita Yushchenko <nikita.yoush@cogentembedded.com>,
	Paul Cercueil <paul@crapouillou.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Andreas Klinger <ak@it-klinger.de>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] iio: pressure: bmp280: Add enumeration to handle chip variants
Date: Sun, 8 Jan 2023 12:41:05 +0000	[thread overview]
Message-ID: <20230108124105.1cdc5627@jic23-huawei> (raw)
In-Reply-To: <e13c4e3962923994c853b115a5606633387991db.camel@gmail.com>

On Sun, 01 Jan 2023 12:04:40 +0100
Angel Iglesias <ang.iglesiasg@gmail.com> wrote:

> On Tue, 2022-12-27 at 23:37 +0200, Andy Shevchenko wrote:
> > On Mon, Dec 26, 2022 at 03:29:20PM +0100, Angel Iglesias wrote:  
> > > Adds enumeration to improve handling the different supported sensors
> > > on driver initialization. This avoid collisions if different variants
> > > share the same device idetifier on ID register.  
> > 
> > As per v1, use pointers in the ID tables.
> >   
> 
> Taking your suggestion and Jonathan's remarks into account seems to me like the
> best approach here is using chip_info pointer for each driver as the pointer set
> on the id tables.

Yes.

> As in the i2c and spi drivers, the enum is used to fetch the
> correct regmap configuration, and later in the shared probe, the chip_info. The
> logical follow-up would be adding the regmap configuration to the chip_info,
> right?

Makes sense.

> Or is there a better solution I'm not seeing right now?

If I'm understanding what you have above, then this is exactly what we would
want to do here.

Thanks,

Jonathan

> 
> Thanks for your time,
> Angel


  reply	other threads:[~2023-01-08 12:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-26 14:29 [PATCH v2 0/5] Add support for pressure sensor Bosch BMP580 Angel Iglesias
2022-12-26 14:29 ` [PATCH v2 1/5] iio: pressure: bmp280: Add enumeration to handle chip variants Angel Iglesias
2022-12-27 21:37   ` Andy Shevchenko
2023-01-01 11:04     ` Angel Iglesias
2023-01-08 12:41       ` Jonathan Cameron [this message]
2022-12-30 18:14   ` Jonathan Cameron
2023-01-01 10:56     ` Angel Iglesias
2022-12-26 14:29 ` [PATCH v2 2/5] iio: pressure: bmp280: Add preinit callback Angel Iglesias
2022-12-27 21:41   ` Andy Shevchenko
2023-01-01 11:06     ` Angel Iglesias
2022-12-30 18:18   ` Jonathan Cameron
2023-01-01 11:09     ` Angel Iglesias
2022-12-26 14:29 ` [PATCH v2 3/5] iio: pressure: bmp280: Add support for new sensor BMP580 Angel Iglesias
2022-12-29 17:35   ` Christophe JAILLET
2022-12-29 18:23     ` Angel Iglesias
2022-12-30 18:22       ` Jonathan Cameron
2023-01-01 11:16         ` Angel Iglesias
2023-01-08 12:35           ` Jonathan Cameron
2023-01-12 10:38             ` Contact Bosch-Sensortec (BST/SA)
2022-12-30 18:45   ` Jonathan Cameron
2023-01-01 11:46     ` Angel Iglesias
2023-01-08 12:38       ` Jonathan Cameron
2022-12-26 14:29 ` [PATCH v2 4/5] dt-bindings: iio: pressure: bmp085: Add BMP580 compatible string Angel Iglesias
2022-12-27  8:11   ` Krzysztof Kozlowski
2022-12-26 14:29 ` [PATCH v2 5/5] iio: pressure: bmp280: Add nvmem operations for BMP580 Angel Iglesias
2022-12-30 18:49   ` Jonathan Cameron
2023-01-01 11:48     ` Angel Iglesias
2022-12-26 22:05 ` [PATCH v2 4/5] dt-bindings: iio: pressure: bmp085: Add BMP580 compatible string Rob Herring

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=20230108124105.1cdc5627@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=ak@it-klinger.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=ang.iglesiasg@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikita.yoush@cogentembedded.com \
    --cc=paul@crapouillou.net \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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).