All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] iio:pressure:ms5637: introduce hardware differentiation
Date: Sun, 13 Dec 2020 20:51:29 +0100	[thread overview]
Message-ID: <20201213195129.GN1781038@piout.net> (raw)
In-Reply-To: <20201213171237.4dfe58f5@archlinux>

On 13/12/2020 17:12:37+0000, Jonathan Cameron wrote:
> >  static const int ms5637_samp_freq[6] = { 960, 480, 240, 120, 60, 30 };
> >  /* String copy of the above const for readability purpose */
> >  static const char ms5637_show_samp_freq[] = "960 480 240 120 60 30";
> > @@ -128,6 +133,7 @@ static const struct iio_info ms5637_info = {
> >  
> >  static int ms5637_probe(struct i2c_client *client)
> >  {
> > +	const struct ms_tp_data *data = device_get_match_data(&client->dev);
> 
> As a follow up to the earlier fun with greybus etc, have to jump through
> some hoops to have a fallback here if we have a firmware type that can't
> do get_match_data driver/base/sw_node.c is the one greybus is using.
> 
> We have drivers that don't do this because frankly I didn't know about it
> until a month or two ago.  However, I'm not keen to introduce any
> more.
> 

Couldn't greybus be fixed in that regard? Using the i2c_device_id has
been deprecated for a while now.

what we could do is only provide ms5803 support when there is an
of_node. So this doesn't break the ABI and doesn't break greybus and at
the same time doesn't unnecessarily add complexity to the probe for
something that will probably never be used.


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: devicetree@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/6] iio:pressure:ms5637: introduce hardware differentiation
Date: Sun, 13 Dec 2020 20:51:29 +0100	[thread overview]
Message-ID: <20201213195129.GN1781038@piout.net> (raw)
In-Reply-To: <20201213171237.4dfe58f5@archlinux>

On 13/12/2020 17:12:37+0000, Jonathan Cameron wrote:
> >  static const int ms5637_samp_freq[6] = { 960, 480, 240, 120, 60, 30 };
> >  /* String copy of the above const for readability purpose */
> >  static const char ms5637_show_samp_freq[] = "960 480 240 120 60 30";
> > @@ -128,6 +133,7 @@ static const struct iio_info ms5637_info = {
> >  
> >  static int ms5637_probe(struct i2c_client *client)
> >  {
> > +	const struct ms_tp_data *data = device_get_match_data(&client->dev);
> 
> As a follow up to the earlier fun with greybus etc, have to jump through
> some hoops to have a fallback here if we have a firmware type that can't
> do get_match_data driver/base/sw_node.c is the one greybus is using.
> 
> We have drivers that don't do this because frankly I didn't know about it
> until a month or two ago.  However, I'm not keen to introduce any
> more.
> 

Couldn't greybus be fixed in that regard? Using the i2c_device_id has
been deprecated for a while now.

what we could do is only provide ms5803 support when there is an
of_node. So this doesn't break the ABI and doesn't break greybus and at
the same time doesn't unnecessarily add complexity to the probe for
something that will probably never be used.


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-12-13 19:52 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 23:48 [PATCH 0/6] iio:pressure:ms5637: add ms5803 support Alexandre Belloni
2020-12-09 23:48 ` Alexandre Belloni
2020-12-09 23:48 ` [PATCH 1/6] iio:pressure:ms5637: switch to probe_new Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-12 13:26   ` Andy Shevchenko
2020-12-12 13:26     ` Andy Shevchenko
2020-12-13 17:04     ` Jonathan Cameron
2020-12-13 17:04       ` Jonathan Cameron
2020-12-09 23:48 ` [PATCH 2/6] iio:pressure:ms5637: introduce hardware differentiation Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-13 17:12   ` Jonathan Cameron
2020-12-13 17:12     ` Jonathan Cameron
2020-12-13 19:51     ` Alexandre Belloni [this message]
2020-12-13 19:51       ` Alexandre Belloni
2020-12-09 23:48 ` [PATCH 3/6] iio:pressure:ms5637: limit available sample frequencies Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-12 18:26   ` Andy Shevchenko
2020-12-12 18:26     ` Andy Shevchenko
2020-12-13 17:17     ` Jonathan Cameron
2020-12-13 17:17       ` Jonathan Cameron
2020-12-09 23:48 ` [PATCH 4/6] iio:common:ms_sensors:ms_sensors_i2c: rework CRC calculation helper Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-09 23:48 ` [PATCH 5/6] iio:common:ms_sensors:ms_sensors_i2c: add support for alternative PROM layout Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-13 17:20   ` Jonathan Cameron
2020-12-13 17:20     ` Jonathan Cameron
2020-12-13 19:34     ` Alexandre Belloni
2020-12-13 19:34       ` Alexandre Belloni
2020-12-09 23:48 ` [PATCH 6/6] iio:pressure:ms5637: add ms5803 support Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-11  3:34   ` Rob Herring
2020-12-11  3:34     ` Rob Herring
2020-12-11  8:08     ` Alexandre Belloni
2020-12-11  8:08       ` Alexandre Belloni

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=20201213195129.GN1781038@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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.