linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: twl4030_wdt: Watchdog device registration issue fix
@ 2011-03-01 20:47 Keerthy
  2011-03-28 11:04 ` J, KEERTHY
  0 siblings, 1 reply; 3+ messages in thread
From: Keerthy @ 2011-03-01 20:47 UTC (permalink / raw)
  To: linux-watchdog, wim; +Cc: linux-omap, j-keerthy

twl4030_wdt driver and omap_wdt driver are registering as misc_device name as
"watchdog" and the same minor number WATCHDOG_MINOR( value = 130).
There is a conflict since the name and minor were the same for
both the misc_device registered by omap_wdt.c as well as twl4030_wdt.c

The omap_wdt.c probe is getting called first. Hence it succeeds.
twl4030_wdt.c always failed on the minor number comparison check.
Now requesting for MISC_DYNAMIC_MINOR as the minor
number for twl4030_watchdog and renamed the device name as
"twl4030_watchdog".

Tested for basic boot up on OMAP4 Blaze and OMAP3630 SDP. OMAP3630 SDP
twl4030_wdt registration succeeds.2430SDP boot tested, watchdog registration
without errors.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/watchdog/twl4030_wdt.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c
index b5045ca..89bf78d 100644
--- a/drivers/watchdog/twl4030_wdt.c
+++ b/drivers/watchdog/twl4030_wdt.c
@@ -183,8 +183,8 @@ static int __devinit twl4030_wdt_probe(struct platform_device *pdev)
 	wdt->timer_margin	= 30;
 	wdt->miscdev.parent	= &pdev->dev;
 	wdt->miscdev.fops	= &twl4030_wdt_fops;
-	wdt->miscdev.minor	= WATCHDOG_MINOR;
-	wdt->miscdev.name	= "watchdog";
+	wdt->miscdev.minor      = MISC_DYNAMIC_MINOR;
+	wdt->miscdev.name       = "twl4030_watchdog";
 
 	platform_set_drvdata(pdev, wdt);
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: twl4030_wdt: Watchdog device registration issue fix
  2011-03-01 20:47 [PATCH] watchdog: twl4030_wdt: Watchdog device registration issue fix Keerthy
@ 2011-03-28 11:04 ` J, KEERTHY
  2011-03-28 21:07   ` Wim Van Sebroeck
  0 siblings, 1 reply; 3+ messages in thread
From: J, KEERTHY @ 2011-03-28 11:04 UTC (permalink / raw)
  To: linux-watchdog, wim; +Cc: linux-omap, j-keerthy

Hello All,

Any comments on this patch?

Regards,
Keerthy

On Wed, Mar 2, 2011 at 2:17 AM, Keerthy <j-keerthy@ti.com> wrote:
> twl4030_wdt driver and omap_wdt driver are registering as misc_device name as
> "watchdog" and the same minor number WATCHDOG_MINOR( value = 130).
> There is a conflict since the name and minor were the same for
> both the misc_device registered by omap_wdt.c as well as twl4030_wdt.c
>
> The omap_wdt.c probe is getting called first. Hence it succeeds.
> twl4030_wdt.c always failed on the minor number comparison check.
> Now requesting for MISC_DYNAMIC_MINOR as the minor
> number for twl4030_watchdog and renamed the device name as
> "twl4030_watchdog".
>
> Tested for basic boot up on OMAP4 Blaze and OMAP3630 SDP. OMAP3630 SDP
> twl4030_wdt registration succeeds.2430SDP boot tested, watchdog registration
> without errors.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>  drivers/watchdog/twl4030_wdt.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c
> index b5045ca..89bf78d 100644
> --- a/drivers/watchdog/twl4030_wdt.c
> +++ b/drivers/watchdog/twl4030_wdt.c
> @@ -183,8 +183,8 @@ static int __devinit twl4030_wdt_probe(struct platform_device *pdev)
>        wdt->timer_margin       = 30;
>        wdt->miscdev.parent     = &pdev->dev;
>        wdt->miscdev.fops       = &twl4030_wdt_fops;
> -       wdt->miscdev.minor      = WATCHDOG_MINOR;
> -       wdt->miscdev.name       = "watchdog";
> +       wdt->miscdev.minor      = MISC_DYNAMIC_MINOR;
> +       wdt->miscdev.name       = "twl4030_watchdog";
>
>        platform_set_drvdata(pdev, wdt);
>
> --
> 1.7.0.4
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: twl4030_wdt: Watchdog device registration issue fix
  2011-03-28 11:04 ` J, KEERTHY
@ 2011-03-28 21:07   ` Wim Van Sebroeck
  0 siblings, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2011-03-28 21:07 UTC (permalink / raw)
  To: J, KEERTHY; +Cc: linux-watchdog, linux-omap

Hi All,

> Hello All,
> 
> Any comments on this patch?
> 
> Regards,
> Keerthy
> 
> On Wed, Mar 2, 2011 at 2:17 AM, Keerthy <j-keerthy@ti.com> wrote:
> > twl4030_wdt driver and omap_wdt driver are registering as misc_device name as
> > "watchdog" and the same minor number WATCHDOG_MINOR( value = 130).
> > There is a conflict since the name and minor were the same for
> > both the misc_device registered by omap_wdt.c as well as twl4030_wdt.c
> >
> > The omap_wdt.c probe is getting called first. Hence it succeeds.
> > twl4030_wdt.c always failed on the minor number comparison check.
> > Now requesting for MISC_DYNAMIC_MINOR as the minor
> > number for twl4030_watchdog and renamed the device name as
> > "twl4030_watchdog".
> >
> > Tested for basic boot up on OMAP4 Blaze and OMAP3630 SDP. OMAP3630 SDP
> > twl4030_wdt registration succeeds.2430SDP boot tested, watchdog registration
> > without errors.
> >
> > Signed-off-by: Keerthy <j-keerthy@ti.com>

NAK. Reason: a watchdog daemon will only be using /dev/watchdog.
The plan is to get the generic watchdog framework in, convert most of the drivers, extend teh generic watchdog framework with a sysfs interface so that we can support multiple watchdogs.

Kind regards,
Wim.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-28 21:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01 20:47 [PATCH] watchdog: twl4030_wdt: Watchdog device registration issue fix Keerthy
2011-03-28 11:04 ` J, KEERTHY
2011-03-28 21:07   ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).