From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH 1/4] of/device: Add a way to probe drivers by match data Date: Fri, 9 Nov 2018 20:18:33 +0100 Message-ID: References: <20181106183609.207702-1-sboyd@kernel.org> <20181106183609.207702-2-sboyd@kernel.org> <154161585170.88331.1822872519370217248@swboyd.mtv.corp.google.com> <154178275324.88331.16237880990995819011@swboyd.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <154178275324.88331.16237880990995819011@swboyd.mtv.corp.google.com> Sender: linux-kernel-owner@vger.kernel.org To: Stephen Boyd Cc: Rob Herring , Michael Turquette , Linux Kernel Mailing List , Linux ARM , linux-clk , linux-mediatek@lists.infradead.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Matthias Brugger , ryder.lee@mediatek.com, Frank Rowand List-Id: devicetree@vger.kernel.org Hi Stephen, On Fri, Nov 9, 2018 at 5:59 PM Stephen Boyd wrote: > Quoting Geert Uytterhoeven (2018-11-09 01:56:01) > > On Wed, Nov 7, 2018 at 7:37 PM Stephen Boyd wrote: > > > Quoting Rob Herring (2018-11-06 12:44:52) > > > > On Tue, Nov 6, 2018 at 12:36 PM Stephen Boyd wrote: > > > int (*probe)(struct platform_device *pdev); > > > }; > > > > > > struct of_platform_driver_probe_func mtk_probes[] = { > > > mtk_probe1, > > > mtk_probe2, > > > mtk_probe3, > > > }; > > > > > > struct platform_driver mtk_driver = { > > > .of_probes = &mtk_probes; > > > .driver = { > > > .name = "mtk-foo"; > > > .of_match_table = mtk_match_table, > > > }, > > > }; > > > > This looks worse to me: people tend to be very good at keeping multiple > > arrays in sync :-( > > To be _not_ very good? Agreed, and so specifying the probe function as > another member in struct of_device_id seems to be the way to go. Correct, sometimes sarcasm doesn't arrive well at the other end of the electronic tunnel... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds