summaryrefslogtreecommitdiffstats
path: root/drivers/sfi
diff options
context:
space:
mode:
authorLeonard Crestez <leonard.crestez@nxp.com>2019-07-16 16:30:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-16 19:23:24 -0700
commit778c1f5ccbd95722cf84d2233c6acbf4d01a3ec7 (patch)
tree7a9c17a17417f89dcb0fd9a993312b874a2ddea0 /drivers/sfi
parent8207d4a88e1ef4ab54f05f2f18edd444a5099099 (diff)
downloadlinux-778c1f5ccbd95722cf84d2233c6acbf4d01a3ec7.tar.bz2
scripts/gdb: add helpers to find and list devices
Add helper commands and functions for finding pointers to struct device by enumerating linux device bus/class infrastructure. This can be used to fetch subsystem and driver-specific structs: (gdb) p *$container_of($lx_device_find_by_class_name("net", "eth0"), "struct net_device", "dev") (gdb) p *$container_of($lx_device_find_by_bus_name("i2c", "0-004b"), "struct i2c_client", "dev") (gdb) p *(struct imx_port*)$lx_device_find_by_class_name("tty", "ttymxc1")->parent->driver_data Several generic "lx-device-list" functions are included to enumerate devices by bus and class: (gdb) lx-device-list-bus usb (gdb) lx-device-list-class (gdb) lx-device-list-tree &platform_bus Similar information is available in /sys but pointer values are deliberately hidden. Link: http://lkml.kernel.org/r/c948628041311cbf1b9b4cff3dda7d2073cb3eaa.1561492937.git.leonard.crestez@nxp.com Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Stephen Boyd <sboyd@kernel.org> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/sfi')
0 files changed, 0 insertions, 0 deletions