* [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro
@ 2023-03-09 9:22 Christoph Niedermaier
2023-03-09 9:22 ` [PATCH V4 2/3] mfd: da9062: Remove IRQ requirement Christoph Niedermaier
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Christoph Niedermaier @ 2023-03-09 9:22 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Christoph Niedermaier, Support Opensource, Lee Jones,
Adam Thomson, Liam Girdwood, Mark Brown, Marek Vasut, kernel,
linux-kernel
Use MFD_CELL_OF macro helper instead of plain struct properties, which makes
the code a bit shorter and to have commonly defined MFD cell attributes.
Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Acked-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
---
Cc: Support Opensource <support.opensource@diasemi.com>
Cc: Lee Jones <lee@kernel.org>
Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Marek Vasut <marex@denx.de>
Cc: kernel@dh-electronics.com
Cc: linux-kernel@vger.kernel.org
To: linux-arm-kernel@lists.infradead.org
---
V3: - Add this patch to the series
V4: - Rebase on current next 20230309
- Add Acked-by tag
---
drivers/mfd/da9062-core.c | 92 +++++++++++++----------------------------------
1 file changed, 24 insertions(+), 68 deletions(-)
diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
index 40cde51e5719..9418c58c2b06 100644
--- a/drivers/mfd/da9062-core.c
+++ b/drivers/mfd/da9062-core.c
@@ -182,34 +182,16 @@ static const struct resource da9061_onkey_resources[] = {
};
static const struct mfd_cell da9061_devs[] = {
- {
- .name = "da9061-core",
- .num_resources = ARRAY_SIZE(da9061_core_resources),
- .resources = da9061_core_resources,
- },
- {
- .name = "da9062-regulators",
- .num_resources = ARRAY_SIZE(da9061_regulators_resources),
- .resources = da9061_regulators_resources,
- },
- {
- .name = "da9061-watchdog",
- .num_resources = ARRAY_SIZE(da9061_wdt_resources),
- .resources = da9061_wdt_resources,
- .of_compatible = "dlg,da9061-watchdog",
- },
- {
- .name = "da9061-thermal",
- .num_resources = ARRAY_SIZE(da9061_thermal_resources),
- .resources = da9061_thermal_resources,
- .of_compatible = "dlg,da9061-thermal",
- },
- {
- .name = "da9061-onkey",
- .num_resources = ARRAY_SIZE(da9061_onkey_resources),
- .resources = da9061_onkey_resources,
- .of_compatible = "dlg,da9061-onkey",
- },
+ MFD_CELL_OF("da9061-core", da9061_core_resources, NULL, 0, 0,
+ NULL),
+ MFD_CELL_OF("da9062-regulators", da9061_regulators_resources, NULL, 0, 0,
+ NULL),
+ MFD_CELL_OF("da9061-watchdog", da9061_wdt_resources, NULL, 0, 0,
+ "dlg,da9061-watchdog"),
+ MFD_CELL_OF("da9061-thermal", da9061_thermal_resources, NULL, 0, 0,
+ "dlg,da9061-thermal"),
+ MFD_CELL_OF("da9061-onkey", da9061_onkey_resources, NULL, 0, 0,
+ "dlg,da9061-onkey"),
};
static const struct resource da9062_core_resources[] = {
@@ -246,46 +228,20 @@ static const struct resource da9062_gpio_resources[] = {
};
static const struct mfd_cell da9062_devs[] = {
- {
- .name = "da9062-core",
- .num_resources = ARRAY_SIZE(da9062_core_resources),
- .resources = da9062_core_resources,
- },
- {
- .name = "da9062-regulators",
- .num_resources = ARRAY_SIZE(da9062_regulators_resources),
- .resources = da9062_regulators_resources,
- },
- {
- .name = "da9062-watchdog",
- .num_resources = ARRAY_SIZE(da9062_wdt_resources),
- .resources = da9062_wdt_resources,
- .of_compatible = "dlg,da9062-watchdog",
- },
- {
- .name = "da9062-thermal",
- .num_resources = ARRAY_SIZE(da9062_thermal_resources),
- .resources = da9062_thermal_resources,
- .of_compatible = "dlg,da9062-thermal",
- },
- {
- .name = "da9062-rtc",
- .num_resources = ARRAY_SIZE(da9062_rtc_resources),
- .resources = da9062_rtc_resources,
- .of_compatible = "dlg,da9062-rtc",
- },
- {
- .name = "da9062-onkey",
- .num_resources = ARRAY_SIZE(da9062_onkey_resources),
- .resources = da9062_onkey_resources,
- .of_compatible = "dlg,da9062-onkey",
- },
- {
- .name = "da9062-gpio",
- .num_resources = ARRAY_SIZE(da9062_gpio_resources),
- .resources = da9062_gpio_resources,
- .of_compatible = "dlg,da9062-gpio",
- },
+ MFD_CELL_OF("da9062-core", da9062_core_resources, NULL, 0, 0,
+ NULL),
+ MFD_CELL_OF("da9062-regulators", da9062_regulators_resources, NULL, 0, 0,
+ NULL),
+ MFD_CELL_OF("da9062-watchdog", da9062_wdt_resources, NULL, 0, 0,
+ "dlg,da9062-watchdog"),
+ MFD_CELL_OF("da9062-thermal", da9062_thermal_resources, NULL, 0, 0,
+ "dlg,da9062-thermal"),
+ MFD_CELL_OF("da9062-rtc", da9062_rtc_resources, NULL, 0, 0,
+ "dlg,da9062-rtc"),
+ MFD_CELL_OF("da9062-onkey", da9062_onkey_resources, NULL, 0, 0,
+ "dlg,da9062-onkey"),
+ MFD_CELL_OF("da9062-gpio", da9062_gpio_resources, NULL, 0, 0,
+ "dlg,da9062-gpio"),
};
static int da9062_clear_fault_log(struct da9062 *chip)
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V4 2/3] mfd: da9062: Remove IRQ requirement
2023-03-09 9:22 [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro Christoph Niedermaier
@ 2023-03-09 9:22 ` Christoph Niedermaier
2023-03-16 14:00 ` Lee Jones
2023-03-09 9:22 ` [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional Christoph Niedermaier
2023-03-16 13:59 ` [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro Lee Jones
2 siblings, 1 reply; 10+ messages in thread
From: Christoph Niedermaier @ 2023-03-09 9:22 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Christoph Niedermaier, Support Opensource, Lee Jones,
Adam Thomson, Liam Girdwood, Mark Brown, Marek Vasut, kernel,
linux-kernel
This patch removes the requirement for an IRQ, because for the core
functionality IRQ isn't needed. So this makes the DA9061/62 chip
usable for designs which haven't connected the IRQ pin.
Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Acked-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
---
Cc: Support Opensource <support.opensource@diasemi.com>
Cc: Lee Jones <lee@kernel.org>
Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Marek Vasut <marex@denx.de>
Cc: kernel@dh-electronics.com
Cc: linux-kernel@vger.kernel.org
To: linux-arm-kernel@lists.infradead.org
---
V2: - Rebase on current next 20230209
- Add Lee Jones to Cc list
V3: - Rebase on current next 20230307
- Use macro MFD_CELL_OF
- Refactoring the code for use without IRQ
V4: - Rebase on current next 20230309
- Add Acked-by tag
---
drivers/mfd/da9062-core.c | 84 +++++++++++++++++++++++++++++++----------------
1 file changed, 55 insertions(+), 29 deletions(-)
diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
index 9418c58c2b06..d073d5f106ec 100644
--- a/drivers/mfd/da9062-core.c
+++ b/drivers/mfd/da9062-core.c
@@ -181,7 +181,7 @@ static const struct resource da9061_onkey_resources[] = {
DEFINE_RES_IRQ_NAMED(DA9061_IRQ_ONKEY, "ONKEY"),
};
-static const struct mfd_cell da9061_devs[] = {
+static const struct mfd_cell da9061_devs_irq[] = {
MFD_CELL_OF("da9061-core", da9061_core_resources, NULL, 0, 0,
NULL),
MFD_CELL_OF("da9062-regulators", da9061_regulators_resources, NULL, 0, 0,
@@ -194,6 +194,14 @@ static const struct mfd_cell da9061_devs[] = {
"dlg,da9061-onkey"),
};
+static const struct mfd_cell da9061_devs_noirq[] = {
+ MFD_CELL_OF("da9061-core", NULL, NULL, 0, 0, NULL),
+ MFD_CELL_OF("da9062-regulators", NULL, NULL, 0, 0, NULL),
+ MFD_CELL_OF("da9061-watchdog", NULL, NULL, 0, 0, "dlg,da9061-watchdog"),
+ MFD_CELL_OF("da9061-thermal", NULL, NULL, 0, 0, "dlg,da9061-thermal"),
+ MFD_CELL_OF("da9061-onkey", NULL, NULL, 0, 0, "dlg,da9061-onkey"),
+};
+
static const struct resource da9062_core_resources[] = {
DEFINE_RES_NAMED(DA9062_IRQ_VDD_WARN, 1, "VDD_WARN", IORESOURCE_IRQ),
};
@@ -227,7 +235,7 @@ static const struct resource da9062_gpio_resources[] = {
DEFINE_RES_NAMED(DA9062_IRQ_GPI4, 1, "GPI4", IORESOURCE_IRQ),
};
-static const struct mfd_cell da9062_devs[] = {
+static const struct mfd_cell da9062_devs_irq[] = {
MFD_CELL_OF("da9062-core", da9062_core_resources, NULL, 0, 0,
NULL),
MFD_CELL_OF("da9062-regulators", da9062_regulators_resources, NULL, 0, 0,
@@ -244,6 +252,16 @@ static const struct mfd_cell da9062_devs[] = {
"dlg,da9062-gpio"),
};
+static const struct mfd_cell da9062_devs_noirq[] = {
+ MFD_CELL_OF("da9062-core", NULL, NULL, 0, 0, NULL),
+ MFD_CELL_OF("da9062-regulators", NULL, NULL, 0, 0, NULL),
+ MFD_CELL_OF("da9062-watchdog", NULL, NULL, 0, 0, "dlg,da9062-watchdog"),
+ MFD_CELL_OF("da9062-thermal", NULL, NULL, 0, 0, "dlg,da9062-thermal"),
+ MFD_CELL_OF("da9062-rtc", NULL, NULL, 0, 0, "dlg,da9062-rtc"),
+ MFD_CELL_OF("da9062-onkey", NULL, NULL, 0, 0, "dlg,da9062-onkey"),
+ MFD_CELL_OF("da9062-gpio", NULL, NULL, 0, 0, "dlg,da9062-gpio"),
+};
+
static int da9062_clear_fault_log(struct da9062 *chip)
{
int ret;
@@ -581,7 +599,7 @@ static int da9062_i2c_probe(struct i2c_client *i2c)
{
const struct i2c_device_id *id = i2c_client_get_device_id(i2c);
struct da9062 *chip;
- unsigned int irq_base;
+ unsigned int irq_base = 0;
const struct mfd_cell *cell;
const struct regmap_irq_chip *irq_chip;
const struct regmap_config *config;
@@ -601,22 +619,16 @@ static int da9062_i2c_probe(struct i2c_client *i2c)
i2c_set_clientdata(i2c, chip);
chip->dev = &i2c->dev;
- if (!i2c->irq) {
- dev_err(chip->dev, "No IRQ configured\n");
- return -EINVAL;
- }
-
+ /* Start with a base configuration without IRQ */
switch (chip->chip_type) {
case COMPAT_TYPE_DA9061:
- cell = da9061_devs;
- cell_num = ARRAY_SIZE(da9061_devs);
- irq_chip = &da9061_irq_chip;
+ cell = da9061_devs_noirq;
+ cell_num = ARRAY_SIZE(da9061_devs_noirq);
config = &da9061_regmap_config;
break;
case COMPAT_TYPE_DA9062:
- cell = da9062_devs;
- cell_num = ARRAY_SIZE(da9062_devs);
- irq_chip = &da9062_irq_chip;
+ cell = da9062_devs_noirq;
+ cell_num = ARRAY_SIZE(da9062_devs_noirq);
config = &da9062_regmap_config;
break;
default:
@@ -651,29 +663,43 @@ static int da9062_i2c_probe(struct i2c_client *i2c)
if (ret)
return ret;
- ret = da9062_configure_irq_type(chip, i2c->irq, &trigger_type);
- if (ret < 0) {
- dev_err(chip->dev, "Failed to configure IRQ type\n");
- return ret;
- }
+ /* If IRQ is available, reconfigure it accordingly */
+ if (i2c->irq) {
+ if (chip->chip_type == COMPAT_TYPE_DA9061) {
+ cell = da9061_devs_irq;
+ cell_num = ARRAY_SIZE(da9061_devs_irq);
+ irq_chip = &da9061_irq_chip;
+ } else {
+ cell = da9062_devs_irq;
+ cell_num = ARRAY_SIZE(da9062_devs_irq);
+ irq_chip = &da9062_irq_chip;
+ }
- ret = regmap_add_irq_chip(chip->regmap, i2c->irq,
- trigger_type | IRQF_SHARED | IRQF_ONESHOT,
- -1, irq_chip, &chip->regmap_irq);
- if (ret) {
- dev_err(chip->dev, "Failed to request IRQ %d: %d\n",
- i2c->irq, ret);
- return ret;
- }
+ ret = da9062_configure_irq_type(chip, i2c->irq, &trigger_type);
+ if (ret < 0) {
+ dev_err(chip->dev, "Failed to configure IRQ type\n");
+ return ret;
+ }
- irq_base = regmap_irq_chip_get_base(chip->regmap_irq);
+ ret = regmap_add_irq_chip(chip->regmap, i2c->irq,
+ trigger_type | IRQF_SHARED | IRQF_ONESHOT,
+ -1, irq_chip, &chip->regmap_irq);
+ if (ret) {
+ dev_err(chip->dev, "Failed to request IRQ %d: %d\n",
+ i2c->irq, ret);
+ return ret;
+ }
+
+ irq_base = regmap_irq_chip_get_base(chip->regmap_irq);
+ }
ret = mfd_add_devices(chip->dev, PLATFORM_DEVID_NONE, cell,
cell_num, NULL, irq_base,
NULL);
if (ret) {
dev_err(chip->dev, "Cannot register child devices\n");
- regmap_del_irq_chip(i2c->irq, chip->regmap_irq);
+ if (i2c->irq)
+ regmap_del_irq_chip(i2c->irq, chip->regmap_irq);
return ret;
}
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional
2023-03-09 9:22 [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro Christoph Niedermaier
2023-03-09 9:22 ` [PATCH V4 2/3] mfd: da9062: Remove IRQ requirement Christoph Niedermaier
@ 2023-03-09 9:22 ` Christoph Niedermaier
2023-04-18 20:00 ` Christoph Niedermaier
2023-03-16 13:59 ` [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro Lee Jones
2 siblings, 1 reply; 10+ messages in thread
From: Christoph Niedermaier @ 2023-03-09 9:22 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Christoph Niedermaier, Support Opensource, Adam Thomson,
Liam Girdwood, Mark Brown, Marek Vasut, kernel, linux-kernel
This patch makes the use of IRQ optional to make the DA9061/62 usable
for designs that don't have the IRQ pin connected, because the regulator
is usable without IRQ.
Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202303082246.GuLdPL0t-lkp@intel.com/
---
Cc: Support Opensource <support.opensource@diasemi.com>
Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Marek Vasut <marex@denx.de>
Cc: kernel@dh-electronics.com
Cc: linux-kernel@vger.kernel.org
To: linux-arm-kernel@lists.infradead.org
---
V2: - Rebase on current next 20230209
- Add Reviewed-by and Acked-by tags
V3: - Rebase on current next 20230307
v4: - Rebase on current next 20230309
- Fix a missing variable change reported by kernel test robot
---
drivers/regulator/da9062-regulator.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c
index 1a6324001027..ae7955afce86 100644
--- a/drivers/regulator/da9062-regulator.c
+++ b/drivers/regulator/da9062-regulator.c
@@ -924,7 +924,7 @@ static int da9062_regulator_probe(struct platform_device *pdev)
struct da9062_regulator *regl;
struct regulator_config config = { };
const struct da9062_regulator_info *rinfo;
- int irq, n, ret;
+ int n, ret;
int max_regulators;
switch (chip->chip_type) {
@@ -1012,12 +1012,11 @@ static int da9062_regulator_probe(struct platform_device *pdev)
}
/* LDOs overcurrent event support */
- irq = platform_get_irq_byname(pdev, "LDO_LIM");
- if (irq < 0)
- return irq;
- regulators->irq_ldo_lim = irq;
+ regulators->irq_ldo_lim = platform_get_irq_byname_optional(pdev, "LDO_LIM");
+ if (regulators->irq_ldo_lim < 0)
+ return 0;
- ret = devm_request_threaded_irq(&pdev->dev, irq,
+ ret = devm_request_threaded_irq(&pdev->dev, regulators->irq_ldo_lim,
NULL, da9062_ldo_lim_event,
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
"LDO_LIM", regulators);
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro
2023-03-09 9:22 [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro Christoph Niedermaier
2023-03-09 9:22 ` [PATCH V4 2/3] mfd: da9062: Remove IRQ requirement Christoph Niedermaier
2023-03-09 9:22 ` [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional Christoph Niedermaier
@ 2023-03-16 13:59 ` Lee Jones
2 siblings, 0 replies; 10+ messages in thread
From: Lee Jones @ 2023-03-16 13:59 UTC (permalink / raw)
To: Christoph Niedermaier
Cc: linux-arm-kernel, Support Opensource, Adam Thomson, Liam Girdwood,
Mark Brown, Marek Vasut, kernel, linux-kernel
On Thu, 09 Mar 2023, Christoph Niedermaier wrote:
> Use MFD_CELL_OF macro helper instead of plain struct properties, which makes
> the code a bit shorter and to have commonly defined MFD cell attributes.
>
> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> Acked-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
> ---
> Cc: Support Opensource <support.opensource@diasemi.com>
> Cc: Lee Jones <lee@kernel.org>
> Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Marek Vasut <marex@denx.de>
> Cc: kernel@dh-electronics.com
> Cc: linux-kernel@vger.kernel.org
> To: linux-arm-kernel@lists.infradead.org
> ---
> V3: - Add this patch to the series
> V4: - Rebase on current next 20230309
> - Add Acked-by tag
> ---
> drivers/mfd/da9062-core.c | 92 +++++++++++++----------------------------------
> 1 file changed, 24 insertions(+), 68 deletions(-)
Applied, thanks
--
Lee Jones [李琼斯]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH V4 2/3] mfd: da9062: Remove IRQ requirement
2023-03-09 9:22 ` [PATCH V4 2/3] mfd: da9062: Remove IRQ requirement Christoph Niedermaier
@ 2023-03-16 14:00 ` Lee Jones
0 siblings, 0 replies; 10+ messages in thread
From: Lee Jones @ 2023-03-16 14:00 UTC (permalink / raw)
To: Christoph Niedermaier
Cc: linux-arm-kernel, Support Opensource, Adam Thomson, Liam Girdwood,
Mark Brown, Marek Vasut, kernel, linux-kernel
On Thu, 09 Mar 2023, Christoph Niedermaier wrote:
> This patch removes the requirement for an IRQ, because for the core
> functionality IRQ isn't needed. So this makes the DA9061/62 chip
> usable for designs which haven't connected the IRQ pin.
>
> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> Acked-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
> ---
> Cc: Support Opensource <support.opensource@diasemi.com>
> Cc: Lee Jones <lee@kernel.org>
> Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Marek Vasut <marex@denx.de>
> Cc: kernel@dh-electronics.com
> Cc: linux-kernel@vger.kernel.org
> To: linux-arm-kernel@lists.infradead.org
> ---
> V2: - Rebase on current next 20230209
> - Add Lee Jones to Cc list
> V3: - Rebase on current next 20230307
> - Use macro MFD_CELL_OF
> - Refactoring the code for use without IRQ
> V4: - Rebase on current next 20230309
> - Add Acked-by tag
> ---
> drivers/mfd/da9062-core.c | 84 +++++++++++++++++++++++++++++++----------------
> 1 file changed, 55 insertions(+), 29 deletions(-)
Applied, thanks
--
Lee Jones [李琼斯]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional
2023-03-09 9:22 ` [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional Christoph Niedermaier
@ 2023-04-18 20:00 ` Christoph Niedermaier
2023-04-27 10:50 ` DLG Adam Ward
0 siblings, 1 reply; 10+ messages in thread
From: Christoph Niedermaier @ 2023-04-18 20:00 UTC (permalink / raw)
To: linux-arm-kernel@lists.infradead.org
Cc: Support Opensource, Adam Thomson, Liam Girdwood, Mark Brown,
Marek Vasut, kernel, linux-kernel@vger.kernel.org,
Christoph Niedermaier
From: Christoph Niedermaier [mailto:cniedermaier@dh-electronics.com]
Sent: Thursday, March 9, 2023 10:23 AM
> This patch makes the use of IRQ optional to make the DA9061/62 usable
> for designs that don't have the IRQ pin connected, because the regulator
> is usable without IRQ.
>
> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> Acked-by: Mark Brown <broonie@kernel.org>
> Reviewed-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202303082246.GuLdPL0t-lkp@intel.com/
> ---
> Cc: Support Opensource <support.opensource@diasemi.com>
> Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Marek Vasut <marex@denx.de>
> Cc: kernel@dh-electronics.com
> Cc: linux-kernel@vger.kernel.org
> To: linux-arm-kernel@lists.infradead.org
> ---
> V2: - Rebase on current next 20230209
> - Add Reviewed-by and Acked-by tags
> V3: - Rebase on current next 20230307
> v4: - Rebase on current next 20230309
> - Fix a missing variable change reported by kernel test robot
> ---
> drivers/regulator/da9062-regulator.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c
> index 1a6324001027..ae7955afce86 100644
> --- a/drivers/regulator/da9062-regulator.c
> +++ b/drivers/regulator/da9062-regulator.c
> @@ -924,7 +924,7 @@ static int da9062_regulator_probe(struct platform_device *pdev)
> struct da9062_regulator *regl;
> struct regulator_config config = { };
> const struct da9062_regulator_info *rinfo;
> - int irq, n, ret;
> + int n, ret;
> int max_regulators;
>
> switch (chip->chip_type) {
> @@ -1012,12 +1012,11 @@ static int da9062_regulator_probe(struct platform_device *pdev)
> }
>
> /* LDOs overcurrent event support */
> - irq = platform_get_irq_byname(pdev, "LDO_LIM");
> - if (irq < 0)
> - return irq;
> - regulators->irq_ldo_lim = irq;
> + regulators->irq_ldo_lim = platform_get_irq_byname_optional(pdev, "LDO_LIM");
> + if (regulators->irq_ldo_lim < 0)
> + return 0;
>
> - ret = devm_request_threaded_irq(&pdev->dev, irq,
> + ret = devm_request_threaded_irq(&pdev->dev, regulators->irq_ldo_lim,
> NULL, da9062_ldo_lim_event,
> IRQF_TRIGGER_LOW | IRQF_ONESHOT,
> "LDO_LIM", regulators);
Hi,
In V3 of this patch the kernel test robot found an issue. A fix is
important, because otherwise the normal path with IRQ could have
problems. So I fixed it in V4. Any comments or is it OK how I fixed it?
Regards
Christoph
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional
2023-04-18 20:00 ` Christoph Niedermaier
@ 2023-04-27 10:50 ` DLG Adam Ward
2023-05-07 23:40 ` Marek Vasut
0 siblings, 1 reply; 10+ messages in thread
From: DLG Adam Ward @ 2023-04-27 10:50 UTC (permalink / raw)
To: Christoph Niedermaier, linux-arm-kernel@lists.infradead.org
Cc: Support Opensource, Liam Girdwood, Mark Brown, Marek Vasut,
kernel, linux-kernel@vger.kernel.org
On 18 April 2023 21:00, Christoph Niedermaier wrote:
>In V3 of this patch the kernel test robot found an issue. A fix is important, because otherwise the normal path with IRQ could have problems. So I fixed it in V4. Any comments or is it OK how I fixed it?
Hi Christoph,
It looks fine now; sorry I didn't notice before.
Regards,
Adam
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional
2023-04-27 10:50 ` DLG Adam Ward
@ 2023-05-07 23:40 ` Marek Vasut
[not found] ` <OS3PR01MB8460C4A6047EE4590D4F791FC2769@OS3PR01MB8460.jpnprd01.prod.outlook.com>
0 siblings, 1 reply; 10+ messages in thread
From: Marek Vasut @ 2023-05-07 23:40 UTC (permalink / raw)
To: DLG Adam Ward, Christoph Niedermaier,
linux-arm-kernel@lists.infradead.org
Cc: Support Opensource, Liam Girdwood, Mark Brown, kernel,
linux-kernel@vger.kernel.org
On 4/27/23 12:50, DLG Adam Ward wrote:
> On 18 April 2023 21:00, Christoph Niedermaier wrote:
>> In V3 of this patch the kernel test robot found an issue. A fix is important, because otherwise the normal path with IRQ could have problems. So I fixed it in V4. Any comments or is it OK how I fixed it?
>
> Hi Christoph,
>
> It looks fine now; sorry I didn't notice before.
I think a formal Reviewed-by / Acked-by would be nice.
But maybe Mark can pick this 3/3 patch now either way ?
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional
[not found] ` <e7e4f933-5098-5fea-7a1d-254609c93cbd@denx.de>
@ 2023-07-12 13:19 ` Christoph Niedermaier
2023-07-13 9:18 ` Christoph Niedermaier
0 siblings, 1 reply; 10+ messages in thread
From: Christoph Niedermaier @ 2023-07-12 13:19 UTC (permalink / raw)
To: Marek Vasut, DLG Adam Ward, linux-arm-kernel@lists.infradead.org
Cc: Support Opensource, Liam Girdwood, Mark Brown, kernel,
linux-kernel@vger.kernel.org
> From: Marek Vasut [mailto:marex@denx.de]
> Sent: Tuesday, May 9, 2023 11:21 AM
> To: DLG Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>; Christoph Niedermaier
> <cniedermaier@dh-electronics.com>; linux-arm-kernel@lists.infradead.org
> Cc: Support Opensource <support.opensource@diasemi.com>; Liam Girdwood
> <lgirdwood@gmail.com>; Mark Brown <broonie@kernel.org>; kernel <kernel@dh-
> electronics.com>; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional
>
> ACHTUNG: Diese E-Mail wurde von Extern an Dich gesendet. Bitte klicke deshalb nicht auf
> Links in der E-Mail! Falls das Öffnen erforderlich ist, bitte Links zuvor auf
> Authentizität überprüfen – im Zweifelsfall bitte zuerst bei der IT nachfragen!
>
> On 5/9/23 10:59, DLG Adam Ward wrote:
> > On 08 May 2023 00:41, Marek Vasut wrote:
> >
> >>> It looks fine now; sorry I didn't notice before.
> >>
> >> I think a formal Reviewed-by / Acked-by would be nice.
> >
> > It's already there in the patch - obliquely referred to by "before", the apology because
> I'd missed that which the robot picked up on after I'd looked at it.
>
> Ahh, in that case, sorry for the noise and thanks for the RB .
>
> And for all its worth, patch is also:
>
> Reviewed-by: Marek Vasut <marex@denx.de>
I was wondering how to continue with this patch. Is there anything against
picking this patch or did I miss it?
Thanks and regards
Christoph
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional
2023-07-12 13:19 ` Christoph Niedermaier
@ 2023-07-13 9:18 ` Christoph Niedermaier
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Niedermaier @ 2023-07-13 9:18 UTC (permalink / raw)
To: Marek Vasut, DLG Adam Ward, linux-arm-kernel@lists.infradead.org
Cc: Support Opensource, Liam Girdwood, Mark Brown, kernel,
linux-kernel@vger.kernel.org
From: Christoph Niedermaier
Sent: Wednesday, July 12, 2023 3:20 PM
>> On 5/9/23 10:59, DLG Adam Ward wrote:
>>> On 08 May 2023 00:41, Marek Vasut wrote:
>>>
>>>>> It looks fine now; sorry I didn't notice before.
>>>>
>>>> I think a formal Reviewed-by / Acked-by would be nice.
>>>
>>> It's already there in the patch - obliquely referred to by "before", the apology because
>> I'd missed that which the robot picked up on after I'd looked at it.
>>
>> Ahh, in that case, sorry for the noise and thanks for the RB .
>>
>> And for all its worth, patch is also:
>>
>> Reviewed-by: Marek Vasut <marex@denx.de>
>
> I was wondering how to continue with this patch. Is there anything against
> picking this patch or did I miss it?
To make it easier I will rebase this leftover
patch on the current next and send it as V5.
Regards
Christoph
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-07-13 9:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-09 9:22 [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro Christoph Niedermaier
2023-03-09 9:22 ` [PATCH V4 2/3] mfd: da9062: Remove IRQ requirement Christoph Niedermaier
2023-03-16 14:00 ` Lee Jones
2023-03-09 9:22 ` [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional Christoph Niedermaier
2023-04-18 20:00 ` Christoph Niedermaier
2023-04-27 10:50 ` DLG Adam Ward
2023-05-07 23:40 ` Marek Vasut
[not found] ` <OS3PR01MB8460C4A6047EE4590D4F791FC2769@OS3PR01MB8460.jpnprd01.prod.outlook.com>
[not found] ` <e7e4f933-5098-5fea-7a1d-254609c93cbd@denx.de>
2023-07-12 13:19 ` Christoph Niedermaier
2023-07-13 9:18 ` Christoph Niedermaier
2023-03-16 13:59 ` [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).