From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Biju Das" <biju.das.jz@bp.renesas.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Jean Delvare" <jdelvare@suse.de>,
"Vladimir Oltean" <olteanv@gmail.com>,
linux-iio@vger.kernel.org,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] iio: dac: ti-dac5571: Use i2c_get_match_data()
Date: Thu, 17 Aug 2023 13:22:01 +0300 [thread overview]
Message-ID: <ZN30yevtrxRrzmS5@smile.fi.intel.com> (raw)
In-Reply-To: <CAMuHMdUVCS_D0SBtDBrLQbAkdt0ZUbMOca+ukdwUtnGqzUr+cA@mail.gmail.com>
On Wed, Aug 16, 2023 at 10:16:00AM +0200, Geert Uytterhoeven wrote:
> On Tue, Aug 15, 2023 at 6:50 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Tue, Aug 15, 2023 at 09:29:06AM +0200, Geert Uytterhoeven wrote:
> > > On Tue, Aug 15, 2023 at 9:19 AM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > On Sat, Aug 12, 2023 at 10:04:18AM +0100, Biju Das wrote:
...
> > > > > + {.compatible = "ti,dac5571", .data = &dac5571_spec[single_8bit] },
> > > > > + {.compatible = "ti,dac6571", .data = &dac5571_spec[single_10bit] },
> > > > > + {.compatible = "ti,dac7571", .data = &dac5571_spec[single_12bit] },
> > > > > + {.compatible = "ti,dac5574", .data = &dac5571_spec[quad_8bit] },
> > > > > + {.compatible = "ti,dac6574", .data = &dac5571_spec[quad_10bit] },
> > > > > + {.compatible = "ti,dac7574", .data = &dac5571_spec[quad_12bit] },
> > > > > + {.compatible = "ti,dac5573", .data = &dac5571_spec[quad_8bit] },
> > > > > + {.compatible = "ti,dac6573", .data = &dac5571_spec[quad_10bit] },
> > > > > + {.compatible = "ti,dac7573", .data = &dac5571_spec[quad_12bit] },
> > > > > + {.compatible = "ti,dac121c081", .data = &dac5571_spec[single_12bit] },
> > > >
> > > > I would reorder them a bit.
> > >
> > > Which is safe in this particular case...
> > > But not in general, as there might be fall-back compatible values.
> >
> > You mean the OF ID list must be specifically ordered?! What a nice minefield!
> > This has to be fixed somewhere else, surely.
>
> Seems like it is, cfr. the scoring system in drivers/of/base.c
> __of_device_is_compatible(). Sorry for the confusion.
>
> I still tend to order them in match tables though, from most-specific
> to least-specific.
>
> Note that soc_device_match() (which is used less, fortunately) does
> not have such a scoring system, so order does matter there.
Should be fixed there, because it's a big downside of OF.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-08-17 10:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 9:04 [PATCH] iio: dac: ti-dac5571: Use i2c_get_match_data() Biju Das
2023-08-15 7:18 ` Andy Shevchenko
2023-08-15 7:29 ` Geert Uytterhoeven
2023-08-15 16:50 ` Andy Shevchenko
2023-08-16 8:16 ` Geert Uytterhoeven
2023-08-17 10:22 ` Andy Shevchenko [this message]
2023-08-17 11:51 ` Geert Uytterhoeven
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=ZN30yevtrxRrzmS5@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=jdelvare@suse.de \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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