How to unload regulator driver from iMX8-mq

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to unload regulator driver from iMX8-mq

Jump to solution
1,853 Views
killro89140
Contributor II

Hi All,

I'm using imx8-mq evk board, with 4.9.123 kernel and uboot, feat with busybox as an image.

My purpose is to modifie pfuze100 regulator and change sw2's voltage,

but all the document and tutorial not work including using user space regulator.

{ Official reply told to read regulator API, that...doesn't help any,

  maybe it's because I have no idea how to write a driver, and need some detail coding guide(?) }

So..before my true question, if any one can know how to control /sys/class/regulator/regulator.X/ and change the Volt.

Please kindly let me know, thanks a lot~!

==========

I read the pfuze100 driver source code, and I found that I can set the voltage to what I want by using i2c tool.

eg. set 0x35 from 0x1c to 0x1d , the sw2(0x35) will be added 1 uV_step 

thus I can set the value before I probe the pfuze100_regulator.ko

However, I can't rmmod it ! even I enabled force unload from Kernel.

Any Idea?

Like...which process I should kill before it?

Note:  I also found that pfuze100-regulator.c didn't implement .remove function, should I implement it as well?

Thanks!

Labels (2)
0 Kudos
1 Solution
1,623 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jun-feng

one can look at linux documentation in linux/Documentation/power/regulator/

overview.txt\regulator\power\Documentation - linux-imx - i.MX Linux kernel 

and check implementation of cpufreq driver with similar features described in

sect.2.5.3 CPU Frequency Scaling (CPUFREQ) attached Linux Manual.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
1,624 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jun-feng

one can look at linux documentation in linux/Documentation/power/regulator/

overview.txt\regulator\power\Documentation - linux-imx - i.MX Linux kernel 

and check implementation of cpufreq driver with similar features described in

sect.2.5.3 CPU Frequency Scaling (CPUFREQ) attached Linux Manual.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos