lkml.org 
[lkml]   [2018]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/4] of/device: Add a way to probe drivers by match data
Date
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?

\
 
 \ /
  Last update: 2018-11-30 01:29    [W:0.098 / U:1.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site