Messages in this thread | | | Date | Thu, 8 Dec 2005 16:49:37 -0500 | From | Dmitry Torokhov <> | Subject | Re: [PATCH] Minor change to platform_device_register_simple prototype |
| |
On 12/8/05, Jean Delvare <khali@linux-fr.org> wrote: > > Another thing - bunch of input code currently creates platform devices > > but does not create corresponding platform drivers (because they don't > > support suspend/resume or shutdown and probing is done right there in > > module init function). > > > > What is the general policy on platform devices? Should they always have > > a corresponding driver or is it OK to leave them without one? > > If it wasn't OK, I'd expect platform_device_alloc and > platform_device_register to fail when no matching driver is found. > Since they do not, I'd guess it is considered OK not to have a matching > driver. But that's really only a guess and not a replacement for > Russell's (or Greg's) authoritative answer. > > Reciprocally, if it is finally decided that it is *not* OK to have a > platform device without a driver, they we want to make both functions > mentioned above fail when no match is found. >
I don't think so - some platforms could discover platform devices separately from drivers being loaded (think separate modules). Then, like with PCI, they would have devices without drivers... My question was more along the loines "do we want to waste some memory registering a driver that does absolutely nothing except for signalling userspace that drive is indeed has a driver attached". And letting userspace know that device is handled is probably a good thing.
-- Dmitry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |