* [PATCH v2 0/3] mfd: max8907: Schema, pdata and poweroff
@ 2026-10-04 16:45 Svyatoslav Ryhel
2026-10-04 16:45 ` [PATCH v2 1/3] regulator: dt-bindings: maxim,max8907: Convert to DT schema Svyatoslav Ryhel
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Svyatoslav Ryhel @ 2026-10-04 16:45 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Svyatoslav Ryhel
Cc: linux-kernel, devicetree, mfd
Convert existing txt documentation file to DF schema. Remove
platform data use. Switch to device managed poweroff handler.
Schema includes reference to pending tegra-regulators-coupling
conversion. https://lore.kernel.org/lkml/20260924-ti-tps6586x-v4-1-6c7a8fb8b646@gmail.com/
---
Changes in v2:
- fixed max8907_power_off return
---
Svyatoslav Ryhel (3):
regulator: dt-bindings: maxim,max8907: Convert to DT schema
mfd: max8907: Remove platform_data based probing
mfd: max8907: Convert to use device managed poweroff handler
.../devicetree/bindings/regulator/max8907.txt | 69 -----
.../bindings/regulator/maxim,max8907.yaml | 285 ++++++++++++++++++
drivers/mfd/max8907.c | 38 +--
drivers/regulator/max8907-regulator.c | 8 +-
include/linux/mfd/max8907.h | 5 -
5 files changed, 309 insertions(+), 96 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/regulator/max8907.txt
create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max8907.yaml
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/3] regulator: dt-bindings: maxim,max8907: Convert to DT schema
2026-10-04 16:45 [PATCH v2 0/3] mfd: max8907: Schema, pdata and poweroff Svyatoslav Ryhel
@ 2026-10-04 16:45 ` Svyatoslav Ryhel
2026-10-04 16:54 ` sashiko-bot
2026-10-05 13:30 ` Rob Herring (Arm)
2026-10-04 16:45 ` [PATCH v2 2/3] mfd: max8907: Remove platform_data based probing Svyatoslav Ryhel
2026-10-04 16:45 ` [PATCH v2 3/3] mfd: max8907: Convert to use device managed poweroff handler Svyatoslav Ryhel
2 siblings, 2 replies; 7+ messages in thread
From: Svyatoslav Ryhel @ 2026-10-04 16:45 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Svyatoslav Ryhel
Cc: linux-kernel, devicetree, mfd
Convert Maxim MAX8907 regulator binding from text to DT schema. Reference
to nvidia,tegra-regulators-coupling in child regulator nodes.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
.../devicetree/bindings/regulator/max8907.txt | 69 -----
.../bindings/regulator/maxim,max8907.yaml | 285 ++++++++++++++++++
2 files changed, 285 insertions(+), 69 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/regulator/max8907.txt
create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max8907.yaml
diff --git a/Documentation/devicetree/bindings/regulator/max8907.txt b/Documentation/devicetree/bindings/regulator/max8907.txt
deleted file mode 100644
index 371eccd1cd689..0000000000000
--- a/Documentation/devicetree/bindings/regulator/max8907.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-MAX8907 regulator
-
-Required properties:
-- compatible: "maxim,max8907"
-- reg: I2C slave address
-- interrupts: The interrupt output of the controller
-- mbatt-supply: The input supply for MBATT, BBAT, SDBY, VRTC.
-- in-v1-supply: The input supply for SD1.
-- in-v2-supply: The input supply for SD2.
-- in-v3-supply: The input supply for SD3.
-- in1-supply: The input supply for LDO1.
-...
-- in20-supply: The input supply for LDO20.
-- regulators: A node that houses a sub-node for each regulator within the
- device. Each sub-node is identified using the node's name (or the deprecated
- regulator-compatible property if present), with valid values listed below.
- The content of each sub-node is defined by the standard binding for
- regulators; see regulator.txt.
-
-Optional properties:
-- maxim,system-power-controller: Boolean property indicating that the PMIC
- controls the overall system power.
-
-The valid names for regulators are:
-
- sd1, sd2, sd3, ldo1, ldo2, ldo3, ldo4, ldo5, ldo6, ldo7, ldo8, ldo9, ldo10,
- ldo11, ldo12, ldo13, ldo14, ldo15, ldo16, ldo17, ldo18, ldo19, ldo20, out5v,
- out33v, bbat, sdby, vrtc.
-
-Example:
-
- max8907@3c {
- compatible = "maxim,max8907";
- reg = <0x3c>;
- interrupts = <0 86 0x4>;
-
- maxim,system-power-controller;
-
- mbatt-supply = <&some_reg>;
- in-v1-supply = <&mbatt_reg>;
- ...
- in1-supply = <&mbatt_reg>;
- ...
-
- regulators {
- mbatt_reg: mbatt {
- regulator-name = "vbat_pmu";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- regulator-always-on;
- };
-
- sd1 {
- regulator-name = "nvvdd_sv1,vdd_cpu_pmu";
- regulator-min-microvolt = <1000000>;
- regulator-max-microvolt = <1000000>;
- regulator-always-on;
- };
-
- sd2 {
- regulator-name = "nvvdd_sv2,vdd_core";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
- regulator-always-on;
- };
-...
- };
- };
- };
diff --git a/Documentation/devicetree/bindings/regulator/maxim,max8907.yaml b/Documentation/devicetree/bindings/regulator/maxim,max8907.yaml
new file mode 100644
index 0000000000000..e4e1390a49b9b
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/maxim,max8907.yaml
@@ -0,0 +1,285 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim Integrated MAX8907 PMIC
+
+maintainers:
+ - Svyatoslav Ryhel <clamor95@gmail.com>
+
+properties:
+ compatible:
+ const: maxim,max8907
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ maxim,system-power-controller:
+ type: boolean
+ deprecated: true
+ description:
+ Telling whether or not this PMIC is controlling the system power.
+
+ system-power-controller: true
+
+ mbatt-supply:
+ description:
+ The input supply for MBATT, BBAT, SDBY, VRTC.
+
+ regulators:
+ type: object
+ additionalProperties: false
+
+ patternProperties:
+ "^(sd[1-3]|ldo([1-9]|1[0-9]|20)|bbat|mbatt|out(5v|33v)|sdby|vrtc)$":
+ allOf:
+ - $ref: /schemas/regulator/regulator.yaml#
+ - $ref: /schemas/regulator/nvidia,tegra-regulators-coupling.yaml#
+ unevaluatedProperties: false
+
+patternProperties:
+ "^in-v[1-3]-supply$":
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ The input supply for SD1, SD2 and SD3.
+
+ "^in([1-9]|1[0-9]|20)-supply$":
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ The input supply for LDO1 - LDO20.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - regulators
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@3c {
+ compatible = "maxim,max8907";
+ reg = <0x3c>;
+ interrupts = <0 86 0x4>;
+
+ system-power-controller;
+
+ mbatt-supply = <&vdd_5v0_sys>;
+ in-v1-supply = <&vdd_3v3_vbat>;
+ in-v2-supply = <&vdd_3v3_vbat>;
+ in-v3-supply = <&vdd_3v3_vbat>;
+ in1-supply = <&vdd_3v3_vbat>;
+ in2-supply = <&vdd_1v8_vio>;
+ in3-supply = <&vdd_3v3_vbat>;
+ in4-supply = <&vdd_3v3_vbat>;
+ in5-supply = <&vdd_3v3_vbat>;
+ in6-supply = <&vdd_3v3_vbat>;
+ in7-supply = <&vdd_3v3_vbat>;
+ in8-supply = <&vdd_3v3_vbat>;
+ in9-supply = <&vdd_3v3_vbat>;
+ in10-supply = <&vdd_3v3_vbat>;
+ in11-supply = <&vdd_3v3_vbat>;
+ in12-supply = <&vdd_3v3_vbat>;
+ in13-supply = <&vdd_3v3_vbat>;
+ in14-supply = <&vdd_3v3_vbat>;
+ in15-supply = <&vdd_3v3_vbat>;
+ in16-supply = <&vdd_3v3_vbat>;
+ in17-supply = <&vdd_1v8_vio>;
+ in18-supply = <&vdd_3v3_vbat>;
+ in19-supply = <&vdd_3v3_vbat>;
+ in20-supply = <&vdd_3v3_vbat>;
+
+ regulators {
+ vdd_3v3_vbat: mbatt {
+ regulator-name = "v_powerrail";
+ regulator-always-on;
+ };
+
+ sd1 {
+ regulator-name = "vcc_1v2_ddrio";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vdd_core: sd2 {
+ regulator-name = "vdd_core";
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vdd_1v8_vio: sd3 {
+ regulator-name = "vcc_1v8_io";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ ldo1 {
+ regulator-name = "vcc_3v3_ddr";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ ldo2 {
+ regulator-name = "vcc_1v1_pll";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ iovcc_1v8_lcd: ldo3 {
+ regulator-name = "vcc_1v8_lcd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ };
+
+ avdd_3v3_usb: ldo4 {
+ regulator-name = "avdd_3v3_usb";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vcore_emmc: ldo5 {
+ regulator-name = "vcc_2v8_emmc";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-boot-on;
+ };
+
+ vcc_hdmi_pll: ldo6 {
+ regulator-name = "vcc_hdmi_pll";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ vcc_3v0_sensor: ldo7 {
+ regulator-name = "vcc_3v0_sensor";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-boot-on;
+ };
+
+ vcc_1v8_sensor: ldo8 {
+ regulator-name = "vcc_1v8_sensor";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ };
+
+ ldo9 {
+ regulator-name = "vcc_3v3_fuse";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ vcc_3v1_touch: ldo10 {
+ regulator-name = "vcc_3v1_touch";
+ regulator-min-microvolt = <3100000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-boot-on;
+ };
+
+ vdd_3v3_hdmi: ldo11 {
+ regulator-name = "vdd_3v3_hdmi";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ vdd_usd: ldo12 {
+ regulator-name = "vcc_2v8_sdio";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-boot-on;
+ };
+
+ vcc_3v0_motor: ldo13 {
+ regulator-name = "vcc_3v0_motor";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ };
+
+ vcc_2v8_lcd: ldo14 {
+ regulator-name = "vcc_2v8_lcd";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-boot-on;
+ };
+
+ vcc_3v3_temp: ldo15 {
+ regulator-name = "vcc_3v3_temp";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ };
+
+ /* LDO16 is not used */
+
+ avdd_dsi_csi: ldo17 {
+ regulator-name = "vcc_1v2_mipi";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ ldo18 {
+ regulator-name = "vcc_1v8_vi";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ vcc_1v8_touch: ldo19 {
+ regulator-name = "vcc_1v8_touch";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ };
+
+ /* LDO20 is not used */
+
+ out5v {
+ regulator-name = "usb0_vbus_reg";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ /* OUT33V is not used */
+
+ bbat {
+ regulator-name = "vcc_bbat";
+ };
+
+ vdd_rtc: sdby {
+ regulator-name = "vcc_rtc";
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vrtc {
+ regulator-name = "vrtc";
+ };
+ };
+ };
+ };
+...
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/3] mfd: max8907: Remove platform_data based probing
2026-10-04 16:45 [PATCH v2 0/3] mfd: max8907: Schema, pdata and poweroff Svyatoslav Ryhel
2026-10-04 16:45 ` [PATCH v2 1/3] regulator: dt-bindings: maxim,max8907: Convert to DT schema Svyatoslav Ryhel
@ 2026-10-04 16:45 ` Svyatoslav Ryhel
2026-10-04 16:51 ` sashiko-bot
2026-10-04 16:45 ` [PATCH v2 3/3] mfd: max8907: Convert to use device managed poweroff handler Svyatoslav Ryhel
2 siblings, 1 reply; 7+ messages in thread
From: Svyatoslav Ryhel @ 2026-10-04 16:45 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Svyatoslav Ryhel
Cc: linux-kernel, devicetree, mfd
There are no in-tree users of this driver, but it supports devicetree
based probing, which means external dtb files may exist that work with
this.
Remove the unused legacy code and make this a DT-only driver.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
drivers/mfd/max8907.c | 8 +-------
drivers/regulator/max8907-regulator.c | 8 +++-----
include/linux/mfd/max8907.h | 5 -----
3 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/drivers/mfd/max8907.c b/drivers/mfd/max8907.c
index 7bac1d6517717..363ac80c0593b 100644
--- a/drivers/mfd/max8907.c
+++ b/drivers/mfd/max8907.c
@@ -184,13 +184,7 @@ static int max8907_i2c_probe(struct i2c_client *i2c)
{
struct max8907 *max8907;
int ret;
- struct max8907_platform_data *pdata = dev_get_platdata(&i2c->dev);
- bool pm_off = false;
-
- if (pdata)
- pm_off = pdata->pm_off;
- else if (i2c->dev.of_node)
- pm_off = of_property_read_bool(i2c->dev.of_node,
+ bool pm_off = of_property_read_bool(i2c->dev.of_node,
"maxim,system-power-controller");
max8907 = devm_kzalloc(&i2c->dev, sizeof(struct max8907), GFP_KERNEL);
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c
index e59aa7a3ee546..907ed3fca5e97 100644
--- a/drivers/regulator/max8907-regulator.c
+++ b/drivers/regulator/max8907-regulator.c
@@ -274,7 +274,6 @@ static inline struct device_node *match_of_node(int index)
static int max8907_regulator_probe(struct platform_device *pdev)
{
struct max8907 *max8907 = dev_get_drvdata(pdev->dev.parent);
- struct max8907_platform_data *pdata = dev_get_platdata(max8907->dev);
int ret;
struct max8907_regulator *pmic;
unsigned int val;
@@ -312,10 +311,9 @@ static int max8907_regulator_probe(struct platform_device *pdev)
struct regulator_dev *rdev;
config.dev = pdev->dev.parent;
- if (pdata)
- idata = pdata->init_data[i];
- else
- idata = match_init_data(i);
+
+ idata = match_init_data(i);
+
config.init_data = idata;
config.driver_data = pmic;
config.regmap = max8907->regmap_gen;
diff --git a/include/linux/mfd/max8907.h b/include/linux/mfd/max8907.h
index 4be3c2370e2a4..e222250f0cc1e 100644
--- a/include/linux/mfd/max8907.h
+++ b/include/linux/mfd/max8907.h
@@ -227,11 +227,6 @@ enum {
MAX8907_IRQ_RTC_ALARM0,
};
-struct max8907_platform_data {
- struct regulator_init_data *init_data[MAX8907_NUM_REGULATORS];
- bool pm_off;
-};
-
struct regmap_irq_chips_data;
struct max8907 {
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/3] mfd: max8907: Convert to use device managed poweroff handler
2026-10-04 16:45 [PATCH v2 0/3] mfd: max8907: Schema, pdata and poweroff Svyatoslav Ryhel
2026-10-04 16:45 ` [PATCH v2 1/3] regulator: dt-bindings: maxim,max8907: Convert to DT schema Svyatoslav Ryhel
2026-10-04 16:45 ` [PATCH v2 2/3] mfd: max8907: Remove platform_data based probing Svyatoslav Ryhel
@ 2026-10-04 16:45 ` Svyatoslav Ryhel
2 siblings, 0 replies; 7+ messages in thread
From: Svyatoslav Ryhel @ 2026-10-04 16:45 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Svyatoslav Ryhel
Cc: linux-kernel, devicetree, mfd
Replace the legacy global 'pm_power_off' function pointer assignment with
the devm_register_sys_off_handler() helper.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
drivers/mfd/max8907.c | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/drivers/mfd/max8907.c b/drivers/mfd/max8907.c
index 363ac80c0593b..9c40f0551a8ce 100644
--- a/drivers/mfd/max8907.c
+++ b/drivers/mfd/max8907.c
@@ -15,6 +15,7 @@
#include <linux/mfd/max8907.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/reboot.h>
#include <linux/regmap.h>
#include <linux/slab.h>
@@ -173,19 +174,23 @@ static const struct regmap_irq_chip max8907_rtc_irq_chip = {
.num_irqs = ARRAY_SIZE(max8907_rtc_irqs),
};
-static struct max8907 *max8907_pm_off;
-static void max8907_power_off(void)
+static int max8907_power_off(struct sys_off_data *data)
{
- regmap_update_bits(max8907_pm_off->regmap_gen, MAX8907_REG_RESET_CNFG,
- MAX8907_MASK_POWER_OFF, MAX8907_MASK_POWER_OFF);
+ struct max8907 *max8907 = data->cb_data;
+ int ret;
+
+ ret = regmap_update_bits(max8907->regmap_gen, MAX8907_REG_RESET_CNFG,
+ MAX8907_MASK_POWER_OFF, MAX8907_MASK_POWER_OFF);
+ if (ret)
+ dev_err(max8907->dev, "failed to restart device!\n");
+
+ return NOTIFY_DONE;
}
static int max8907_i2c_probe(struct i2c_client *i2c)
{
struct max8907 *max8907;
int ret;
- bool pm_off = of_property_read_bool(i2c->dev.of_node,
- "maxim,system-power-controller");
max8907 = devm_kzalloc(&i2c->dev, sizeof(struct max8907), GFP_KERNEL);
if (!max8907) {
@@ -204,6 +209,16 @@ static int max8907_i2c_probe(struct i2c_client *i2c)
goto err_regmap_gen;
}
+ if (device_property_read_bool(&i2c->dev, "system-power-controller") ||
+ device_property_read_bool(&i2c->dev, "maxim,system-power-controller")) {
+ ret = devm_register_sys_off_handler(&i2c->dev, SYS_OFF_MODE_POWER_OFF,
+ SYS_OFF_PRIO_DEFAULT,
+ &max8907_power_off, max8907);
+ if (ret)
+ return dev_err_probe(&i2c->dev, ret,
+ "failed to register poweroff handler\n");
+ }
+
max8907->i2c_rtc = i2c_new_dummy_device(i2c->adapter, MAX8907_RTC_I2C_ADDR);
if (IS_ERR(max8907->i2c_rtc)) {
ret = PTR_ERR(max8907->i2c_rtc);
@@ -250,11 +265,6 @@ static int max8907_i2c_probe(struct i2c_client *i2c)
goto err_add_devices;
}
- if (pm_off && !pm_power_off) {
- max8907_pm_off = max8907;
- pm_power_off = max8907_power_off;
- }
-
return 0;
err_add_devices:
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] mfd: max8907: Remove platform_data based probing
2026-10-04 16:45 ` [PATCH v2 2/3] mfd: max8907: Remove platform_data based probing Svyatoslav Ryhel
@ 2026-10-04 16:51 ` sashiko-bot
0 siblings, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-10-04 16:51 UTC (permalink / raw)
To: Svyatoslav Ryhel; +Cc: mfd, robh, conor+dt, lee, devicetree
> There are no in-tree users of this driver, but it supports devicetree
> based probing, which means external dtb files may exist that work with
> this.
>
> Remove the unused legacy code and make this a DT-only driver.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261004164540.198446-1-clamor95@gmail.com?part=2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] regulator: dt-bindings: maxim,max8907: Convert to DT schema
2026-10-04 16:45 ` [PATCH v2 1/3] regulator: dt-bindings: maxim,max8907: Convert to DT schema Svyatoslav Ryhel
@ 2026-10-04 16:54 ` sashiko-bot
2026-10-05 13:30 ` Rob Herring (Arm)
1 sibling, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-10-04 16:54 UTC (permalink / raw)
To: Svyatoslav Ryhel; +Cc: lee, devicetree, robh, conor+dt, mfd
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: broken schema reference to non-existent nvidia,tegra-regulators-coupling.yaml
--
commit 299fcba3d236bda6f3824120d17a27592c67f650
Author: Svyatoslav Ryhel <clamor95@gmail.com>
regulator: dt-bindings: maxim,max8907: Convert to DT schema
Convert Maxim MAX8907 regulator binding from text to DT schema. Reference
to nvidia,tegra-regulators-coupling in child regulator nodes.
> diff --git a/Documentation/devicetree/bindings/regulator/maxim,max8907.yaml b/Documentation/devicetree/bindings/regulator/maxim,max8907.yaml
> new file mode 100644
> index 0000000000000..e4e1390a49b9b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/maxim,max8907.yaml
[ ... ]
> + regulators:
> + type: object
> + additionalProperties: false
> +
> + patternProperties:
> + "^(sd[1-3]|ldo([1-9]|1[0-9]|20)|bbat|mbatt|out(5v|33v)|sdby|vrtc)$":
> + allOf:
> + - $ref: /schemas/regulator/regulator.yaml#
> + - $ref: /schemas/regulator/nvidia,tegra-regulators-coupling.yaml#
[Severity: Low]
Does this schema reference break dtschema device tree validation?
The dt_binding_check validation tool will fail because it cannot resolve the
referenced nvidia,tegra-regulators-coupling.yaml schema, as the target file
has not been converted and still only exists as a .txt binding.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261004164540.198446-1-clamor95@gmail.com?part=1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] regulator: dt-bindings: maxim,max8907: Convert to DT schema
2026-10-04 16:45 ` [PATCH v2 1/3] regulator: dt-bindings: maxim,max8907: Convert to DT schema Svyatoslav Ryhel
2026-10-04 16:54 ` sashiko-bot
@ 2026-10-05 13:30 ` Rob Herring (Arm)
1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring (Arm) @ 2026-10-05 13:30 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: mfd, Mark Brown, devicetree, Krzysztof Kozlowski, Lee Jones,
linux-kernel, Conor Dooley, Liam Girdwood
On Sun, 04 Oct 2026 19:45:38 +0300, Svyatoslav Ryhel wrote:
> Convert Maxim MAX8907 regulator binding from text to DT schema. Reference
> to nvidia,tegra-regulators-coupling in child regulator nodes.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
> .../devicetree/bindings/regulator/max8907.txt | 69 -----
> .../bindings/regulator/maxim,max8907.yaml | 285 ++++++++++++++++++
> 2 files changed, 285 insertions(+), 69 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/regulator/max8907.txt
> create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max8907.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/maxim,max8907.yaml: Unresolvable reference: /schemas/regulator/nvidia,tegra-regulators-coupling.yaml#
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:mbatt: False schema does not allow {'regulator-name': ['v_powerrail'], 'regulator-always-on': True, 'phandle': 2}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:sd1: False schema does not allow {'regulator-name': ['vcc_1v2_ddrio'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1200000]], 'regulator-always-on': True, 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:sd2: False schema does not allow {'regulator-name': ['vdd_core'], 'regulator-min-microvolt': [[950000]], 'regulator-max-microvolt': [[1300000]], 'regulator-always-on': True, 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:sd3: False schema does not allow {'regulator-name': ['vcc_1v8_io'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-always-on': True, 'regulator-boot-on': True, 'phandle': 3}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo1: False schema does not allow {'regulator-name': ['vcc_3v3_ddr'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3300000]], 'regulator-always-on': True, 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo2: False schema does not allow {'regulator-name': ['vcc_1v1_pll'], 'regulator-min-microvolt': [[1100000]], 'regulator-max-microvolt': [[1100000]], 'regulator-always-on': True, 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo3: False schema does not allow {'regulator-name': ['vcc_1v8_lcd'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo4: False schema does not allow {'regulator-name': ['avdd_3v3_usb'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3300000]], 'regulator-always-on': True, 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo5: False schema does not allow {'regulator-name': ['vcc_2v8_emmc'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo6: False schema does not allow {'regulator-name': ['vcc_hdmi_pll'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]]}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo7: False schema does not allow {'regulator-name': ['vcc_3v0_sensor'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3000000]], 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo8: False schema does not allow {'regulator-name': ['vcc_1v8_sensor'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo9: False schema does not allow {'regulator-name': ['vcc_3v3_fuse'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3300000]]}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo10: False schema does not allow {'regulator-name': ['vcc_3v1_touch'], 'regulator-min-microvolt': [[3100000]], 'regulator-max-microvolt': [[3100000]], 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo11: False schema does not allow {'regulator-name': ['vdd_3v3_hdmi'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3300000]]}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo12: False schema does not allow {'regulator-name': ['vcc_2v8_sdio'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo13: False schema does not allow {'regulator-name': ['vcc_3v0_motor'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3000000]]}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo14: False schema does not allow {'regulator-name': ['vcc_2v8_lcd'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo15: False schema does not allow {'regulator-name': ['vcc_3v3_temp'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3300000]], 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo17: False schema does not allow {'regulator-name': ['vcc_1v2_mipi'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1200000]]}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo18: False schema does not allow {'regulator-name': ['vcc_1v8_vi'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]]}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:ldo19: False schema does not allow {'regulator-name': ['vcc_1v8_touch'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:out5v: False schema does not allow {'regulator-name': ['usb0_vbus_reg'], 'regulator-min-microvolt': [[5000000]], 'regulator-max-microvolt': [[5000000]]}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:bbat: False schema does not allow {'regulator-name': ['vcc_bbat']}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:sdby: False schema does not allow {'regulator-name': ['vcc_rtc'], 'regulator-min-microvolt': [[950000]], 'regulator-max-microvolt': [[1300000]], 'regulator-always-on': True, 'regulator-boot-on': True}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
Documentation/devicetree/bindings/regulator/maxim,max8907.example.dtb: pmic@3c (maxim,max8907): regulators:vrtc: False schema does not allow {'regulator-name': ['vrtc']}
from schema $id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20261004164540.198446-2-clamor95@gmail.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-10-05 13:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-04 16:45 [PATCH v2 0/3] mfd: max8907: Schema, pdata and poweroff Svyatoslav Ryhel
2026-10-04 16:45 ` [PATCH v2 1/3] regulator: dt-bindings: maxim,max8907: Convert to DT schema Svyatoslav Ryhel
2026-10-04 16:54 ` sashiko-bot
2026-10-05 13:30 ` Rob Herring (Arm)
2026-10-04 16:45 ` [PATCH v2 2/3] mfd: max8907: Remove platform_data based probing Svyatoslav Ryhel
2026-10-04 16:51 ` sashiko-bot
2026-10-04 16:45 ` [PATCH v2 3/3] mfd: max8907: Convert to use device managed poweroff handler Svyatoslav Ryhel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.