[PATCH 2/6] iio:pressure:ms5637: introduce hardware differentiation
Alexandre Belloni
alexandre.belloni at bootlin.com
Sun Dec 13 14:51:29 EST 2020
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
More information about the linux-arm-kernel
mailing list