Skip to content

Commit

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

Pull power supply and reset updates from Sebastian Reichel:

 - bq27xxx: add bq27521 support

 - drop unused imx-snvs-poweroff driver

 - improve axp288 driver

 - misc fixes

* tag 'for-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (32 commits)
  power: supply: max17042_battery: Always fall back to default platform-data
  power: supply: max17042_battery: Check battery current for status when supplied
  MAINTAINERS: Add AXP288 PMIC entry
  power: supply: axp288_fuel_gauge: Do not register our psy on (some) HDMI sticks
  power: supply: axp288_fuel_gauge: Optimize get_current()
  power: supply: axp288_fuel_gauge: Rework get_status()
  power: reset: account for const type of of_device_id.data
  power: supply: account for const type of of_device_id.data
  bq24190: Simplify code in property_is_writeable
  power: supply: axp288_fuel_gauge: Get iio-channels once during boot
  power: supply: axp288_charger: Properly stop work on probe-error / remove
  power: supply: axp288_charger: Simplify extcon cable handling
  power: supply: axp288_charger: Use the right property for the input current limit
  power: supply: axp288_charger: Pick lower input current limit not higher
  power: supply: axp288_charger: Do not cache input current limit value
  power: supply: axp288_charger: Remove no longer needed locking
  power: supply: axp288_charger: Use regmap_update_bits to set the input limits
  power: supply: axp288_charger: Cleanup some double empty lines
  power: supply: axp288_charger: Remove charger-enabled state tracking
  power: supply: axp288_charger: Add missing newlines to some messages
  ...
  • Loading branch information
Linus Torvalds committed Jan 31, 2018
2 parents a9e89e5 + 2d7e6a8 commit 972058a
Show file tree
Hide file tree
Showing 22 changed files with 394 additions and 489 deletions.

This file was deleted.

1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/power/supply/bq27xxx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Required properties:
* "ti,bq27520g2" - BQ27520-g2
* "ti,bq27520g3" - BQ27520-g3
* "ti,bq27520g4" - BQ27520-g4
* "ti,bq27521" - BQ27521
* "ti,bq27530" - BQ27530
* "ti,bq27531" - BQ27531
* "ti,bq27541" - BQ27541
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -14909,6 +14909,12 @@ F: include/linux/workqueue.h
F: kernel/workqueue.c
F: Documentation/core-api/workqueue.rst

X-POWERS AXP288 PMIC DRIVERS
M: Hans de Goede <hdegoede@redhat.com>
S: Maintained
N: axp288
F: drivers/acpi/pmic/intel_pmic_xpower.c

X-POWERS MULTIFUNCTION PMIC DEVICE DRIVERS
M: Chen-Yu Tsai <wens@csie.org>
L: linux-kernel@vger.kernel.org
Expand Down
9 changes: 0 additions & 9 deletions drivers/power/reset/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,6 @@ config POWER_RESET_HISI
help
Reboot support for Hisilicon boards.

config POWER_RESET_IMX
bool "IMX6 power-off driver"
depends on POWER_RESET && SOC_IMX6
help
This driver support power off external PMIC by PMIC_ON_REQ on i.mx6
boards.If you want to use other pin to control external power,please
say N here or disable in dts to make sure pm_power_off never be
overwrote wrongly by this driver.

config POWER_RESET_MSM
bool "Qualcomm MSM power-off driver"
depends on ARCH_QCOM
Expand Down
1 change: 0 additions & 1 deletion drivers/power/reset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ obj-$(CONFIG_POWER_RESET_GEMINI_POWEROFF) += gemini-poweroff.o
obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o
obj-$(CONFIG_POWER_RESET_GPIO_RESTART) += gpio-restart.o
obj-$(CONFIG_POWER_RESET_HISI) += hisi-reboot.o
obj-$(CONFIG_POWER_RESET_IMX) += imx-snvs-poweroff.o
obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o
obj-$(CONFIG_POWER_RESET_PIIX4_POWEROFF) += piix4-poweroff.o
obj-$(CONFIG_POWER_RESET_LTC2952) += ltc2952-poweroff.o
Expand Down
4 changes: 2 additions & 2 deletions drivers/power/reset/at91-sama5d2_shdwc.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct shdwc_config {
};

struct shdwc {
struct shdwc_config *cfg;
const struct shdwc_config *cfg;
void __iomem *at91_shdwc_base;
};

Expand Down Expand Up @@ -260,7 +260,7 @@ static int __init at91_shdwc_probe(struct platform_device *pdev)
}

match = of_match_node(at91_shdwc_of_match, pdev->dev.of_node);
at91_shdwc->cfg = (struct shdwc_config *)(match->data);
at91_shdwc->cfg = match->data;

sclk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(sclk))
Expand Down
66 changes: 0 additions & 66 deletions drivers/power/reset/imx-snvs-poweroff.c

This file was deleted.

7 changes: 3 additions & 4 deletions drivers/power/reset/msm-poweroff.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <linux/pm.h>

static void __iomem *msm_ps_hold;
static int do_msm_restart(struct notifier_block *nb, unsigned long action,
static int deassert_pshold(struct notifier_block *nb, unsigned long action,
void *data)
{
writel(0, msm_ps_hold);
Expand All @@ -33,14 +33,13 @@ static int do_msm_restart(struct notifier_block *nb, unsigned long action,
}

static struct notifier_block restart_nb = {
.notifier_call = do_msm_restart,
.notifier_call = deassert_pshold,
.priority = 128,
};

static void do_msm_poweroff(void)
{
/* TODO: Add poweroff capability */
do_msm_restart(&restart_nb, 0, NULL);
deassert_pshold(&restart_nb, 0, NULL);
}

static int msm_restart_probe(struct platform_device *pdev)
Expand Down
4 changes: 4 additions & 0 deletions drivers/power/reset/zx-reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,7 @@ static struct platform_driver zx_reboot_driver = {
},
};
module_platform_driver(zx_reboot_driver);

MODULE_DESCRIPTION("ZTE SoCs reset driver");
MODULE_AUTHOR("Jun Nie <jun.nie@linaro.org>");
MODULE_LICENSE("GPL v2");
6 changes: 4 additions & 2 deletions drivers/power/supply/ab8500_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -3218,11 +3218,13 @@ static int ab8500_charger_init_hw_registers(struct ab8500_charger *di)
}

/* Enable backup battery charging */
abx500_mask_and_set_register_interruptible(di->dev,
ret = abx500_mask_and_set_register_interruptible(di->dev,
AB8500_RTC, AB8500_RTC_CTRL_REG,
RTC_BUP_CH_ENA, RTC_BUP_CH_ENA);
if (ret < 0)
if (ret < 0) {
dev_err(di->dev, "%s mask and set failed\n", __func__);
goto out;
}

if (is_ab8540(di->parent)) {
ret = abx500_mask_and_set_register_interruptible(di->dev,
Expand Down
8 changes: 4 additions & 4 deletions drivers/power/supply/axp20x_ac_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static int axp20x_ac_power_probe(struct platform_device *pdev)
struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent);
struct power_supply_config psy_cfg = {};
struct axp20x_ac_power *power;
struct axp_data *axp_data;
const struct axp_data *axp_data;
static const char * const irq_names[] = { "ACIN_PLUGIN", "ACIN_REMOVAL",
NULL };
int i, irq, ret;
Expand All @@ -176,7 +176,7 @@ static int axp20x_ac_power_probe(struct platform_device *pdev)
if (!power)
return -ENOMEM;

axp_data = (struct axp_data *)of_device_get_match_data(&pdev->dev);
axp_data = of_device_get_match_data(&pdev->dev);

if (axp_data->acin_adc) {
power->acin_v = devm_iio_channel_get(&pdev->dev, "acin_v");
Expand Down Expand Up @@ -230,10 +230,10 @@ static int axp20x_ac_power_probe(struct platform_device *pdev)
static const struct of_device_id axp20x_ac_power_match[] = {
{
.compatible = "x-powers,axp202-ac-power-supply",
.data = (void *)&axp20x_data,
.data = &axp20x_data,
}, {
.compatible = "x-powers,axp221-ac-power-supply",
.data = (void *)&axp22x_data,
.data = &axp22x_data,
}, { /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, axp20x_ac_power_match);
Expand Down
Loading

0 comments on commit 972058a

Please sign in to comment.