linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: imx2_wdt: set watchdog parent device
@ 2015-06-02 12:46 Vladimir Zapolskiy
  2015-06-02 13:46 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Zapolskiy @ 2015-06-02 12:46 UTC (permalink / raw)
  To: Wim Van Sebroeck; +Cc: linux-watchdog

If on watchdog device registration a parent device is not set, then
the registered watchdog is considered to be a virtual device:

  /sys/devices/virtual/watchdog/watchdog0
  /sys/devices/virtual/watchdog/watchdog1

Setting a correct reference to a platform device allows to
distinguish multiple instances of iMX2+ hardware watchdogs:

  /sys/devices/soc0/soc/2000000.aips-bus/20bc000.wdog/watchdog/watchdog0
  /sys/devices/soc0/soc/2000000.aips-bus/20c0000.wdog/watchdog/watchdog1

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
---
 drivers/watchdog/imx2_wdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 5e6d808..3450a46 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -256,6 +256,7 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)
 	wdog->ops		= &imx2_wdt_ops;
 	wdog->min_timeout	= 1;
 	wdog->max_timeout	= IMX2_WDT_MAX_TIME;
+	wdog->parent		= &pdev->dev;
 
 	clk_prepare_enable(wdev->clk);
 
-- 
2.1.4


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

* Re: [PATCH] watchdog: imx2_wdt: set watchdog parent device
  2015-06-02 12:46 [PATCH] watchdog: imx2_wdt: set watchdog parent device Vladimir Zapolskiy
@ 2015-06-02 13:46 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2015-06-02 13:46 UTC (permalink / raw)
  To: Vladimir Zapolskiy, Wim Van Sebroeck; +Cc: linux-watchdog

On 06/02/2015 05:46 AM, Vladimir Zapolskiy wrote:
> If on watchdog device registration a parent device is not set, then
> the registered watchdog is considered to be a virtual device:
>
>    /sys/devices/virtual/watchdog/watchdog0
>    /sys/devices/virtual/watchdog/watchdog1
>
> Setting a correct reference to a platform device allows to
> distinguish multiple instances of iMX2+ hardware watchdogs:
>
>    /sys/devices/soc0/soc/2000000.aips-bus/20bc000.wdog/watchdog/watchdog0
>    /sys/devices/soc0/soc/2000000.aips-bus/20c0000.wdog/watchdog/watchdog1
>
> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>



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

end of thread, other threads:[~2015-06-02 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 12:46 [PATCH] watchdog: imx2_wdt: set watchdog parent device Vladimir Zapolskiy
2015-06-02 13:46 ` Guenter Roeck

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).