[U-Boot] [PATCH v4 08/24] pmic: Move pmic related code to ./drivers/power directory

Lukasz Majewski l.majewski at majess.pl
Tue Oct 30 23:59:52 CET 2012


Hi Tom,

> On 10/30/12 09:57, Lukasz Majewski wrote:
> > The PMIC framework has been moved to its more natural place 
> > ./drivers/power from ./drivers/misc directory.
> [snip]
> > drivers/{misc => power/pmic}/pmic_max8997.c |    0 drivers/{misc =>
> > power/pmic}/pmic_max8998.c |    0 drivers/{misc =>
> > power}/pmic_core.c         |    0 drivers/{misc =>
> > power}/pmic_dialog.c       |    0 drivers/{misc =>
> > power}/pmic_fsl.c          |    0 drivers/{misc =>
> > power}/pmic_i2c.c          |    0 drivers/{misc =>
> > power}/pmic_spi.c          |    0
> 
> OK, so I think we need a slightly different re-org, after looking at
> the whole series, sorry.  Lets go for:
> drivers/power/pmic/max8998.c, i2c.c, fsl.c, spi.c, etc and libpmic.o
> drivers/power/fuel_gauge/max17402.c and libfuel_gauge.o
> ... etc

I'm a bit confused now....

The approach which I've now proposed is defined at patch 8 (not 4 as
you pointed out):
pmic: Move pmic related code to ./drivers/power directory

It is as follows:

1. The "core" power/pmic subsystem files are moved to: ./drivers/power/
directory (like pmic_core.c pmic_i2c.c etc.). To be more precise those
files are renamed to power_* at patch 22 in the series.

2. There have been created directories for pmic, fuel gauge and battery
for different HW ICs. It is (in my opinion) welcome to combine all
files from the same category to one library (libfuel_gauge.o,
libpmic.o, libbattery.o). 

libfuel_gauge.o and libpmic.o are also linked from the top ./Makefile -
due to that MAKEALL with BUILD_DIR works (without any special make
"magic" at ./drivers/power dir.

3. All pmic/power related header files have been moved
to ./include/power directory (with proper names to reflect
corresponding IC circuit - e.g. max8998_pmic.h).


Moreover, the last three patches in the series (22,23,24) start
the process of renaming from "pmic" to "power". 


> 
> And just leaving them as pmic_i2c.c, etc, if I'm forgetting some
> reason we can't have multiple 'i2c.c' files.  Thanks!
> 

Sorry, but could you clarify this proposition? From my point of view it
is welcome to provide names with power_* prefix (like power_i2c.c - as
it is defined at patch 22).

I'm aware, that those changes are massive, but after applying last of
the 24 commits, one can evaluate the proposed directory structure as
neat and clear.


Best regards,
Lukasz Majewski



More information about the U-Boot mailing list