aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/supply
AgeCommit message (Collapse)AuthorFilesLines
2022-12-03power: supply: bq25890: Ensure pump_express_work is cancelled on removeGravatar Hans de Goede 1-0/+15
The pump_express_work which gets queued from an external_power_changed callback might be pending / running on remove() (or on probe failure). Add a devm action cancelling the work, to ensure that it is cancelled. Note the devm action is added before devm_power_supply_register(), making it run after devm unregisters the power_supply, so that the work cannot be queued anymore (this is also why a devm action is used for this). Fixes: 48f45b094dbb ("power: supply: bq25890: Support higher charging voltages through Pump Express+ protocol") Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-12-03power: supply: Fix refcount leak in rk817_charger_probeGravatar Qiheng Lin 1-1/+3
of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 11cb8da0189b ("power: supply: Add charger driver for Rockchip RK817") Signed-off-by: Qiheng Lin <linqiheng@huawei.com> Reviewed-by: Chris Morgan <macromorgan@hotmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-28power: supply: bq25890: Only use pdata->regulator_init_data for vbusGravatar Hans de Goede 1-0/+2
bq25890_platform_data.regulator_init_data is intended to only provide regulator init_data for the vbus regulator. Remove this from the regulator_config before registering the vsys regulator. Otherwise the regulator_register() call for vsys will fail because it tries to register duplicate consumer_dev_name + supply names from init_data->consumer_supplies[], leading to the entire probe of the bq25890 driver failing: [ 32.017501] bq25890-charger i2c-bq25892_main: Failed to set supply vbus [ 32.017525] bq25890-charger i2c-bq25892_main: error -EBUSY: registering vsys regulator [ 32.124978] bq25890-charger: probe of i2c-bq25892_main failed with error -16 Fixes: 14a3d159abf8 ("power: supply: bq25890: Add Vsys regulator") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-26power: supply: ab8500: Fix error handling in ab8500_charger_init()Gravatar Yuan Can 1-1/+8
The ab8500_charger_init() returns the platform_driver_register() directly without checking its return value, if platform_driver_register() failed, all ab8500_charger_component_drivers are not unregistered. Fix by unregister ab8500_charger_component_drivers when platform_driver_register() failed. Fixes: 1c1f13a006ed ("power: supply: ab8500: Move to componentized binding") Signed-off-by: Yuan Can <yuancan@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-24power: supply: cw2015: Fix potential null-ptr-deref in cw_bat_probe()Gravatar Shang XiaoJing 1-0/+3
cw_bat_probe() calls create_singlethread_workqueue() and not checked the ret value, which may return NULL. And a null-ptr-deref may happen: cw_bat_probe() create_singlethread_workqueue() # failed, cw_bat->wq is NULL queue_delayed_work() queue_delayed_work_on() __queue_delayed_work() # warning here, but continue __queue_work() # access wq->flags, null-ptr-deref Check the ret value and return -ENOMEM if it is NULL. Fixes: b4c7715c10c1 ("power: supply: add CellWise cw2015 fuel gauge driver") Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-24power: supply: z2_battery: Fix possible memleak in z2_batt_probe()Gravatar Zhang Qilong 1-2/+4
If devm_gpiod_get_optional() returns error, the charger should be freed before z2_batt_probe returns according to the context. We fix it by just gotoing to 'err' branch. Fixes: a3b4388ea19b ("power: supply: z2_battery: Convert to GPIO descriptors") Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: z2_battery: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: ucs1002: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: smb347: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: sbs-manager: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: sbs: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: rt9455: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: rt5033_battery: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: max17042_battery: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: max17040: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: max14656: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: ltc4162-l: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: ltc2941: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: lp8727: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-2/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: ds2782: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: bq27xxx: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: bq25980: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: bq25890: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: bq256xx: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: bq2515x: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: bq24735: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: bq24257: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: bq24190: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: bq2415x: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-20power: supply: adp5061: Convert to i2c's .probe_new()Gravatar Uwe Kleine-König 1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-17power: supply: 88pm860x: simplify using devmGravatar Matti Vaittinen 1-29/+9
Use devm variants for requesting threaded IRQ and for power-supply registration. Clean up error path and remove the .remove-callback. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-17power: supply: fix residue sysfs file in error handle route of ↵Gravatar Zeng Heng 1-1/+1
__power_supply_register() If device_add() succeeds, we should call device_del() when want to get rid of it, so move it into proper jump symbol. Otherwise, when __power_supply_register() returns fail and goto wakeup_init_failed to exit, there is still residue device file in sysfs. When attempt to probe device again, sysfs would complain as below: sysfs: cannot create duplicate filename '/devices/platform/i2c/i2c-0/0-001c/power_supply/adp5061' Call Trace: dump_stack_lvl+0x68/0x85 sysfs_warn_dup.cold+0x1c/0x29 sysfs_create_dir_ns+0x1b1/0x1d0 kobject_add_internal+0x143/0x390 kobject_add+0x108/0x170 Fixes: 80c6463e2fa3 ("power_supply: Fix Oops from NULL pointer dereference from wakeup_source_activate") Signed-off-by: Zeng Heng <zengheng4@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-01power: supply: mt6360: Use LINEAR_RANGE_IDX()Gravatar Matti Vaittinen 1-9/+6
Do minor clean-up by using the newly inroduced LINEAR_RANGE_IDX() initialization macro. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-11-01power: supply: bd99954: Use LINEAR_RANGE()Gravatar Matti Vaittinen 1-71/+13
Do minor clean-up by using newly inroduced LINEAR_RANGE() initialization macro. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-31power: supply: core: repair kernel-doc for power_supply_vbat2ri()Gravatar Lukas Bulwahn 1-1/+0
The function power_supply_vbat2ri() does not have a parameter called table, despite it being mentioned in the kernel-doc comment. The table is actually obtained from the info parameter, the battery information container. Hence, ./scripts/kernel-doc -none drivers/power/supply/power_supply_core.c warns about this excess function parameter. Adjust the kernel-doc comment for power_supply_vbat2ri() for make W=1 happiness. Fixes: e9e7d165b4b0 ("power: supply: Support VBAT-to-Ri lookup tables") Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-29power: supply: bq25890: Add Vsys regulatorGravatar Marek Vasut 1-0/+32
The chip is capable of reporting Vsys voltage supplied to the system. Add regulator which represents the Vsys supply. This can be used e.g. as a supply for system PMIC input. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-29power: supply: bq25890: Add get_voltage support to Vbus regulatorGravatar Marek Vasut 1-5/+8
The chip is capable of reporting Vbus voltage, add .get_voltage implementation to Vbus regulator to report current Vbus voltage. This requires for the Vbus regulator to be registered always instead of the current state where the regulator is registered only in case USB PHY is not found. Do not provide Vbus regulator enable/disable ops in case USB PHY is present, as they would race with USB PHY notifier which is also used to toggle OTG boost mode. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-29power: supply: bq25890: Factor out regulator registration codeGravatar Marek Vasut 1-16/+35
Pull the regulator registration code into separate function, so it can be extended to register more regulators later. Currently this is only moving ifdeffery into one place and other preparatory changes. The dev_err_probe() output string is changed to explicitly list vbus regulator failure, so that once more regulators are registered, it would be clear which one failed. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-29power: supply: bq25890: Add support for setting user charge current and ↵Gravatar Marek Vasut 1-0/+11
voltage limit Let user set battery charge current and voltage limit via sysfs. This is useful in case the user space needs to reduce charge current to keep the system within thermal limits. The maximum charge current and voltage are still limited to "ti,charge-current" and "ti,battery-regulation-voltage" values to avoid damaging the hardware in case too high values are set by user space. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-29power: supply: bq25890: Clean up POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGEGravatar Marek Vasut 1-27/+45
Clean up misuse of POWER_SUPPLY_PROP_VOLTAGE, POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX and POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE and document what exactly each value means. The POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE content is newly read back from hardware, while POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX is reported as the maximum value set in DT. The POWER_SUPPLY_PROP_VOLTAGE is newly used to report immediate value of battery voltage V_BAT, which is what this property was intended to report and which has been thus far misused to report the charger chip output voltage V_SYS. The V_SYS is no longer reported as there is currently no suitable property to report V_SYS. V_SYS reporting will be reinstated in subsequent patch. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-29power: supply: bq25890: Clean up POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENTGravatar Marek Vasut 1-16/+41
Clean up misuse of POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT and POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX and document what exactly each value means. The POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT content is newly read back from hardware, while POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX is reported as the maximum value set in DT. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-29power: supply: bq25890: Document POWER_SUPPLY_PROP_CURRENT_NOWGravatar Marek Vasut 1-1/+8
Document that POWER_SUPPLY_PROP_CURRENT_NOW really does refer to ADC-sampled immediate battery charge current I_BAT , since the meaning is not clear with all the currents which might be measured by charger chips. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-28power/supply: fix repeated words in commentsGravatar wangjianli 1-1/+1
Delete the redundant word 'the'. Signed-off-by: wangjianli <wangjianli@cdjrlc.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-28power: supply: lp8788: make const array name staticGravatar Colin Ian King 1-1/+1
Don't populate the read-only array name on the stack but instead make it static. Since the data and the pointers don't change also add in a missing const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-07Merge tag 'for-v6.1' of ↵Gravatar Linus Torvalds 12-55/+1050
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - new maintenance charging documentation - mt6370: new charger driver - bq25890: support input current limit - added Qualcomm PMK8350 PON support - misc minor fixes * tag 'for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (22 commits) power: supply: ab8500: remove unused static local variable power: supply: mt6370: Fix return value check in mt6370_chg_probe() power: supply: ab8500: Remove unused struct ab8500_chargalg_sysfs_entry power: supply: mt6370: uses IIO interfaces, depends on IIO power: supply: max1721x: Fix spelling mistake "Gauage" -> "Gauge" power: supply: mt6370: Add MediaTek MT6370 charger driver dt-bindings: power: supply: Add MediaTek MT6370 Charger lib: add linear range index macro power: supply: bq25890: Fix enum conversion in bq25890_power_supply_set_property() power: supply: bq27xxx: fix NULL vs 0 warnings power: supply: bq27xxx: fix __be16 warnings power: supply: bq25890: Add support for setting IINLIM power: supply: bq25890: Disable PUMPX_EN on errors power: supply: Fix repeated word in comments power: supply: adp5061: show unknown capacity_level as text power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type() power: supply: tps65217: Fix comments typo power: reset: qcom-pon: add support for qcom,pmk8350-pon compatible string dt-bindings: power: reset: qcom-pon: Add new compatible "qcom,pmk8350-pon" power: supply: cw2015: Use device managed API to simplify the code ...
2022-10-07Merge tag 'mfd-next-6.1' of ↵Gravatar Linus Torvalds 3-0/+1218
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core Frameworks: - Fix 'mfd_of_node_list' OF node entry resource leak New Drivers: - Add support for Ocelot VSC7512 Networking Chip - Add support for MediaTek MT6370 subPMIC - Add support for Richtek RT5120 (I2C) PMIC New Device Support: - Add support for Rockchip RV1126 and RK3588 to Syscon - Add support for Rockchip RK817 Battery Charger to RK808 - Add support for Silergy SY7636a Voltage Regulator to Simple MFD - Add support for Qualcomm PMP8074 PMIC to QCOM SPMI - Add support for Secure Update to Intel M10 BMC New Functionality: - Provide SSP type to Intel's LPSS (PCI) SPI driver Fix-ups: - Remove legacy / unused code; stmpe, intel_soc_pmic_crc, syscon - Unify / simplify; intel_soc_pmic_crc - Trivial reordering / spelling, etc; Makefile, twl-core - Convert to managed resources; intel_soc_pmic_crc - Use appropriate APIs; intel_soc_pmic_crc - strscpy() conversion; htc-i2cpld, lpc_ich, mfd-core - GPIOD conversion; htc-i2cpld, stmpe - Add missing header file includes; twl4030-irq - DT goodies; stmpe, mediatek,mt6370, x-powers,axp152, aspeed,ast2x00-scu, mediatek,mt8195-scpsys, qcom,spmi-pmic, syscon, qcom,tcsr, rockchip,rk817, sprd,ums512-glbreg, dlg,da9063 Bug Fixes: - Properly check return values; sm501, htc-i2cpld - Repair Two-Wire Bus Mode; da9062-core - Fix error handling; intel_soc_pmic_core, fsl-imx25-tsadc, lp8788, lp8788-irq" * tag 'mfd-next-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (60 commits) mfd: syscon: Remove repetition of the regmap_get_val_endian() mfd: ocelot-spi: Add missing MODULE_DEVICE_TABLE power: supply: Add charger driver for Rockchip RK817 dt-bindings: mfd: mt6370: Fix the indentation in the example mfd: da9061: Fix Failed to set Two-Wire Bus Mode. mfd: htc-i2cpld: Fix an IS_ERR() vs NULL bug in htcpld_core_probe() dt-bindings: mfd: qcom,tcsr: Drop simple-mfd from IPQ6018 mfd: sm501: Add check for platform_driver_register() dt-bindings: mfd: mediatek: Add scpsys compatible for mt8186 mfd: twl4030: Add missed linux/device.h header dt-bindings: mfd: dlg,da9063: Add missing regulator patterns dt-bindings: mfd: sprd: Add bindings for ums512 global registers mfd: intel_soc_pmic_chtdc_ti: Switch from __maybe_unused to pm_sleep_ptr() etc dt-bindings: mfd: syscon: Add rk3588 QoS register compatible mfd: stmpe: Switch to using gpiod API mfd: qcom-spmi-pmic: Add pm7250b compatible dt-bindings: mfd: Add missing (unevaluated|additional)Properties on child nodes mfd/omap1: htc-i2cpld: Convert to a pure GPIO driver mfd: intel-m10-bmc: Add d5005 bmc secure update driver dt-bindings: mfd: syscon: Drop ref from reg-io-width ...
2022-10-05power: supply: ab8500: remove unused static local variableGravatar Tom Rix 1-2/+0
cpp_check reports [drivers/power/supply/ab8500_chargalg.c:493]: (style) Variable 'ab8500_chargalg_ex_ac_enable_toggle' is assigned a value that is never used. From inspection, this variable is never used. So remove it. Fixes: 6c50a08d9dd3 ("power: supply: ab8500: Drop external charger leftovers") Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Chen Lifu <chenlifu@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-01power: supply: mt6370: Fix return value check in mt6370_chg_probe()Gravatar Yang Yingliang 1-2/+2
If create_singlethread_workqueue() fails, it returns a null pointer, replace IS_ERR() check with NULL pointer check. Fixes: 233cb8a47d65 ("power: supply: mt6370: Add MediaTek MT6370 charger driver") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: ChiaEn Wu <chiaen_wu@richtek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-01power: supply: ab8500: Remove unused struct ab8500_chargalg_sysfs_entryGravatar Yuan Can 1-6/+0
After commit 75ee3f6f0c1a("power: supply: ab8500_chargalg: Drop enable/disable sysfs"), no one use struct ab8500_chargalg_sysfs_entry, so remove it. Signed-off-by: Yuan Can <yuancan@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2022-10-01power: supply: mt6370: uses IIO interfaces, depends on IIOGravatar Randy Dunlap 1-0/+1
The mt6370-charger driver uses IIO interfaces and produces build errors when CONFIG_IIO is not set, so it should depend on IIO. ERROR: modpost: "iio_read_channel_processed" [drivers/power/supply/mt6370-charger.ko] undefined! ERROR: modpost: "devm_iio_channel_get_all" [drivers/power/supply/mt6370-charger.ko] undefined! Fixes: 233cb8a47d65 ("power: supply: mt6370: Add MediaTek MT6370 charger driver") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: ChiaEn Wu <chiaen_wu@richtek.com> Cc: Sebastian Reichel <sebastian.reichel@collabora.com> Cc: linux-pm@vger.kernel.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>