Re: [PATCH v2] watchdog: at91rm9200 remove mach/ header dependency
From: Boris Brezillon
Date: Fri Nov 07 2014 - 11:06:25 EST
Hi Alexandre,
On Fri, 7 Nov 2014 14:22:44 +0100
Alexandre Belloni <alexandre.belloni@xxxxxxxxxxxxxxxxxx> wrote:
> Remove the mach/ header dependency by including the necessary macros and taking
> the appropriate resources from the system timer.
>
> Also change the name to avoid conflicting with the at91sam9 watchdog driver and
> allow to compile both the at91rm920 and at91sam9 watchdog drivers at the same
> time.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxxxxxxxxx>
> Suggested-by: Arnd Bergmann <arnd@xxxxxxxx>
> Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
>
> Changes in v2:
> - squashed both patches in one
[...]
> +
> res = misc_register(&at91wdt_miscdev);
> if (res)
> return res;
> @@ -267,7 +308,7 @@ static struct platform_driver at91wdt_driver = {
> .suspend = at91wdt_suspend,
> .resume = at91wdt_resume,
> .driver = {
> - .name = "at91_wdt",
> + .name = "at91rm9200_wdt",
> .owner = THIS_MODULE,
> .of_match_table = at91_wdt_dt_ids,
Shouldn't we avoid attaching this driver to the "atmel,at91rm9200-wdt"
compatible string ?
What I mean is that the watchdog should not be represented as a device
node under the apb bus, because it's actually a subdevice of the ST
(System Timer) block, neither it should be declared at the root of the
DT because it's not an external peripheral.
Given those constraints I don't know where we could put the watchdog
node...
I know that removing this of_match_table assignment would break the
existing binding, but nobody is currently using it (at least nobody is
using it in mainline).
Can't we use an MFD to create the watchdog platform device instead of
declaring this node at a random place ?
Regards,
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
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/