Device driver model: how to bind platform device to drivermanually?

From: Peter Gsellmann
Date: Thu Nov 04 2010 - 19:02:13 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/