mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
Power Supply Fixes for 6.6 cycle
* qcom_battmgr: endianness fixes -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmUon44ACgkQ2O7X88g7 +pqxjg/9E0CIfgV4Pb4wThCiauAp8f331uNAIrY2elWAycKCX/VGumyojtZf3gYR M96EWKyP43QWP134xfDDmM63GARU9n8DDostib2NI3ul1j4rZ2czeuvEwrhC+LH0 QLaZ30uwR2WDaSkbSyIFpeR8lVA7OjrQwonC17uWfaKE5qS+SYoFux5RK/LFulwK 9dlcvrtCim86qWemqWPH4kKYCTCH72wxQSOviMg2vQ4y0XjxVSPqrFssQmgr/FnO TsDp7hQTk6E5K78GyWYRwZB+deNwNvCajOqDd6W7idSbaUi7iBUY87qpFDZA5ghe q3MWlaE11qqspf3nNYiaJADn8QESZDZvr95LwtkbEAo0m6LWgytCYpNfAlRM+g1J iP9rlt8A8y05DURvUl/y/JJEkM++MvJ/XMylbwtfcT8Xmf/UMqC8O4M4H6MZmeCN Cq8Ql3m5ozEh3IBXtbiGHu0i3uPTBE6URb7Ob9lkecsFRzj72BpzaS/o6g4bm8uN qwO61PXB9Yx61gemnGCpm9R0pgxgwwznDk0JTVhF9qZ82geiap0OXnwIqXVPK/sU 0FRK26j5Xf2tH2IqHED8fNkhSc1cjJnMRp5LPYgu3Y1fhD2aBYDywQjdyAUai2B9 89VL5M5gbe9+144mrLFLdreek3A9QOBWG9uz1i1R/ThyLNf32a0= =DSYH -----END PGP SIGNATURE----- Merge power-supply fixes for 6.6 cycle Merge power-supply fixes for the 6.6 cycle, so that changes to the vexpress driver apply cleanly. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
commit
e186bd1ac2
@ -300,7 +300,7 @@ config NVMEM_REBOOT_MODE
|
||||
|
||||
config POWER_MLXBF
|
||||
tristate "Mellanox BlueField power handling driver"
|
||||
depends on (GPIO_MLXBF2 && ACPI)
|
||||
depends on (GPIO_MLXBF2 || GPIO_MLXBF3) && ACPI
|
||||
help
|
||||
This driver supports reset or low power mode handling for Mellanox BlueField.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only or BSD-3-Clause
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES.
|
||||
|
@ -121,7 +121,7 @@ static int vexpress_reset_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(regmap);
|
||||
dev_set_drvdata(&pdev->dev, regmap);
|
||||
|
||||
switch ((enum vexpress_reset_func)match->data) {
|
||||
switch ((uintptr_t)match->data) {
|
||||
case FUNC_SHUTDOWN:
|
||||
vexpress_power_off_device = &pdev->dev;
|
||||
pm_power_off = vexpress_power_off;
|
||||
|
@ -792,6 +792,7 @@ config BATTERY_RT5033
|
||||
config CHARGER_RT5033
|
||||
tristate "RT5033 battery charger support"
|
||||
depends on MFD_RT5033
|
||||
depends on EXTCON || !EXTCON
|
||||
help
|
||||
This adds support for battery charger in Richtek RT5033 PMIC.
|
||||
The device supports pre-charge mode, fast charge mode and
|
||||
|
@ -115,7 +115,6 @@ struct ab8500_btemp {
|
||||
static enum power_supply_property ab8500_btemp_props[] = {
|
||||
POWER_SUPPLY_PROP_PRESENT,
|
||||
POWER_SUPPLY_PROP_ONLINE,
|
||||
POWER_SUPPLY_PROP_TECHNOLOGY,
|
||||
POWER_SUPPLY_PROP_TEMP,
|
||||
};
|
||||
|
||||
@ -532,12 +531,6 @@ static int ab8500_btemp_get_property(struct power_supply *psy,
|
||||
else
|
||||
val->intval = 1;
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_TECHNOLOGY:
|
||||
if (di->bm->bi)
|
||||
val->intval = di->bm->bi->technology;
|
||||
else
|
||||
val->intval = POWER_SUPPLY_TECHNOLOGY_UNKNOWN;
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_TEMP:
|
||||
val->intval = ab8500_btemp_get_temp(di);
|
||||
break;
|
||||
@ -662,7 +655,7 @@ static char *supply_interface[] = {
|
||||
|
||||
static const struct power_supply_desc ab8500_btemp_desc = {
|
||||
.name = "ab8500_btemp",
|
||||
.type = POWER_SUPPLY_TYPE_BATTERY,
|
||||
.type = POWER_SUPPLY_TYPE_UNKNOWN,
|
||||
.properties = ab8500_btemp_props,
|
||||
.num_properties = ARRAY_SIZE(ab8500_btemp_props),
|
||||
.get_property = ab8500_btemp_get_property,
|
||||
|
@ -1720,7 +1720,7 @@ static char *supply_interface[] = {
|
||||
|
||||
static const struct power_supply_desc ab8500_chargalg_desc = {
|
||||
.name = "ab8500_chargalg",
|
||||
.type = POWER_SUPPLY_TYPE_BATTERY,
|
||||
.type = POWER_SUPPLY_TYPE_UNKNOWN,
|
||||
.properties = ab8500_chargalg_props,
|
||||
.num_properties = ARRAY_SIZE(ab8500_chargalg_props),
|
||||
.get_property = ab8500_chargalg_get_property,
|
||||
|
@ -324,7 +324,7 @@ static int mt6370_chg_toggle_cfo(struct mt6370_priv *priv)
|
||||
|
||||
if (fl_strobe) {
|
||||
dev_err(priv->dev, "Flash led is still in strobe mode\n");
|
||||
return ret;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* cfo off */
|
||||
|
@ -476,6 +476,13 @@ int power_supply_uevent(const struct device *dev, struct kobj_uevent_env *env)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Kernel generates KOBJ_REMOVE uevent in device removal path, after
|
||||
* resources have been freed. Exit early to avoid use-after-free.
|
||||
*/
|
||||
if (psy->removing)
|
||||
return 0;
|
||||
|
||||
prop_buf = (char *)get_zeroed_page(GFP_KERNEL);
|
||||
if (!prop_buf)
|
||||
return -ENOMEM;
|
||||
|
@ -105,7 +105,7 @@ struct qcom_battmgr_property_request {
|
||||
|
||||
struct qcom_battmgr_update_request {
|
||||
struct pmic_glink_hdr hdr;
|
||||
u32 battery_id;
|
||||
__le32 battery_id;
|
||||
};
|
||||
|
||||
struct qcom_battmgr_charge_time_request {
|
||||
@ -1282,9 +1282,9 @@ static void qcom_battmgr_enable_worker(struct work_struct *work)
|
||||
{
|
||||
struct qcom_battmgr *battmgr = container_of(work, struct qcom_battmgr, enable_work);
|
||||
struct qcom_battmgr_enable_request req = {
|
||||
.hdr.owner = PMIC_GLINK_OWNER_BATTMGR,
|
||||
.hdr.type = PMIC_GLINK_NOTIFY,
|
||||
.hdr.opcode = BATTMGR_REQUEST_NOTIFICATION,
|
||||
.hdr.owner = cpu_to_le32(PMIC_GLINK_OWNER_BATTMGR),
|
||||
.hdr.type = cpu_to_le32(PMIC_GLINK_NOTIFY),
|
||||
.hdr.opcode = cpu_to_le32(BATTMGR_REQUEST_NOTIFICATION),
|
||||
};
|
||||
int ret;
|
||||
|
||||
|
@ -1045,6 +1045,13 @@ static void rk817_charging_monitor(struct work_struct *work)
|
||||
queue_delayed_work(system_wq, &charger->work, msecs_to_jiffies(8000));
|
||||
}
|
||||
|
||||
static void rk817_cleanup_node(void *data)
|
||||
{
|
||||
struct device_node *node = data;
|
||||
|
||||
of_node_put(node);
|
||||
}
|
||||
|
||||
static int rk817_charger_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct rk808 *rk808 = dev_get_drvdata(pdev->dev.parent);
|
||||
@ -1061,11 +1068,13 @@ static int rk817_charger_probe(struct platform_device *pdev)
|
||||
if (!node)
|
||||
return -ENODEV;
|
||||
|
||||
ret = devm_add_action_or_reset(&pdev->dev, rk817_cleanup_node, node);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
charger = devm_kzalloc(&pdev->dev, sizeof(*charger), GFP_KERNEL);
|
||||
if (!charger) {
|
||||
of_node_put(node);
|
||||
if (!charger)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
charger->rk808 = rk808;
|
||||
|
||||
@ -1224,3 +1233,4 @@ MODULE_DESCRIPTION("Battery power supply driver for RK817 PMIC");
|
||||
MODULE_AUTHOR("Maya Matuszczyk <maccraft123mc@gmail.com>");
|
||||
MODULE_AUTHOR("Chris Morgan <macromorgan@hotmail.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("platform:rk817-charger");
|
||||
|
@ -598,8 +598,8 @@ static int rt9467_run_aicl(struct rt9467_chg_data *data)
|
||||
|
||||
reinit_completion(&data->aicl_done);
|
||||
ret = wait_for_completion_timeout(&data->aicl_done, msecs_to_jiffies(3500));
|
||||
if (ret)
|
||||
return ret;
|
||||
if (ret == 0)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
ret = rt9467_get_value_from_ranges(data, F_IAICR, RT9467_RANGE_IAICR, &aicr_get);
|
||||
if (ret) {
|
||||
|
@ -384,7 +384,8 @@ static int ucs1002_get_property(struct power_supply *psy,
|
||||
case POWER_SUPPLY_PROP_USB_TYPE:
|
||||
return ucs1002_get_usb_type(info, val);
|
||||
case POWER_SUPPLY_PROP_HEALTH:
|
||||
return val->intval = info->health;
|
||||
val->intval = info->health;
|
||||
return 0;
|
||||
case POWER_SUPPLY_PROP_PRESENT:
|
||||
val->intval = info->present;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user