Skip to content

Commit

Permalink
Merge tag 'for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:
 "I have mostly fixes in the power-supply tree for the 4.5 kernel.  I
  should mention, that the top-most commit has not been in next, but
  it's a fix changing only a single register offset.

  Summary:

   - uncouple CONFIG_POWER_RESET from CONFIG_POWER_SUPPLY

   - misc fixes"

* tag 'for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
  power: bq27xxx_battery: Fix bq27541 AveragePower register address
  power: test_power: correctly handle empty writes
  power: generic-adc-battery: use to_delayed_work
  power: isp1704_charger: Fix isp1704_write() definition
  power: bq27xxx: fix register numbers of bq27500
  power: bq27xxx: fix reading for bq27000 and bq27010
  power: Fix unmet dependency on POWER_SUPPLY by POWER_RESET by uncoupling them
  power: bq27xxx_battery: Reorganize I2C into a module
  power: bq27xxx: don't fill system log by missing battery
  power: max8903_charger: set IRQF_ONESHOT if no primary handler is specified
  power/reset: at91-reset: add missing of_node_put
  power: ds2782_battery: constify ds278x_battery_ops structure
  power: bq2415x_charger: Delete unnecessary checks before the function call "of_node_put"
  • Loading branch information
Linus Torvalds committed Jan 14, 2016
2 parents c25949d + 265b604 commit 5c43019
Show file tree
Hide file tree
Showing 13 changed files with 264 additions and 352 deletions.
2 changes: 1 addition & 1 deletion drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ obj-y += i2c/ media/
obj-$(CONFIG_PPS) += pps/
obj-$(CONFIG_PTP_1588_CLOCK) += ptp/
obj-$(CONFIG_W1) += w1/
obj-$(CONFIG_POWER_SUPPLY) += power/
obj-y += power/
obj-$(CONFIG_HWMON) += hwmon/
obj-$(CONFIG_THERMAL) += thermal/
obj-$(CONFIG_WATCHDOG) += watchdog/
Expand Down
17 changes: 5 additions & 12 deletions drivers/power/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -160,22 +160,16 @@ config BATTERY_SBS
config BATTERY_BQ27XXX
tristate "BQ27xxx battery driver"
help
Say Y here to enable support for batteries with BQ27xxx (I2C/HDQ) chips.
Say Y here to enable support for batteries with BQ27xxx chips.

config BATTERY_BQ27XXX_I2C
bool "BQ27xxx I2C support"
tristate "BQ27xxx I2C support"
depends on BATTERY_BQ27XXX
depends on I2C
default y
help
Say Y here to enable support for batteries with BQ27xxx (I2C) chips.

config BATTERY_BQ27XXX_PLATFORM
bool "BQ27xxx HDQ support"
depends on BATTERY_BQ27XXX
default y
help
Say Y here to enable support for batteries with BQ27xxx (HDQ) chips.
Say Y here to enable support for batteries with BQ27xxx chips
connected over an I2C bus.

config BATTERY_DA9030
tristate "DA9030 battery driver"
Expand Down Expand Up @@ -508,8 +502,7 @@ config AXP20X_POWER
This driver provides support for the power supply features of
AXP20x PMIC.

source "drivers/power/reset/Kconfig"

endif # POWER_SUPPLY

source "drivers/power/reset/Kconfig"
source "drivers/power/avs/Kconfig"
1 change: 1 addition & 0 deletions drivers/power/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ obj-$(CONFIG_BATTERY_IPAQ_MICRO) += ipaq_micro_battery.o
obj-$(CONFIG_BATTERY_WM97XX) += wm97xx_battery.o
obj-$(CONFIG_BATTERY_SBS) += sbs-battery.o
obj-$(CONFIG_BATTERY_BQ27XXX) += bq27xxx_battery.o
obj-$(CONFIG_BATTERY_BQ27XXX_I2C) += bq27xxx_battery_i2c.o
obj-$(CONFIG_BATTERY_DA9030) += da9030_battery.o
obj-$(CONFIG_BATTERY_DA9052) += da9052-battery.o
obj-$(CONFIG_CHARGER_DA9150) += da9150-charger.o
Expand Down
6 changes: 2 additions & 4 deletions drivers/power/bq2415x_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ static int bq2415x_probe(struct i2c_client *client,
error_3:
bq2415x_power_supply_exit(bq);
error_2:
if (bq && bq->notify_node)
if (bq)
of_node_put(bq->notify_node);
kfree(name);
error_1:
Expand All @@ -1724,9 +1724,7 @@ static int bq2415x_remove(struct i2c_client *client)
if (bq->nb.notifier_call)
power_supply_unreg_notifier(&bq->nb);

if (bq->notify_node)
of_node_put(bq->notify_node);

of_node_put(bq->notify_node);
bq2415x_sysfs_exit(bq);
bq2415x_power_supply_exit(bq);

Expand Down
Loading

0 comments on commit 5c43019

Please sign in to comment.