public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Sui Jingfeng <sui.jingfeng@linux.dev>,
	dri-devel@lists.freedesktop.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Daniel Scally <djrscally@gmail.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH v2] software node: Implement device_get_match_data fwnode callback
Date: Wed, 24 Apr 2024 17:52:03 +0300	[thread overview]
Message-ID: <Zikck2FJb4-PgXX0@smile.fi.intel.com> (raw)
In-Reply-To: <CAA8EJpr1FSjizAh6Dp5Bmux3NrGYh=BfHFL4D1fa87Og4ymY0w@mail.gmail.com>

On Wed, Apr 24, 2024 at 04:34:39PM +0300, Dmitry Baryshkov wrote:
> On Wed, 24 Apr 2024 at 16:11, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Wed, Apr 24, 2024 at 12:37:16AM +0300, Dmitry Baryshkov wrote:
> > > On Wed, Apr 24, 2024 at 12:49:18AM +0800, Sui Jingfeng wrote:
> > > > On 2024/4/23 21:28, Andy Shevchenko wrote:
> > > > > On Tue, Apr 23, 2024 at 12:46:58AM +0800, Sui Jingfeng wrote:

...

> > > But let me throw an argument why this patch (or something similar) looks
> > > to be necessary.
> > >
> > > Both on DT and non-DT systems the kernel allows using the non-OF based
> > > matching. For the platform devices there is platform_device_id-based
> > > matching.
> > >
> > > Currently handling the data coming from such device_ids requires using
> > > special bits of code, e.g. platform_get_device_id(pdev)->driver_data to
> > > get the data from the platform_device_id. Having such codepaths goes
> > > against the goal of unifying DT and non-DT paths via generic property /
> > > fwnode code.
> > >
> > > As such, I support Sui's idea of being able to use device_get_match_data
> > > for non-DT, non-ACPI platform devices.
> >
> > I'm not sure I buy this. We have a special helpers based on the bus type to
> > combine device_get_match_data() with the respective ID table crawling, see
> > the SPI and I²C cases as the examples.
> 
> I was thinking that we might be able to deprecate these helpers and
> always use device_get_match_data().

True, but that is orthogonal to swnode match_data support, right?
There even was (still is?) a patch series to do something like a new
member to struct device_driver (? don't remember) to achieve that.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-04-24 14:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 16:46 [PATCH v2] software node: Implement device_get_match_data fwnode callback Sui Jingfeng
2024-04-23 13:28 ` Andy Shevchenko
2024-04-23 16:49   ` Sui Jingfeng
2024-04-23 21:37     ` Dmitry Baryshkov
2024-04-24  5:09       ` Sui Jingfeng
2024-04-24  8:39         ` Dmitry Baryshkov
2024-04-24 10:51           ` Sui Jingfeng
2024-04-24 12:21           ` Sui Jingfeng
2024-04-24 13:10       ` Andy Shevchenko
2024-04-24 13:34         ` Dmitry Baryshkov
2024-04-24 14:52           ` Andy Shevchenko [this message]
2024-04-24 16:34             ` Dmitry Baryshkov
2024-04-24 16:44               ` Andy Shevchenko
2024-04-24 19:32                 ` Dmitry Baryshkov
2024-04-25 13:42                 ` Sui Jingfeng
2024-04-25 13:49                   ` Andy Shevchenko
2024-04-24 18:19               ` Sui Jingfeng

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=Zikck2FJb4-PgXX0@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=djrscally@gmail.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sui.jingfeng@linux.dev \
    /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