Hi Steven, On Sun, Jun 17, 2012 at 2:10 PM, Steven King <sfk...@fdwdc.com> wrote: > On Sunday 17 June 2012 4:50:27 am Geert Uytterhoeven wrote: >> On Sun, Jun 17, 2012 at 1:40 PM, Steven King <sfk...@fdwdc.com> wrote: >> > On Sunday 17 June 2012 4:15:03 am Geert Uytterhoeven wrote: >> >> On Sun, Jun 17, 2012 at 11:23 AM, Steven King <sfk...@fdwdc.com> wrote: >> >> > On Sunday 17 June 2012 2:09:51 am Geert Uytterhoeven wrote: >> >> >> On Sun, Jun 17, 2012 at 9:50 AM, Steven King <sfk...@fdwdc.com> wrote: >> >> >> > +config RTC_DRV_M5441x >> >> >> > + tristate "Freescale Coldfire M5441x RTC support" >> >> >> > + depends on M5441x >> >> >> > + help >> >> >> > + This enables support for the RTC on the Freescale >> >> >> > Coldfire 5441x + (54410/54415/54416/54417/54418). >> >> >> > + >> >> >> > + This driver can also be built as a module. If so, the >> >> >> > module + will be called rtc-m5441x. >> >> >> >> >> >> But the platform device is called differently: >> >> >> > +static struct platform_driver m5441x_rtc_driver = { >> >> >> > + .driver.name = "mcfrtc", >> >> >> > + .driver.owner = THIS_MODULE, >> >> >> > + .remove = __devexit_p(m5441x_rtc_remove), >> >> >> > +}; >> >> >> >> >> >> Is there a specific reason for that? >> >> > >> >> > You mean the "mcfrtc" bit? Thats the same as what we do for all of >> >> > the other >> >> >> >> That's what I meant. >> >> >> >> > Coldfire peripherals, ie "mcfqspi", "mcfuart", etc. >> >> >> >> So why not call the driver mcf-rtc? >> > >> > Because that rtc implementation is specific to the m5441x; should someone >> > implement a driver for the rtc on the 532x or 54455 which are somewhat >> > different than the m5441x, then they might well need a separate rtc-m532x >> > or rtc-m54455. >> >> At that point, you'll have to call the platform device rtc-m532x or >> rtc-m54455 as well, as mcfrtc is already taken for the m5441x, right? > > No. The others would still use mcfrtc as their device name. Thats the whole > point. The platform code in arch/m68k/platform/coldfire/device.c can have > single definition of an 'mcfrtc' device and which ever coldfire version is > selected determines which rtc would be availible.
You cannot have 2 platform drivers with the same name driving different hardware, as that would cause conflicts if you build a kernel with both drivers. I see you have "config RTC_DRV_M5441x depends on M5441x" to enforce this limitation, but in general, it's encouraged to make drivers build on as many platforms as possible, as this tends to reveal bugs. >> So why not call the platform device rtc-m5441x now? > > Because that would be wrong. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev