Re: [PATCH 2/4] Driver core: add driver_probe_device

From: Dmitry Torokhov
Date: Sat Oct 30 2004 - 03:35:47 EST


On Friday 29 October 2004 03:22 pm, Greg KH wrote:
> Ok, care to redo the "driver" patch to be a symlink instead?  I think
> the last patch doesn't really need any changes, does it?
>

Coming your way.

> Hm, but how does this play with the current pci "add a new device id"
> scheme?  Can this "bind_mode" scheme work with that?
>

They really serve different purposes as far as I can see. new_id affects
matching (and is PCI specific), bind_mode affects binding of otherwise
matching device/driver pairs. Its main use is to give preference to one
driver and "punish" another.

For example we have atkbd, psmouse and serio_raw drivers working with
PS/2 ports. atkbd and psmouse are integrated into input subsystem and we
want to encourage their use. Still we don't support (rather detect) all
existing hardware yet so in some case raw access to PS/2 port (a-la 2.4
and earlier kernels) is desirable, so we have serio_raw. But because we
don't want it grab all free serio ports even if it loaded first it is
marked as manual bind.

Another example - you for some reason don't like touchpads and prefer an
external mouse. BUt the way serio subsystem works, even if you disconnect
serio port next time there is data it will try to find the driver again
- so you mark your port as manual bind to prevent new input device from
appearing.

The bind_mode can also be used to control experimental/deprecated features
and still have everything compiled/loaded.

--
Dmitry
-
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/