1
0
Fork 0
Commit Graph

3 Commits (ba08311647892cc7912de74525fd78416caf544a)

Author SHA1 Message Date
Uwe Kleine-König 0007fa362a power_supply: bq25890: use flags argument of devm_gpiod_get
Since 39b2bbe3d7 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.

Simplify driver accordingly. Furthermore this is one caller less that
stops us making the flags argument to gpiod_get*() mandatory.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-06-13 04:06:33 +02:00
Laurentiu Palcu 23fa43a28d power_supply: bq25890: make chip_id int
Smatch static checker correctly detected an impossible condition because
chip_id was declared as u8, instead of int:

drivers/power/bq25890_charger.c:843 bq25890_probe()
warn: impossible condition '(bq->chip_id < 0) => (0-255 < 0)'

Also, while at it, fix the return value too.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-06-02 20:58:19 +02:00
Laurentiu Palcu 4aeae9cb0d power_supply: Add support for TI BQ25890 charger chip
More details about the chip can be found here:
http://www.ti.com/product/bq25890

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-05-23 21:31:26 +02:00