linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Frank Rowand <frowand.list@gmail.com>
Subject: Re: [PATCH 1/4] of/device: Add a way to probe drivers by match data
Date: Thu, 29 Nov 2018 19:01:54 -0600	[thread overview]
Message-ID: <CAL_JsqJuZAr7ndznrUu0cuM7DpB5A7ixjJ+vZ97s5G4xz0sVow@mail.gmail.com> (raw)
In-Reply-To: <154353772392.88331.16937191244549721858@swboyd.mtv.corp.google.com>

On Thu, Nov 29, 2018 at 6:28 PM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Stephen Boyd (2018-11-07 10:37:31)
> > appropriate structure with to_platform_device() or to_i2c_client()?
> >
> > So the example would become
> >
> >   struct of_driver_probe_func {
> >         int (*probe)(struct device *dev);
> >   };
> >
> >   struct of_driver_probe_func mtk_probes[] = {
> >         mtk_probe1,
> >         mtk_probe2,
> >         mtk_probe3,
> >   };
> >
> >   struct platform_driver mtk_driver = {
> >         .driver = {
> >                 .name = "mtk-foo";
> >                 .of_match_table = mtk_match_table,
> >                 .of_probes = &mtk_probes;
> >         },
> >   };
> >
> > And the probe functions might need to container_of() the device pointer
> > to get the struct they know they need. The probe function could also be
> > added to of_device_id and then we would have to look and see if that
> > pointer is populated when the device is matched in generic device code.
> >
>
> I guess I'll go down the path of extending the of_device_id structure?

Unfortunately, I don't think you can change of_device_id as it's part
of the kernel ABI.

Rob

  reply	other threads:[~2018-11-30  1:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 18:36 [PATCH 0/4] Simplify mediatek clk driver probes Stephen Boyd
2018-11-06 18:36 ` [PATCH 1/4] of/device: Add a way to probe drivers by match data Stephen Boyd
2018-11-06 20:44   ` Rob Herring
2018-11-07 18:37     ` Stephen Boyd
2018-11-09  9:56       ` Geert Uytterhoeven
2018-11-09 16:59         ` Stephen Boyd
2018-11-09 19:18           ` Geert Uytterhoeven
2018-11-30  0:28       ` Stephen Boyd
2018-11-30  1:01         ` Rob Herring [this message]
2018-11-30  7:03           ` Stephen Boyd
2018-11-08  8:29   ` Matthias Brugger
2018-11-08 17:58     ` Stephen Boyd
2018-11-09 10:29       ` Matthias Brugger
2018-11-09 10:36         ` Geert Uytterhoeven
2018-11-09 16:30           ` Rob Herring
2018-11-09 16:56           ` Frank Rowand
2018-11-06 18:36 ` [PATCH 2/4] clk: mediatek: Convert to platform_driver_probe_by_match_data() Stephen Boyd
2018-11-06 18:36 ` [PATCH 3/4] clk: mediatek: Drop THIS_MODULE from platform_driver Stephen Boyd
2018-11-06 18:36 ` [PATCH 4/4] clk: mediatek: Simplify single driver probes Stephen Boyd

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=CAL_JsqJuZAr7ndznrUu0cuM7DpB5A7ixjJ+vZ97s5G4xz0sVow@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=ryder.lee@mediatek.com \
    --cc=sboyd@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).