2021-12-08 10:19 AM
hi,
i would like to be able to control the pmic from user space. everything that i have read in the stm documentation indicates that it is not possible to do this. the sysfs interface is read only. i would like to be able to access the consumer driver interface from user space. or, make the sysfs interface writeable. is it possible to do one of these items or something else?
thanks,
vince
2021-12-10 03:52 AM
hello,
maybe you could look at:
https://octavosystems.com/app_notes/stpmic1-non-volatile-memory-programming-guide/
if your goal is to modify the time for power off board using PMIC, it is done in the dts files.
2023-01-17 07:13 AM
Can anyone from ST please make a statement whether this is possible? @Community member
2023-01-17 08:18 AM
Hi @vbuon.1 @johnnyc ,
Sorry to see this post so late !
Why do you want to access PMIC from user space ? Debug purpose or real product feature ?
Only way I see :
On MP15 as soon as I2C instance is non-secure ( I guess it's your case) you can access PMIC register thanks to I2C framework commands i2cget / i2cset
eg : i2cget -y -f 2 0x33 0x20
you can refer to I2C i2c-tools - stm32mpu
Hope it help,
Olivier
2023-01-17 11:39 AM
@Community member I guess the thread creator wanted to turn a regulator on and off via sysfs. To be precise, this could be done via:
echo "enabled" > /sys/class/regulator/regulator.16/state
Which leads to a permission denied in the STPMIC case.