• Tomer Tayar's avatar
    accel/habanalabs: add parent_device sysfs attribute · aa5cea38
    Tomer Tayar authored
    The device debugfs directory was modified to be named as the
    device-name.
    This name is the parent device name, i.e. either the PCI address in case
    of an ASIC, or the simulator device name in case of a simulator.
    
    This change makes it more difficult for a user to access the debugfs
    directory for a specific accel device, because he can't just use the
    accel minor id, but he needs to do more device-dependent operations to
    get the device name.
    
    To make it easier to get this name, add a 'parent_device' sysfs
    attribute that the user can read using the minor id before accessing
    debugfs.
    Signed-off-by: default avatarTomer Tayar <ttayar@habana.ai>
    Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
    Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
    aa5cea38
sysfs.c 13 KB