]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: imx2_wdt: set watchdog parent device
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Tue, 2 Jun 2015 12:46:18 +0000 (15:46 +0300)
committerWim Van Sebroeck <wim@iguana.be>
Mon, 22 Jun 2015 13:54:33 +0000 (15:54 +0200)
commit686f1529cd6c60d7f3578c136235802999ba5034
treeaef68e828175bfb6dcf1d119bf83ea62183b00be
parent614e8e13bcb9b6f60642e2a03584fb85c956f72f
watchdog: imx2_wdt: set watchdog parent device

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>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/imx2_wdt.c