lkml.org 
[lkml]   [2010]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectDevice driver model: how to bind platform device to driver manually?
From
Date
In my board-specific initialization, i have registered platform devices
with resources and names so they are not bound automatically to any
default platform drivers (intentionally).

Later on, i install the platform driver candidates as kernel modules
with platform_driver_register().

Now the problem: how to trigger the mydriver_probe() function with the
correct platform device?

I see 2 possible solutions:

1.
echo 'platform:mydevice' > /sys/bus/platform/mydriver/bind

2.
echo 'bindinginfo' > /sys/bus/platform/drivers_probe

Which of the two is the correct (canonical) one?
Is there a third option?
The strings 'platform:mydevice' , 'bindinginfo' are obviously wrong.
What to echo instead?
Is there documentation beside ./Documentation/driver-model/*.txt ?


My platform device is visible as /sys/devices/platform/mydevice/ with
files modalias, uevent and also in /proc/iomem
My platform driver is visible as /sys/bus/platform/mydriver/ with
files bind, unbind, uevent.


TIA,
Peter Gsellmann



\
 
 \ /
  Last update: 2010-11-05 00:05    [W:0.331 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site