AnsweredAssumed Answered

How to unload regulator driver from iMX8-mq

Question asked by Jun-feng(Edwin) Lai on Feb 21, 2019
Latest reply on Feb 21, 2019 by igorpadykov

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!

Outcomes