2

I would like to know if there is a way to rename device under sysfs?

For example, I have a class regulator with severals devices under it

# ls /sys/class/regulator/
regulator.0   regulator.11  regulator.3   regulator.6   regulator.9
regulator.1   regulator.12  regulator.4   regulator.7
regulator.10  regulator.2   regulator.5   regulator.8

Each of this regulator have a name

# cat /sys/class/regulator/regulator.8/name
VCC_3V3
# cat /sys/class/regulator/regulator.9/name
VCC_2V5

I would like to know if it's possible to rename regulator.8 to VCC_3V3 for example ?

Edit : I precise that I want to rename the device in sysfs and not have a symlink to it under /dev/<device_class>/<device_name> as I could export it with udev rules

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.