
Hello Simon,
On 05/19/2014 08:37 PM, Simon Glass wrote:
Hi,
On 9 May 2014 03:25, Przemyslaw Marczak p.marczak@samsung.com wrote:
Hello,
Some time ago I had a pleasure to work on some kind of a simple charger manager for u-boot. For checking battery charge level, cable state, and some more info I made a common calls which were implemented in board files, so actually it didn't base directly on PMIC framework. This allowed making charger abstraction but it was a second power related framework next to the PMIC. From my side I would like to introduce its next version according to the doc/README.power-framework documents "TO DO" list and some more...
In this RFC any comments about next version of power management framework are welcome. What new PMIC framework should provide? How to extend it? What can be fixed?
So, what should be done (in my opinion):
Can I suggest we try to build this with driver model if possible? It seems like you will otherwise end up duplicating much of the plumbing of that. For example, see 'struct device'.
Regards, Simon
Yes, I also would like to take it into account - but I am not sure that driver model is not too redundant for it? If I well understand the current driver model - each driver can have only one uclass, right? If yes, then for each previous listed ops we need to register separate driver - isn't it too much for read one register or turn on the led in the same physically device?
So maybe better is to register one "power" driver in driver model? And the power uclass driver could init more then one class specific ops.
I just would like to keep it simply.
Thanks