Skip to content

Commit

Permalink
Merge tag 'for-v4.1-rc' of git://git.infradead.org/battery-2.6
Browse files Browse the repository at this point in the history
Pull power supply and reset fixes from Sebastian Reichel:
 "misc fixes"

* tag 'for-v4.1-rc' of git://git.infradead.org/battery-2.6:
  power: bq27x00_battery: Add missing MODULE_ALIAS
  power: reset: Add MFD_SYSCON depends for brcmstb
  power: reset: ltc2952: Remove bogus hrtimer_start() return value checks
  power_supply: fix oops in collie_battery driver
  power/reset: at91: fix return value check in at91_reset_platform_probe()
  MAINTAINERS: Add me as maintainer of Nokia N900 power supply drivers
  axp288_fuel_gauge: Add original author details
  • Loading branch information
torvalds committed May 12, 2015
2 parents 4cfceaf + 8ebb7e9 commit cc49e8c
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 18 deletions.
11 changes: 11 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6959,6 +6959,17 @@ T: git git://git.rocketboards.org/linux-socfpga-next.git
S: Maintained
F: arch/nios2/

NOKIA N900 POWER SUPPLY DRIVERS
M: Pali Rohár <[email protected]>
S: Maintained
F: include/linux/power/bq2415x_charger.h
F: include/linux/power/bq27x00_battery.h
F: include/linux/power/isp1704_charger.h
F: drivers/power/bq2415x_charger.c
F: drivers/power/bq27x00_battery.c
F: drivers/power/isp1704_charger.c
F: drivers/power/rx51_battery.c

NTB DRIVER
M: Jon Mason <[email protected]>
M: Dave Jiang <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions drivers/power/axp288_fuel_gauge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,7 @@ static struct platform_driver axp288_fuel_gauge_driver = {

module_platform_driver(axp288_fuel_gauge_driver);

MODULE_AUTHOR("Ramakrishna Pallala <[email protected]>");
MODULE_AUTHOR("Todd Brandt <[email protected]>");
MODULE_DESCRIPTION("Xpower AXP288 Fuel Gauge Driver");
MODULE_LICENSE("GPL");
8 changes: 8 additions & 0 deletions drivers/power/bq27x00_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,14 @@ static void __exit bq27x00_battery_exit(void)
}
module_exit(bq27x00_battery_exit);

#ifdef CONFIG_BATTERY_BQ27X00_PLATFORM
MODULE_ALIAS("platform:bq27000-battery");
#endif

#ifdef CONFIG_BATTERY_BQ27X00_I2C
MODULE_ALIAS("i2c:bq27000-battery");
#endif

MODULE_AUTHOR("Rodolfo Giometti <[email protected]>");
MODULE_DESCRIPTION("BQ27x00 battery monitor driver");
MODULE_LICENSE("GPL");
2 changes: 1 addition & 1 deletion drivers/power/collie_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static int collie_bat_probe(struct ucb1x00_dev *dev)
goto err_psy_reg_main;
}

psy_main_cfg.drv_data = &collie_bat_bu;
psy_bu_cfg.drv_data = &collie_bat_bu;
collie_bat_bu.psy = power_supply_register(&dev->ucb->dev,
&collie_bat_bu_desc,
&psy_bu_cfg);
Expand Down
1 change: 1 addition & 0 deletions drivers/power/reset/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ config POWER_RESET_AXXIA
config POWER_RESET_BRCMSTB
bool "Broadcom STB reset driver"
depends on ARM || MIPS || COMPILE_TEST
depends on MFD_SYSCON
default ARCH_BRCMSTB
help
This driver provides restart support for Broadcom STB boards.
Expand Down
4 changes: 2 additions & 2 deletions drivers/power/reset/at91-reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ static int at91_reset_platform_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, idx + 1 );
at91_ramc_base[idx] = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
if (IS_ERR(at91_ramc_base[idx])) {
if (!at91_ramc_base[idx]) {
dev_err(&pdev->dev, "Could not map ram controller address\n");
return PTR_ERR(at91_ramc_base[idx]);
return -ENOMEM;
}
}

Expand Down
18 changes: 3 additions & 15 deletions drivers/power/reset/ltc2952-poweroff.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,7 @@ static enum hrtimer_restart ltc2952_poweroff_timer_wde(struct hrtimer *timer)

static void ltc2952_poweroff_start_wde(struct ltc2952_poweroff *data)
{
if (hrtimer_start(&data->timer_wde, data->wde_interval,
HRTIMER_MODE_REL)) {
/*
* The device will not toggle the watchdog reset,
* thus shut down is only safe if the PowerPath controller
* has a long enough time-off before triggering a hardware
* power-off.
*
* Only sending a warning as the system will power-off anyway
*/
dev_err(data->dev, "unable to start the timer\n");
}
hrtimer_start(&data->timer_wde, data->wde_interval, HRTIMER_MODE_REL);
}

static enum hrtimer_restart
Expand Down Expand Up @@ -165,9 +154,8 @@ static irqreturn_t ltc2952_poweroff_handler(int irq, void *dev_id)
}

if (gpiod_get_value(data->gpio_trigger)) {
if (hrtimer_start(&data->timer_trigger, data->trigger_delay,
HRTIMER_MODE_REL))
dev_err(data->dev, "unable to start the wait timer\n");
hrtimer_start(&data->timer_trigger, data->trigger_delay,
HRTIMER_MODE_REL);
} else {
hrtimer_cancel(&data->timer_trigger);
/* omitting return value check, timer should have been valid */
Expand Down

0 comments on commit cc49e8c

Please sign in to comment.