Skip to main content
vbuon.1
Associate III
December 8, 2021
Question

how to control pmic regulators form user space.

  • December 8, 2021
  • 4 replies
  • 2139 views

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

This topic has been closed for replies.

4 replies

Eldam
Senior
December 10, 2021

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 II
January 17, 2023

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

Olivier GALLIEN
Technical Moderator
January 17, 2023

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 II
January 17, 2023

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