On 11 October 2017 at 03:36, Johan Hovold <johan@xxxxxxxxxx> wrote: > On Tue, Oct 10, 2017 at 10:22:19AM +0200, Marcel Holtmann wrote: >> >> What I was wondering the other day is if we need a lsserdev tool or >> some integration in lshw to be able to debug what serdev devices and >> ID are present. The lsusb and /sys/kernel/debug/usb/devices is just >> super powerful and easy when it comes to figuring out what people have >> in their system. Maybe /sys/kernel/debug/serdev/devices could be >> helpful as well. Just thinking out loud here. > > Yeah, maybe. Since you'd typically only have small number of serdev > devices (say, max 4), using /sys/bus/serial/devices directly should not > be too bad meanwhile. Not that much common information we can expose > either, at least not in comparison to USB. But I'll keep it mind. :) > Yes in the interim, if you have 'tree' installed then for example $ alias lsserdev='tree /sys/bus/serial/devices/*-0' $ lsserdev /sys/bus/serial/devices/serial0-0 ├── bluetooth │ └── hci0 │ ├── device -> ../../../serial0-0 │ ├── power │ │ ├── async │ │ ├── autosuspend_delay_ms │ │ ├── control │ │ ├── runtime_active_kids │ │ ├── runtime_active_time │ │ ├── runtime_enabled │ │ ├── runtime_status │ │ ├── runtime_suspended_time │ │ └── runtime_usage │ ├── rfkill0 │ │ ├── device -> ../../hci0 │ │ ├── hard │ │ ├── index │ │ ├── name │ │ ├── persistent │ │ ├── power │ │ │ ├── async │ │ │ ├── autosuspend_delay_ms │ │ │ ├── control │ │ │ ├── runtime_active_kids │ │ │ ├── runtime_active_time │ │ │ ├── runtime_enabled │ │ │ ├── runtime_status │ │ │ ├── runtime_suspended_time │ │ │ └── runtime_usage │ │ ├── soft │ │ ├── state │ │ ├── subsystem -> ../../../../../../../../class/rfkill │ │ ├── type │ │ └── uevent │ ├── subsystem -> ../../../../../../../class/bluetooth │ └── uevent ├── driver -> ../../../../../bus/serial/drivers/hci_uart_bcm ├── firmware_node -> ../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/8086228A:00/BCM2EA4:00 ├── modalias ├── power │ ├── async │ ├── autosuspend_delay_ms │ ├── control │ ├── runtime_active_kids │ ├── runtime_active_time │ ├── runtime_enabled │ ├── runtime_status │ ├── runtime_suspended_time │ └── runtime_usage ├── subsystem -> ../../../../../bus/serial └── uevent 13 directories, 38 files $ It is a bit shabby when there is nothing to report $ lsserdev /sys/bus/serial/devices/*-0 [error opening dir] 0 directories, 0 files $ ��.n��������+%������w��{.n�����{��ǫ����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��