20 Feb, 2014
1 commit
-
Propagate the error value returned by the function instead.
Signed-off-by: Sachin Kamat
Signed-off-by: Mark Brown
13 Nov, 2013
1 commit
-
Both num_regulators and **rdev are no longer required after this conversion,
thus remove them from struct lp3971.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
15 Oct, 2013
1 commit
-
Fix the following checkpatch warnings.
WARNING: please, no spaces at the start of a line
Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
30 Jul, 2013
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
27 May, 2013
1 commit
-
Signed-off-by: Nikolay Balandin
Signed-off-by: Mark Brown
23 Apr, 2013
1 commit
-
All regulators have ascendant voltage list in this driver.
Thus use regulator_map_voltage_ascend is more efficient than the default
regulator_map_voltage_iterate.Signed-off-by: Axel Lin
Acked-by: Marek Szyprowski
Signed-off-by: Mark Brown
25 Dec, 2012
1 commit
-
regulator_list_voltage_table() returns -EINVAL if selector >= n_voltages.
Thus we don't need to check if reg is greater than BUCK_TARGET_VOL_MAX_IDX in
lp3971_dcdc_get_voltage_sel.BUCK_TARGET_VOL_MIN_IDX and BUCK_TARGET_VOL_MAX_IDX are not used, remove them.
Signed-off-by: Axel Lin
Acked-by: Marek Szyprowski
Signed-off-by: Mark Brown
20 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Signed-off-by: Mark Brown -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Signed-off-by: Mark Brown -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Signed-off-by: Mark Brown
03 Jun, 2012
1 commit
-
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
09 Apr, 2012
2 commits
-
Rather than adding new arguments to regulator_register() every time we
want to add a new bit of dynamic information at runtime change the function
to take these via a struct. By doing this we avoid needing to do further
changes like the recent addition of device tree support which required each
regulator driver to be updated to take an additional parameter.The regulator_desc which should (mostly) be static data is still passed
separately as most drivers are able to configure this statically at build
time.Signed-off-by: Mark Brown
05 Apr, 2012
1 commit
-
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
04 Apr, 2012
1 commit
-
Unusual to see a regulator driver not using subsys_initcall() but with
the probe deferral support should be becoming more and more viable.Signed-off-by: Mark Brown
01 Apr, 2012
1 commit
-
Signed-off-by: Axel Lin
Acked-By: Marek Szyprowski
Signed-off-by: Mark Brown
24 Nov, 2011
1 commit
-
With device tree support for regulators, its needed that the
regulator_dev->dev device has the right of_node attached.
To be able to do this add an additional parameter to the
regulator_register() api, wherein the dt-adapted driver can
then pass this additional info onto the regulator core.Signed-off-by: Rajendra Nayak
Signed-off-by: Mark Brown
01 Nov, 2011
1 commit
-
Another group of drivers that are taking advantage of the implicit
presence of module.h -- and will break when we pull the carpet out
from under them during a cleanup. Fix 'em now.Signed-off-by: Paul Gortmaker
12 Jan, 2011
1 commit
-
Change the interface used by set_voltage() to report the selected value
to the regulator core in terms of a selector used by list_voltage().
This allows the regulator core to know the voltage that was chosen
without having to do an explict get_voltage(), which would be much more
expensive as it will generally access hardware.Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood
11 Aug, 2010
2 commits
-
i2c_smbus_write_byte_data() returns zero or negative value,
therefore no need to check if ret is greater than zero or not.Signed-off-by: Axel Lin
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
We already check count value before calling i2c_smbus_read_byte_data(),
no need to check it again.Signed-off-by: Axel Lin
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood
03 Jun, 2010
1 commit
-
I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers.As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.Signed-off-by: Wolfram Sang
Acked-by: Mark Brown
Acked-by: Greg Kroah-Hartman
Acked-by: Richard Purdie
Acked-by: Dmitry Torokhov
Signed-off-by: Jean Delvare
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
23 Mar, 2010
3 commits
-
Given x=0,1,2, current implementation of BUCK_VOL_CHANGE_SHIFT(x) returns 0,4,8.
The correct return value should be 0,4,6.
This patch fix the logic.Signed-off-by: Axel Lin
Acked-by: Marek Szyprowski
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
In lp3971_ldo_set_voltage function, it requires val to left shift 4
bits for LDO2 and LDO4.
This patch fix this issue.Signed-off-by: Axel Lin
Acked-by: Marek Szyprowski
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
Return -ENOMEM if kcalloc() fails
Signed-off-by: Dan Carpenter
Acked-by: Mark Brown
Acked-by: Wolfram Sang
Signed-off-by: Liam Girdwood
03 Mar, 2010
2 commits
-
There is no point in completing probe if platform data is missing so
let's abort loading early.Also, use kcalloc when allocating several instances of the same data
structure and mark setup_regulators() as __devinit since it is only
called from lp3971_i2c_probe() which is __devinit.Signed-off-by: Dmitry Torokhov
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood -
The C99 specification states in section 6.11.5:
The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.Signed-off-by: Tobias Klauser
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood
12 Feb, 2010
1 commit
-
After `for (val = LDO_VOL_MIN_IDX; val
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood
17 Dec, 2009
1 commit
-
IS_ERR returns only 1 or 0. The callsite of setup_regulators expects a
negative integer in an error case. Thus, PTR_ERR has to be used to extract
it.The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression E,E1;
@@*E = IS_ERR(...)
... when != E = E1
*return E;
//Signed-off-by: Julia Lawall
Acked-by:
Signed-off-by: Liam Girdwood
22 Sep, 2009
1 commit
-
Signed-off-by: Wolfram Sang
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood
15 Jun, 2009
2 commits
-
lp3971_i2c_remove' referenced in section `.data' of drivers/built-in.o:
defined in discarded section `.devexit.text' of drivers/built-in.oSigned-off-by: Liam Girdwood
-
This patch adds regulator drivers for National Semiconductors LP3971 PMIC.
This LP3971 PMIC controller has 3 DC/DC voltage converters and 5 low
drop-out (LDO) regulators. LP3971 PMIC controller uses I2C interface.Reviewed-by: Kyungmin Park
Signed-off-by: Marek Szyprowski
Acked-by: Mark Brown
Signed-off-by: Liam Girdwood