mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'for-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset updates from Sebastian Reichel: "Power-supply core: - battery-info: replace any DT specific bits with fwnode usage - replace any device-tree code with generic fwnode based handling Power-supply drivers: - ug3105_battery: use battery-info API - qcom_battmgr: report capacity - qcom_battmgr: support LiPo battery reporting - add missing missing power-supply ref to a bunch of DT bindings - update drivers regarding pm_runtime_autosuspend() usage - misc minor fixes and cleanups Reset drivers: - misc minor cleanups" * tag 'for-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (32 commits) power: supply: core: fix static checker warning power: supply: twl4030_charger: Remove redundant pm_runtime_mark_last_busy() calls power: supply: bq24190: Remove redundant pm_runtime_mark_last_busy() calls MAINTAINERS: rectify file entry in QUALCOMM SMB CHARGER DRIVER power: supply: max1720x correct capacity computation MAINTAINERS: add myself as smbx charger driver maintainer power: supply: pmi8998_charger: rename to qcom_smbx power: supply: qcom_pmi8998_charger: fix wakeirq power: supply: max14577: Handle NULL pdata when CONFIG_OF is not set power: return the correct error code power: reset: POWER_RESET_TORADEX_EC should depend on ARCH_MXC power: supply: cpcap-charger: Fix null check for power_supply_get_by_name power: supply: bq25980_charger: Constify reg_default array power: supply: bq256xx_charger: Constify reg_default array power: reset: at91-sama5d2_shdwc: Refactor wake-up source logging to use dev_info power: reset: qcom-pon: Rename variables to use generic naming power: supply: qcom_battmgr: Add lithium-polymer entry power: supply: qcom_battmgr: Report battery capacity power: supply: bq24190: Free battery_info power: supply: ug3105_battery: Switch to power_supply_batinfo_ocv2cap() ...
This commit is contained in:
@@ -48,7 +48,6 @@ properties:
|
||||
battery device.
|
||||
|
||||
monitored-battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: |
|
||||
phandle to a "simple-battery" compatible node.
|
||||
|
||||
|
||||
@@ -53,15 +53,16 @@ properties:
|
||||
minimum: 50000
|
||||
maximum: 500000
|
||||
|
||||
monitored-battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: phandle to the battery node being monitored
|
||||
monitored-battery: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- monitored-battery
|
||||
|
||||
allOf:
|
||||
- $ref: power-supply.yaml#
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
|
||||
@@ -58,9 +58,7 @@ properties:
|
||||
minimum: 100000
|
||||
maximum: 3200000
|
||||
|
||||
monitored-battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: phandle to the battery node being monitored
|
||||
monitored-battery: true
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
@@ -78,6 +76,7 @@ required:
|
||||
- monitored-battery
|
||||
|
||||
allOf:
|
||||
- $ref: power-supply.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
|
||||
@@ -73,9 +73,7 @@ properties:
|
||||
description: |
|
||||
Indicates that the device state has changed.
|
||||
|
||||
monitored-battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: phandle to the battery node being monitored
|
||||
monitored-battery: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
@@ -43,10 +43,7 @@ properties:
|
||||
minItems: 1
|
||||
maxItems: 8 # Should be enough
|
||||
|
||||
monitored-battery:
|
||||
description:
|
||||
Specifies the phandle of a simple-battery connected to this gauge
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
monitored-battery: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
@@ -38,9 +38,7 @@ properties:
|
||||
- const: usbin_i
|
||||
- const: usbin_v
|
||||
|
||||
monitored-battery:
|
||||
description: phandle to the simple-battery node
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
monitored-battery: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
@@ -51,6 +49,9 @@ required:
|
||||
- io-channel-names
|
||||
- monitored-battery
|
||||
|
||||
allOf:
|
||||
- $ref: power-supply.yaml#
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
|
||||
@@ -18,7 +18,6 @@ properties:
|
||||
const: richtek,rt5033-charger
|
||||
|
||||
monitored-battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: |
|
||||
Phandle to the monitored battery according to battery.yaml. The battery
|
||||
node needs to contain five parameters.
|
||||
@@ -54,6 +53,9 @@ properties:
|
||||
required:
|
||||
- monitored-battery
|
||||
|
||||
allOf:
|
||||
- $ref: power-supply.yaml#
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
|
||||
@@ -17,9 +17,7 @@ properties:
|
||||
compatible:
|
||||
const: stericsson,ab8500-btemp
|
||||
|
||||
monitored-battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: phandle to battery node
|
||||
monitored-battery: true
|
||||
|
||||
battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
@@ -17,9 +17,7 @@ properties:
|
||||
compatible:
|
||||
const: stericsson,ab8500-chargalg
|
||||
|
||||
monitored-battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: phandle to battery node
|
||||
monitored-battery: true
|
||||
|
||||
battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
@@ -17,9 +17,7 @@ properties:
|
||||
compatible:
|
||||
const: stericsson,ab8500-charger
|
||||
|
||||
monitored-battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: phandle to battery node
|
||||
monitored-battery: true
|
||||
|
||||
battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
@@ -17,9 +17,7 @@ properties:
|
||||
compatible:
|
||||
const: stericsson,ab8500-fg
|
||||
|
||||
monitored-battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: phandle to battery node
|
||||
monitored-battery: true
|
||||
|
||||
battery:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
@@ -23,9 +23,7 @@ properties:
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
monitored-battery:
|
||||
description: phandle to the battery node
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
monitored-battery: true
|
||||
|
||||
summit,enable-usb-charging:
|
||||
type: boolean
|
||||
@@ -94,6 +92,7 @@ properties:
|
||||
unevaluatedProperties: false
|
||||
|
||||
allOf:
|
||||
- $ref: power-supply.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
|
||||
+1
-5
@@ -26,11 +26,7 @@ properties:
|
||||
- const: x-powers,axp813-battery-power-supply
|
||||
- const: x-powers,axp813-battery-power-supply
|
||||
|
||||
monitored-battery:
|
||||
description:
|
||||
Specifies the phandle of an optional simple-battery connected to
|
||||
this gauge.
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
monitored-battery: true
|
||||
|
||||
x-powers,no-thermistor:
|
||||
type: boolean
|
||||
|
||||
@@ -20815,6 +20815,13 @@ S: Maintained
|
||||
F: Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
|
||||
F: drivers/mtd/nand/raw/qcom_nandc.c
|
||||
|
||||
QUALCOMM SMB CHARGER DRIVER
|
||||
M: Casey Connolly <casey.connolly@linaro.org>
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/power/supply/qcom,pmi8998-charger.yaml
|
||||
F: drivers/power/supply/qcom_smbx.c
|
||||
|
||||
QUALCOMM QSEECOM DRIVER
|
||||
M: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
|
||||
@@ -754,7 +754,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
if (of_property_present(np, "usb0_vbus_power-supply")) {
|
||||
data->vbus_power_supply = devm_power_supply_get_by_phandle(dev,
|
||||
data->vbus_power_supply = devm_power_supply_get_by_reference(dev,
|
||||
"usb0_vbus_power-supply");
|
||||
if (IS_ERR(data->vbus_power_supply)) {
|
||||
dev_err(dev, "Couldn't get the VBUS power supply\n");
|
||||
|
||||
@@ -227,6 +227,7 @@ config POWER_RESET_ST
|
||||
|
||||
config POWER_RESET_TORADEX_EC
|
||||
tristate "Toradex Embedded Controller power-off and reset driver"
|
||||
depends on ARCH_MXC || COMPILE_TEST
|
||||
depends on I2C
|
||||
select REGMAP_I2C
|
||||
help
|
||||
|
||||
@@ -129,7 +129,7 @@ static void at91_wakeup_status(struct platform_device *pdev)
|
||||
else if (SHDW_RTTWK(reg, &rcfg->shdwc))
|
||||
reason = "RTT";
|
||||
|
||||
pr_info("AT91: Wake-Up source: %s\n", reason);
|
||||
dev_info(&pdev->dev, "Wake-Up source: %s\n", reason);
|
||||
}
|
||||
|
||||
static void at91_poweroff(void)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#define NO_REASON_SHIFT 0
|
||||
|
||||
struct pm8916_pon {
|
||||
struct qcom_pon {
|
||||
struct device *dev;
|
||||
struct regmap *regmap;
|
||||
u32 baseaddr;
|
||||
@@ -27,11 +27,11 @@ struct pm8916_pon {
|
||||
long reason_shift;
|
||||
};
|
||||
|
||||
static int pm8916_reboot_mode_write(struct reboot_mode_driver *reboot,
|
||||
static int qcom_pon_reboot_mode_write(struct reboot_mode_driver *reboot,
|
||||
unsigned int magic)
|
||||
{
|
||||
struct pm8916_pon *pon = container_of
|
||||
(reboot, struct pm8916_pon, reboot_mode);
|
||||
struct qcom_pon *pon = container_of
|
||||
(reboot, struct qcom_pon, reboot_mode);
|
||||
int ret;
|
||||
|
||||
ret = regmap_update_bits(pon->regmap,
|
||||
@@ -44,9 +44,9 @@ static int pm8916_reboot_mode_write(struct reboot_mode_driver *reboot,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int pm8916_pon_probe(struct platform_device *pdev)
|
||||
static int qcom_pon_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct pm8916_pon *pon;
|
||||
struct qcom_pon *pon;
|
||||
long reason_shift;
|
||||
int error;
|
||||
|
||||
@@ -72,7 +72,7 @@ static int pm8916_pon_probe(struct platform_device *pdev)
|
||||
if (reason_shift != NO_REASON_SHIFT) {
|
||||
pon->reboot_mode.dev = &pdev->dev;
|
||||
pon->reason_shift = reason_shift;
|
||||
pon->reboot_mode.write = pm8916_reboot_mode_write;
|
||||
pon->reboot_mode.write = qcom_pon_reboot_mode_write;
|
||||
error = devm_reboot_mode_register(&pdev->dev, &pon->reboot_mode);
|
||||
if (error) {
|
||||
dev_err(&pdev->dev, "can't register reboot mode\n");
|
||||
@@ -85,7 +85,7 @@ static int pm8916_pon_probe(struct platform_device *pdev)
|
||||
return devm_of_platform_populate(&pdev->dev);
|
||||
}
|
||||
|
||||
static const struct of_device_id pm8916_pon_id_table[] = {
|
||||
static const struct of_device_id qcom_pon_id_table[] = {
|
||||
{ .compatible = "qcom,pm8916-pon", .data = (void *)GEN1_REASON_SHIFT },
|
||||
{ .compatible = "qcom,pm8941-pon", .data = (void *)NO_REASON_SHIFT },
|
||||
{ .compatible = "qcom,pms405-pon", .data = (void *)GEN1_REASON_SHIFT },
|
||||
@@ -93,16 +93,16 @@ static const struct of_device_id pm8916_pon_id_table[] = {
|
||||
{ .compatible = "qcom,pmk8350-pon", .data = (void *)GEN2_REASON_SHIFT },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, pm8916_pon_id_table);
|
||||
MODULE_DEVICE_TABLE(of, qcom_pon_id_table);
|
||||
|
||||
static struct platform_driver pm8916_pon_driver = {
|
||||
.probe = pm8916_pon_probe,
|
||||
static struct platform_driver qcom_pon_driver = {
|
||||
.probe = qcom_pon_probe,
|
||||
.driver = {
|
||||
.name = "pm8916-pon",
|
||||
.of_match_table = pm8916_pon_id_table,
|
||||
.name = "qcom-pon",
|
||||
.of_match_table = qcom_pon_id_table,
|
||||
},
|
||||
};
|
||||
module_platform_driver(pm8916_pon_driver);
|
||||
module_platform_driver(qcom_pon_driver);
|
||||
|
||||
MODULE_DESCRIPTION("pm8916 Power On driver");
|
||||
MODULE_DESCRIPTION("Qualcomm Power On driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
||||
@@ -120,5 +120,5 @@ obj-$(CONFIG_BATTERY_ACER_A500) += acer_a500_battery.o
|
||||
obj-$(CONFIG_BATTERY_SURFACE) += surface_battery.o
|
||||
obj-$(CONFIG_CHARGER_SURFACE) += surface_charger.o
|
||||
obj-$(CONFIG_BATTERY_UG3105) += ug3105_battery.o
|
||||
obj-$(CONFIG_CHARGER_QCOM_SMB2) += qcom_pmi8998_charger.o
|
||||
obj-$(CONFIG_CHARGER_QCOM_SMB2) += qcom_smbx.o
|
||||
obj-$(CONFIG_FUEL_GAUGE_MM8013) += mm8013.o
|
||||
|
||||
@@ -1674,7 +1674,7 @@ static int bq2415x_probe(struct i2c_client *client)
|
||||
/* Query for initial reported_mode and set it */
|
||||
if (bq->nb.notifier_call) {
|
||||
if (np) {
|
||||
notify_psy = power_supply_get_by_phandle(np,
|
||||
notify_psy = power_supply_get_by_reference(of_fwnode_handle(np),
|
||||
"ti,usb-charger-detection");
|
||||
if (IS_ERR(notify_psy))
|
||||
notify_psy = NULL;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user