Merge tag 'for-v6.15' 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:
   - remove unused set_charged infrastructure
   - drop of_node from power_supply struct

  Power-supply drivers:
   - axp717: support devices without thermistors
   - bq27xxx: support max design voltage for bq270x0 and bq27x10
   - pcf50633: drop charger driver
   - max1720x: add battery health support
   - switch all power-supply devices from of_node to fwnode
   - convert regmap users to maple tree register cache
   - convert drivers to devm_kmemdup_array
   - misc cleanups and fixes

  Reset drivers:
   - at91-sama5d2_shdwc: add sama7d65 support

* tag 'for-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (30 commits)
  power: supply: mt6370: Remove redundant 'flush_workqueue()' calls
  Revert "power: supply: bq27xxx: do not report bogus zero values"
  power: supply: max77693: Fix wrong conversion of charge input threshold value
  power: supply: pcf50633: Remove charger
  power: supply: all: switch psy_cfg from of_node to fwnode
  power: supply: core: get rid of of_node
  power: reset: at91-sama5d2_shdwc: Add sama7d65 PMC
  power: supply: smb347: convert to use maple tree register cache
  power: supply: rt9455: convert to use maple tree register cache
  power: supply: max1720x: convert to use maple tree register cache
  power: supply: ltc4162l: convert to use maple tree register cache
  power: supply: bq25980: convert to use maple tree register cache
  power: supply: bq25890: convert to use maple tree register cache
  power: supply: bq2515x: convert to use maple tree register cache
  power: supply: bq24257: convert to use maple tree register cache
  power: supply: bd99954: convert to use maple tree register cache
  power: supply: Remove unused set_charged method
  power: supply: ds2760: Remove unused ds2760_battery_set_charged
  power: supply: core: Remove unused power_supply_set_battery_charged
  power: supply: sc27xx: use devm_kmemdup_array()
  ...
This commit is contained in:
Linus Torvalds
2025-03-29 18:11:12 -07:00
65 changed files with 212 additions and 627 deletions
@@ -16,6 +16,11 @@ description: |
properties:
compatible:
oneOf:
- items:
- enum:
- microchip,sama7d65-shdwc
- const: microchip,sama7g5-shdwc
- const: syscon
- items:
- const: microchip,sama7g5-shdwc
- const: syscon
@@ -46,7 +46,6 @@ properties:
required:
- compatible
- interrupts
additionalProperties: false
@@ -14,9 +14,6 @@ maintainers:
- Chen-Yu Tsai <wens@csie.org>
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
oneOf:
@@ -35,7 +32,24 @@ properties:
this gauge.
$ref: /schemas/types.yaml#/definitions/phandle
x-powers,no-thermistor:
type: boolean
description: Indicates that no thermistor is connected to the TS pin
required:
- compatible
allOf:
- $ref: power-supply.yaml#
- if:
not:
properties:
compatible:
contains:
enum:
- x-powers,axp717-battery-power-supply
then:
properties:
x-powers,no-thermistor: false
additionalProperties: false
+1
View File
@@ -327,6 +327,7 @@ static const struct of_device_id at91_pmc_ids[] = {
{ .compatible = "microchip,sam9x60-pmc" },
{ .compatible = "microchip,sama7g5-pmc" },
{ .compatible = "microchip,sam9x7-pmc" },
{ .compatible = "microchip,sama7d65-pmc" },
{ /* Sentinel. */ }
};
-6
View File
@@ -449,12 +449,6 @@ config CHARGER_88PM860X
help
Say Y here to enable charger for Marvell 88PM860x chip.
config CHARGER_PCF50633
tristate "NXP PCF50633 MBC"
depends on MFD_PCF50633
help
Say Y to include support for NXP PCF50633 Main Battery Charger.
config BATTERY_RX51
tristate "Nokia RX-51 (N900) battery driver"
depends on TWL4030_MADC
-1
View File
@@ -62,7 +62,6 @@ obj-$(CONFIG_CHARGER_RT9467) += rt9467-charger.o
obj-$(CONFIG_CHARGER_RT9471) += rt9471.o
obj-$(CONFIG_BATTERY_TWL4030_MADC) += twl4030_madc_battery.o
obj-$(CONFIG_CHARGER_88PM860X) += 88pm860x_charger.o
obj-$(CONFIG_CHARGER_PCF50633) += pcf50633-charger.o
obj-$(CONFIG_BATTERY_RX51) += rx51_battery.o
obj-$(CONFIG_AB8500_BM) += ab8500_bmdata.o ab8500_charger.o ab8500_fg.o ab8500_btemp.o ab8500_chargalg.o
obj-$(CONFIG_CHARGER_CPCAP) += cpcap-charger.o
+2 -2
View File
@@ -3494,11 +3494,11 @@ static int ab8500_charger_probe(struct platform_device *pdev)
di->invalid_charger_detect_state = 0;
/* AC and USB supply config */
ac_psy_cfg.of_node = np;
ac_psy_cfg.fwnode = dev_fwnode(dev);
ac_psy_cfg.supplied_to = supply_interface;
ac_psy_cfg.num_supplicants = ARRAY_SIZE(supply_interface);
ac_psy_cfg.drv_data = &di->ac_chg;
usb_psy_cfg.of_node = np;
usb_psy_cfg.fwnode = dev_fwnode(dev);
usb_psy_cfg.supplied_to = supply_interface;
usb_psy_cfg.num_supplicants = ARRAY_SIZE(supply_interface);
usb_psy_cfg.drv_data = &di->usb_chg;
+2 -1
View File
@@ -17,6 +17,7 @@
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/property.h>
enum {
REG_CAPACITY,
@@ -231,7 +232,7 @@ static int a500_battery_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, bat);
psy_cfg.of_node = pdev->dev.parent->of_node;
psy_cfg.fwnode = dev_fwnode(pdev->dev.parent);
psy_cfg.drv_data = bat;
psy_cfg.no_wakeup_source = true;
+1 -1
View File
@@ -614,7 +614,7 @@ static int act8945a_charger_probe(struct platform_device *pdev)
if (ret)
return -EINVAL;
psy_cfg.of_node = pdev->dev.of_node;
psy_cfg.fwnode = dev_fwnode(&pdev->dev);
psy_cfg.drv_data = charger;
charger->psy = devm_power_supply_register(&pdev->dev,
+1 -1
View File
@@ -364,7 +364,7 @@ static int axp20x_ac_power_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, power);
psy_cfg.of_node = pdev->dev.of_node;
psy_cfg.fwnode = dev_fwnode(&pdev->dev);
psy_cfg.drv_data = power;
power->supply = devm_power_supply_register(&pdev->dev,
+22 -1
View File
@@ -89,6 +89,8 @@
#define AXP717_BAT_CC_MIN_UA 0
#define AXP717_BAT_CC_MAX_UA 3008000
#define AXP717_TS_PIN_DISABLE BIT(4)
struct axp20x_batt_ps;
struct axp_data {
@@ -117,6 +119,7 @@ struct axp20x_batt_ps {
/* Maximum constant charge current */
unsigned int max_ccc;
const struct axp_data *data;
bool ts_disable;
};
static int axp20x_battery_get_max_voltage(struct axp20x_batt_ps *axp20x_batt,
@@ -984,6 +987,24 @@ static void axp717_set_battery_info(struct platform_device *pdev,
int ccc = info->constant_charge_current_max_ua;
int val;
axp_batt->ts_disable = (device_property_read_bool(axp_batt->dev,
"x-powers,no-thermistor"));
/*
* Under rare conditions an incorrectly programmed efuse for
* the temp sensor on the PMIC may trigger a fault condition.
* Allow users to hard-code if the ts pin is not used to work
* around this problem. Note that this requires the battery
* be correctly defined in the device tree with a monitored
* battery node.
*/
if (axp_batt->ts_disable) {
regmap_update_bits(axp_batt->regmap,
AXP717_TS_PIN_CFG,
AXP717_TS_PIN_DISABLE,
AXP717_TS_PIN_DISABLE);
}
if (vmin > 0 && axp717_set_voltage_min_design(axp_batt, vmin))
dev_err(&pdev->dev,
"couldn't set voltage_min_design\n");
@@ -1090,7 +1111,7 @@ static int axp20x_power_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, axp20x_batt);
psy_cfg.drv_data = axp20x_batt;
psy_cfg.of_node = pdev->dev.of_node;
psy_cfg.fwnode = dev_fwnode(&pdev->dev);
axp20x_batt->data = (struct axp_data *)of_device_get_match_data(dev);
+2 -2
View File
@@ -492,7 +492,7 @@ static int axp717_usb_power_set_input_current_limit(struct axp20x_usb_power *pow
if (power->max_input_cur && (intval > power->max_input_cur)) {
dev_warn(power->dev,
"reqested current %d clamped to max current %d\n",
"requested current %d clamped to max current %d\n",
intval, power->max_input_cur);
intval = power->max_input_cur;
}
@@ -1011,7 +1011,7 @@ static int axp20x_usb_power_probe(struct platform_device *pdev)
return ret;
}
psy_cfg.of_node = pdev->dev.of_node;
psy_cfg.fwnode = dev_fwnode(&pdev->dev);
psy_cfg.drv_data = power;
power->supply = devm_power_supply_register(&pdev->dev,
+2 -2
View File
@@ -156,7 +156,7 @@ static const struct regmap_config bd9995x_regmap_config = {
.reg_stride = 1,
.max_register = 3 * 0x100,
.cache_type = REGCACHE_RBTREE,
.cache_type = REGCACHE_MAPLE,
.ranges = regmap_range_cfg,
.num_ranges = ARRAY_SIZE(regmap_range_cfg),
@@ -982,7 +982,7 @@ static int bd9995x_probe(struct i2c_client *client)
bd->client = client;
bd->dev = dev;
psy_cfg.drv_data = bd;
psy_cfg.of_node = dev->of_node;
psy_cfg.fwnode = dev_fwnode(dev);
mutex_init(&bd->lock);
+1 -1
View File
@@ -1497,7 +1497,7 @@ static int bq2415x_power_supply_init(struct bq2415x_device *bq)
char revstr[8];
struct power_supply_config psy_cfg = {
.drv_data = bq,
.of_node = bq->dev->of_node,
.fwnode = dev_fwnode(bq->dev),
.attr_grp = bq2415x_sysfs_groups,
};
+1 -1
View File
@@ -2117,7 +2117,7 @@ static int bq24190_probe(struct i2c_client *client)
#endif
charger_cfg.drv_data = bdi;
charger_cfg.of_node = dev->of_node;
charger_cfg.fwnode = dev_fwnode(dev);
charger_cfg.supplied_to = bq24190_charger_supplied_to;
charger_cfg.num_supplicants = ARRAY_SIZE(bq24190_charger_supplied_to);
bdi->charger = power_supply_register(dev, &bq24190_charger_desc,
+1 -1
View File
@@ -113,7 +113,7 @@ static const struct regmap_config bq24257_regmap_config = {
.val_bits = 8,
.max_register = BQ24257_REG_7,
.cache_type = REGCACHE_RBTREE,
.cache_type = REGCACHE_MAPLE,
.volatile_reg = bq24257_is_volatile_reg,
};
+1 -1
View File
@@ -402,7 +402,7 @@ static int bq24735_charger_probe(struct i2c_client *client)
psy_cfg.supplied_to = charger->pdata->supplied_to;
psy_cfg.num_supplicants = charger->pdata->num_supplicants;
psy_cfg.of_node = client->dev.of_node;
psy_cfg.fwnode = dev_fwnode(&client->dev);
psy_cfg.drv_data = charger;
i2c_set_clientdata(client, charger);
+3 -3
View File
@@ -1060,7 +1060,7 @@ static const struct regmap_config bq25150_regmap_config = {
.max_register = BQ2515X_DEVICE_ID,
.reg_defaults = bq25150_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(bq25150_reg_defaults),
.cache_type = REGCACHE_RBTREE,
.cache_type = REGCACHE_MAPLE,
.volatile_reg = bq2515x_volatile_register,
};
@@ -1071,7 +1071,7 @@ static const struct regmap_config bq25155_regmap_config = {
.max_register = BQ2515X_DEVICE_ID,
.reg_defaults = bq25155_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(bq25155_reg_defaults),
.cache_type = REGCACHE_RBTREE,
.cache_type = REGCACHE_MAPLE,
.volatile_reg = bq2515x_volatile_register,
};
@@ -1102,7 +1102,7 @@ static int bq2515x_probe(struct i2c_client *client)
i2c_set_clientdata(client, bq2515x);
charger_cfg.drv_data = bq2515x;
charger_cfg.of_node = dev->of_node;
charger_cfg.fwnode = dev_fwnode(dev);
ret = bq2515x_read_properties(bq2515x);
if (ret) {
+1 -1
View File
@@ -1657,7 +1657,7 @@ static int bq256xx_parse_dt(struct bq256xx_device *bq,
int ret = 0;
psy_cfg->drv_data = bq;
psy_cfg->of_node = dev->of_node;
psy_cfg->fwnode = dev_fwnode(dev);
ret = device_property_read_u32(bq->dev, "ti,watchdog-timeout-ms",
&bq->watchdog_timer);
+1 -1
View File
@@ -164,7 +164,7 @@ static const struct regmap_config bq25890_regmap_config = {
.val_bits = 8,
.max_register = 0x14,
.cache_type = REGCACHE_RBTREE,
.cache_type = REGCACHE_MAPLE,
.wr_table = &bq25890_writeable_regs,
.volatile_table = &bq25890_volatile_regs,

Some files were not shown because too many files have changed in this diff Show More