All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: "Mark Brown" <broonie@kernel.org>,
	"Mike Looijmans" <mike.looijmans@topic.nl>,
	"Andreas Helbech Kleist" <andreaskleist@gmail.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"Prabhakar Mahadev Lad" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>
Subject: Re: [PATCH v2 1/2] Input: exc3000 - Simplify probe()
Date: Tue, 18 Jul 2023 11:36:34 -0700	[thread overview]
Message-ID: <ZLbbslBiIQXFWpmN@google.com> (raw)
In-Reply-To: <OS0PR01MB59225D8CF3E96808DD776A8E863BA@OS0PR01MB5922.jpnprd01.prod.outlook.com>

On Mon, Jul 17, 2023 at 06:45:27PM +0000, Biju Das wrote:
> Hi Dmitry,
> 
> > Subject: Re: [PATCH v2 1/2] Input: exc3000 - Simplify probe()
> > 
> > On Mon, Jul 17, 2023 at 07:15:50PM +0100, Mark Brown wrote:
> > > On Mon, Jul 17, 2023 at 04:35:02PM +0000, Biju Das wrote:
> > >
> > > > The .device_get_match_data callbacks are missing for I2C and SPI bus
> > subsystems.
> > > > Can you please throw some lights on this?
> > >
> > > It's the first time I've ever heard of that callback, I don't know why
> > > whoever added it wouldn't have done those buses in particular or if it
> > > just didn't happen.  Try adding it and if it works send the patches?
> > 
> > I think there is a disconnect. Right now device_get_match_data callbacks
> > are part of fwnode_operations. I was proposing to add another optional
> > device_get_match_data callback to 'struct bus_type' to allow individual
> > buses control how match data is handled, before (or after) jumping into
> > the fwnode-backed device_get_match_data callbacks.
> 
> That is what implemented here [1] and [2] right?
> 
> [1] https://elixir.bootlin.com/linux/v6.5-rc2/source/drivers/i2c/i2c-core-base.c#L117
> [2] https://elixir.bootlin.com/linux/v6.5-rc2/source/drivers/spi/spi.c#L364
> 
> First it check for fwnode-backed device_get_match_data callbacks and
> Fallback is bus-type based match.
> 
> Looks like you are proposing to unify [1] and [2] and you want the
> logic to be other way around. ie, first bus-type match, then
> fwnode-backed callbacks?
> 

I do not have a strong preference for the ordering, i.e. I think it is
perfectly fine to do the generic fwnode-based lookup and if there is no
match have bus method called as a fallback, but I do not want driver
writers to learn about multiple <bus-prefix>_get_match_data()
implementations, I would prefer if they could call
device_get_match_data() and the right thing happened in all cases.

Thanks.

-- 
Dmitry

  reply	other threads:[~2023-07-18 18:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 13:17 [PATCH v2 0/2] exc3000 driver enhancements Biju Das
2023-07-17 13:17 ` [PATCH v2 1/2] Input: exc3000 - Simplify probe() Biju Das
2023-07-17 15:58   ` Dmitry Torokhov
2023-07-17 16:35     ` Biju Das
2023-07-17 18:15       ` Mark Brown
2023-07-17 18:27         ` Biju Das
2023-07-17 18:28         ` Dmitry Torokhov
2023-07-17 18:45           ` Biju Das
2023-07-18 18:36             ` Dmitry Torokhov [this message]
2023-07-19  6:43               ` Biju Das
2023-07-21 22:10                 ` Dmitry Torokhov
2023-07-22 17:51                   ` Biju Das
2023-07-23  1:17                     ` Dmitry Torokhov
2023-07-23  6:05                       ` Biju Das
2023-07-23  6:50                         ` Biju Das
2023-07-23 20:06                           ` Dmitry Torokhov
2023-07-17 18:49           ` Mark Brown
2023-07-17 13:17 ` [PATCH v2 2/2] Input: exc3000 - Drop enum eeti_dev_id and split exc3000_info[] Biju Das

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=ZLbbslBiIQXFWpmN@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=andreaskleist@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mike.looijmans@topic.nl \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wsa+renesas@sang-engineering.com \
    /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.