Skip to content

Commit ab1e2d0

Browse files
committed
Merge tag 'for-v6.8-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset updates from Sebastian Reichel: "New features: - bq24190: Add support for BQ24296 charger Cleanups: - all reset drivers: Stop using module_platform_driver_probe() - gpio-restart: use devm_register_sys_off_handler - pwr-mlxbf: support graceful reboot - cw2015: correct time_to_empty units - qcom-battmgr: Fix driver initialization sequence - bq27xxx: Start/Stop delayed work in suspend/resume - minor cleanups and fixes" * tag 'for-v6.8-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (33 commits) power: supply: bq24190_charger: Fix "initializer element is not constant" error power: supply: bq24190_charger: Add support for BQ24296 dt-bindings: power: supply: bq24190: Add BQ24296 compatible dt-bindings: power: reset: xilinx: Rename node names in examples power: supply: qcom_battmgr: Register the power supplies after PDR is up dt-bindings: power: reset: qcom-pon: fix inconsistent example power: supply: Fix null pointer dereference in smb2_probe power: reset: at91: Drop '__init' from at91_wakeup_status() power: supply: Use multiple MODULE_AUTHOR statements power: supply: Fix indentation and some other warnings power: reset: gpio-restart: Use devm_register_sys_off_handler() power: supply: bq256xx: fix some problem in bq256xx_hw_init power: supply: cw2015: correct time_to_empty units in sysfs power: reset: at91-sama5d2_shdwc: Convert to platform remove callback returning void power: reset: at91-reset: Convert to platform remove callback returning void power: reset: tps65086-restart: Convert to platform remove callback returning void power: reset: syscon-poweroff: Convert to platform remove callback returning void power: reset: rmobile-reset: Convert to platform remove callback returning void power: reset: restart-poweroff: Convert to platform remove callback returning void power: reset: regulator-poweroff: Convert to platform remove callback returning void ...
2 parents 237c31c + 17d49b7 commit ab1e2d0

29 files changed

+614
-342
lines changed

Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,15 @@ properties:
2828
items:
2929
- const: reboot-mode
3030

31-
patternProperties:
32-
"^mode-.+":
33-
$ref: /schemas/types.yaml#/definitions/uint32
34-
description: Vendor-specific mode value written to the mode register
31+
allOf:
32+
- $ref: reboot-mode.yaml#
3533

3634
required:
3735
- compatible
3836
- nvmem-cells
3937
- nvmem-cell-names
4038

41-
additionalProperties: false
39+
unevaluatedProperties: false
4240

4341
examples:
4442
- |

Documentation/devicetree/bindings/power/reset/qcom,pon.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,24 @@ examples:
111111
#include <dt-bindings/interrupt-controller/irq.h>
112112
#include <dt-bindings/input/linux-event-codes.h>
113113
#include <dt-bindings/spmi/spmi.h>
114-
spmi_bus: spmi@c440000 {
114+
115+
spmi@c440000 {
115116
reg = <0x0c440000 0x1100>;
116117
#address-cells = <2>;
117118
#size-cells = <0>;
118-
pmk8350: pmic@0 {
119+
120+
pmic@0 {
119121
reg = <0x0 SPMI_USID>;
120122
#address-cells = <1>;
121123
#size-cells = <0>;
122-
pmk8350_pon: pon_hlos@1300 {
123-
reg = <0x1300>;
124+
125+
pon@800 {
124126
compatible = "qcom,pm8998-pon";
127+
reg = <0x800>;
125128
126129
pwrkey {
127130
compatible = "qcom,pm8941-pwrkey";
128-
interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >;
131+
interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
129132
debounce = <15625>;
130133
bias-pull-up;
131134
linux,code = <KEY_POWER>;

Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@ properties:
2929
$ref: /schemas/types.yaml#/definitions/uint32
3030
description: Offset in the register map for the mode register (in bytes)
3131

32-
patternProperties:
33-
"^mode-.+":
34-
$ref: /schemas/types.yaml#/definitions/uint32
35-
description: Vendor-specific mode value written to the mode register
32+
allOf:
33+
- $ref: reboot-mode.yaml#
3634

37-
additionalProperties: false
35+
unevaluatedProperties: false
3836

3937
required:
4038
- compatible

Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ examples:
5757
5858
firmware {
5959
zynqmp-firmware {
60-
zynqmp-power {
60+
power-management {
6161
compatible = "xlnx,zynqmp-power";
6262
interrupts = <0 35 4>;
6363
};
@@ -70,7 +70,7 @@ examples:
7070
7171
firmware {
7272
zynqmp-firmware {
73-
zynqmp-power {
73+
power-management {
7474
compatible = "xlnx,zynqmp-power";
7575
interrupt-parent = <&gic>;
7676
interrupts = <0 35 4>;

Documentation/devicetree/bindings/power/supply/bq24190.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ properties:
2020
- ti,bq24192
2121
- ti,bq24192i
2222
- ti,bq24196
23+
- ti,bq24296
2324

2425
reg:
2526
maxItems: 1

drivers/power/reset/as3722-poweroff.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,19 @@ static int as3722_poweroff_probe(struct platform_device *pdev)
6161
return 0;
6262
}
6363

64-
static int as3722_poweroff_remove(struct platform_device *pdev)
64+
static void as3722_poweroff_remove(struct platform_device *pdev)
6565
{
6666
if (pm_power_off == as3722_pm_power_off)
6767
pm_power_off = NULL;
6868
as3722_pm_poweroff = NULL;
69-
70-
return 0;
7169
}
7270

7371
static struct platform_driver as3722_poweroff_driver = {
7472
.driver = {
7573
.name = "as3722-power-off",
7674
},
7775
.probe = as3722_poweroff_probe,
78-
.remove = as3722_poweroff_remove,
76+
.remove_new = as3722_poweroff_remove,
7977
};
8078

8179
module_platform_driver(as3722_poweroff_driver);

drivers/power/reset/at91-poweroff.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static struct shdwc {
5757
void __iomem *mpddrc_base;
5858
} at91_shdwc;
5959

60-
static void __init at91_wakeup_status(struct platform_device *pdev)
60+
static void at91_wakeup_status(struct platform_device *pdev)
6161
{
6262
const char *reason;
6363
u32 reg = readl(at91_shdwc.shdwc_base + AT91_SHDW_SR);
@@ -149,7 +149,7 @@ static void at91_poweroff_dt_set_wakeup_mode(struct platform_device *pdev)
149149
writel(wakeup_mode | mode, at91_shdwc.shdwc_base + AT91_SHDW_MR);
150150
}
151151

152-
static int __init at91_poweroff_probe(struct platform_device *pdev)
152+
static int at91_poweroff_probe(struct platform_device *pdev)
153153
{
154154
struct device_node *np;
155155
u32 ddr_type;
@@ -202,7 +202,7 @@ static int __init at91_poweroff_probe(struct platform_device *pdev)
202202
return ret;
203203
}
204204

205-
static int __exit at91_poweroff_remove(struct platform_device *pdev)
205+
static void at91_poweroff_remove(struct platform_device *pdev)
206206
{
207207
if (pm_power_off == at91_poweroff)
208208
pm_power_off = NULL;
@@ -211,8 +211,6 @@ static int __exit at91_poweroff_remove(struct platform_device *pdev)
211211
iounmap(at91_shdwc.mpddrc_base);
212212

213213
clk_disable_unprepare(at91_shdwc.sclk);
214-
215-
return 0;
216214
}
217215

218216
static const struct of_device_id at91_poweroff_of_match[] = {
@@ -224,13 +222,14 @@ static const struct of_device_id at91_poweroff_of_match[] = {
224222
MODULE_DEVICE_TABLE(of, at91_poweroff_of_match);
225223

226224
static struct platform_driver at91_poweroff_driver = {
227-
.remove = __exit_p(at91_poweroff_remove),
225+
.probe = at91_poweroff_probe,
226+
.remove_new = at91_poweroff_remove,
228227
.driver = {
229228
.name = "at91-poweroff",
230229
.of_match_table = at91_poweroff_of_match,
231230
},
232231
};
233-
module_platform_driver_probe(at91_poweroff_driver, at91_poweroff_probe);
232+
module_platform_driver(at91_poweroff_driver);
234233

235234
MODULE_AUTHOR("Atmel Corporation");
236235
MODULE_DESCRIPTION("Shutdown driver for Atmel SoCs");

drivers/power/reset/at91-reset.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ static int at91_rcdev_init(struct at91_reset *reset,
337337
return devm_reset_controller_register(&pdev->dev, &reset->rcdev);
338338
}
339339

340-
static int __init at91_reset_probe(struct platform_device *pdev)
340+
static int at91_reset_probe(struct platform_device *pdev)
341341
{
342342
const struct of_device_id *match;
343343
struct at91_reset *reset;
@@ -417,24 +417,23 @@ static int __init at91_reset_probe(struct platform_device *pdev)
417417
return ret;
418418
}
419419

420-
static int __exit at91_reset_remove(struct platform_device *pdev)
420+
static void at91_reset_remove(struct platform_device *pdev)
421421
{
422422
struct at91_reset *reset = platform_get_drvdata(pdev);
423423

424424
unregister_restart_handler(&reset->nb);
425425
clk_disable_unprepare(reset->sclk);
426-
427-
return 0;
428426
}
429427

430428
static struct platform_driver at91_reset_driver = {
431-
.remove = __exit_p(at91_reset_remove),
429+
.probe = at91_reset_probe,
430+
.remove_new = at91_reset_remove,
432431
.driver = {
433432
.name = "at91-reset",
434433
.of_match_table = at91_reset_of_match,
435434
},
436435
};
437-
module_platform_driver_probe(at91_reset_driver, at91_reset_probe);
436+
module_platform_driver(at91_reset_driver);
438437

439438
MODULE_AUTHOR("Atmel Corporation");
440439
MODULE_DESCRIPTION("Reset driver for Atmel SoCs");

drivers/power/reset/at91-sama5d2_shdwc.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static const unsigned long long sdwc_dbc_period[] = {
107107
0, 3, 32, 512, 4096, 32768,
108108
};
109109

110-
static void __init at91_wakeup_status(struct platform_device *pdev)
110+
static void at91_wakeup_status(struct platform_device *pdev)
111111
{
112112
struct shdwc *shdw = platform_get_drvdata(pdev);
113113
const struct reg_config *rcfg = shdw->rcfg;
@@ -329,7 +329,7 @@ static const struct of_device_id at91_pmc_ids[] = {
329329
{ /* Sentinel. */ }
330330
};
331331

332-
static int __init at91_shdwc_probe(struct platform_device *pdev)
332+
static int at91_shdwc_probe(struct platform_device *pdev)
333333
{
334334
const struct of_device_id *match;
335335
struct device_node *np;
@@ -421,7 +421,7 @@ static int __init at91_shdwc_probe(struct platform_device *pdev)
421421
return ret;
422422
}
423423

424-
static int __exit at91_shdwc_remove(struct platform_device *pdev)
424+
static void at91_shdwc_remove(struct platform_device *pdev)
425425
{
426426
struct shdwc *shdw = platform_get_drvdata(pdev);
427427

@@ -437,18 +437,17 @@ static int __exit at91_shdwc_remove(struct platform_device *pdev)
437437
iounmap(shdw->pmc_base);
438438

439439
clk_disable_unprepare(shdw->sclk);
440-
441-
return 0;
442440
}
443441

444442
static struct platform_driver at91_shdwc_driver = {
445-
.remove = __exit_p(at91_shdwc_remove),
443+
.probe = at91_shdwc_probe,
444+
.remove_new = at91_shdwc_remove,
446445
.driver = {
447446
.name = "at91-shdwc",
448447
.of_match_table = at91_shdwc_of_match,
449448
},
450449
};
451-
module_platform_driver_probe(at91_shdwc_driver, at91_shdwc_probe);
450+
module_platform_driver(at91_shdwc_driver);
452451

453452
MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>");
454453
MODULE_DESCRIPTION("Atmel shutdown controller driver");

drivers/power/reset/atc260x-poweroff.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static int atc260x_pwrc_probe(struct platform_device *pdev)
233233
return ret;
234234
}
235235

236-
static int atc260x_pwrc_remove(struct platform_device *pdev)
236+
static void atc260x_pwrc_remove(struct platform_device *pdev)
237237
{
238238
struct atc260x_pwrc *priv = platform_get_drvdata(pdev);
239239

@@ -243,13 +243,11 @@ static int atc260x_pwrc_remove(struct platform_device *pdev)
243243
}
244244

245245
unregister_restart_handler(&priv->restart_nb);
246-
247-
return 0;
248246
}
249247

250248
static struct platform_driver atc260x_pwrc_driver = {
251249
.probe = atc260x_pwrc_probe,
252-
.remove = atc260x_pwrc_remove,
250+
.remove_new = atc260x_pwrc_remove,
253251
.driver = {
254252
.name = "atc260x-pwrc",
255253
},

0 commit comments

Comments
 (0)