Messages in this thread | | | Subject | Device driver model: how to bind platform device to driver manually? | From | Peter Gsellmann <> | Date | Thu, 04 Nov 2010 23:32:16 +0100 |
| |
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
| |