cancel
Showing results for 
Search instead for 
Did you mean: 

how to control pmic regulators form user space.

vbuon.1
Associate III

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

4 REPLIES 4
Eldam
Senior

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.

johnnyc
Associate III

Can anyone from ST please make a statement whether this is possible? @Community member​ 

Olivier GALLIEN
ST Employee

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

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
johnnyc
Associate III

@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.