lkml.org 
[lkml]   [2013]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] watchdog: Add hook for kicking in kdump path

Hi Guenter,

> > Hi Guenter,
> >
> > Is there an easy way to determine which driver is loaded for each
> > /dev/watchdogN device (from a script perspective).
> >
> > Basically, I wanted to determine the module that needs to be included in
> > the kdump initrd image.
> >
> Sometimes. For example, the iTCO_wdt driver has an entry in /sys/devices, and
> /sys/class/watchdog/watchdogX/device points to it. That is not always the case,
> howewver. In my system, for example, the MEI watchdog is active, but there is
> nothing I can find that would give me an indication that /dev/watchdog0 actually
> points to the MEI watchdog driver.
>
> Of course I might be missing something, and there might be some other means
> to identify the driver from userspace. Would be great, actually, as I am having
> the same problem.

Only when you set the .parent field in the watchdog_device data you will get the
referal in the /sys/class/... tree. In iTCO_wdt.c you have the following code
that does that: iTCO_wdt_watchdog_dev.parent = dev->dev.parent;

From the watchdog-kernel-api documentation:
* parent: set this to the parent device (or NULL) before calling
watchdog_register_device.

Kind regards,
Wim.



\
 
 \ /
  Last update: 2013-05-27 21:41    [W:0.072 / U:1.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site