Re: [PATCH 12/24] pcspkr: register with driver core as a platfrom device

From: Dmitry Torokhov
Date: Tue Jan 10 2006 - 01:47:40 EST


On Tuesday 10 January 2006 01:41, Benjamin Herrenschmidt wrote:
> On Sat, 2006-01-07 at 12:16 -0500, Dmitry Torokhov wrote:
> > plain text document attachment (pcspkr-platform-device.patch)
> > Input: pcspkr - register with driver core as a platfrom device
>
> Hi Dimitri !
>
> That looks great, something we've been wanting to tackle for a while...
> except for one thing :)
>
> The actual creation of the device shouldn't be done there... only the
> driver should be there. The device instanciation should be moved to the
> i386 arch code (and/or any other architecture that might have this
> thing).
>
> On ppc64 for example, we have machines that will blow up when that
> driver tries to poke random IOs, but we also have machines that do have
> that legacy piece of hardware where expected. We can know it from the
> firmware, thus we can decide wether to create the platform device or not
> from the arch code.
>
> What do you prefer ? Keep that the way you did for now and add some
> #ifdef CONFIG_PPC64 with the ppc64 probe code in that driver or do you
> want to call all the way to moving the actual device creation to the
> platform code (as I think should be done) ?
>

Having platform code instantiate platform devices would be great but I
wonder how it will look like on x86 where we don't have a way to enumerate
devices. ACPI might do it but I am not sure if all DSDTs describe beepers...

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