2020-10-29 07:41:37

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 01/42] mfd: arizona: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Charles Keepax <[email protected]>
---
drivers/mfd/arizona-core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 000cb82023e3..bf48372db605 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -1043,8 +1043,9 @@ int arizona_dev_init(struct arizona *arizona)
case CS47L24:
break; /* No LDO1 regulator */
default:
- ret = mfd_add_devices(arizona->dev, -1, early_devs,
- ARRAY_SIZE(early_devs), NULL, 0, NULL);
+ ret = mfd_add_devices(arizona->dev, PLATFORM_DEVID_NONE,
+ early_devs, ARRAY_SIZE(early_devs),
+ NULL, 0, NULL);
if (ret != 0) {
dev_err(dev, "Failed to add early children: %d\n", ret);
return ret;
--
2.25.1


2020-10-29 07:42:08

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 37/42] mfd: tps80031: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/tps80031.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c
index 907452b86e32..c8ea8fbae281 100644
--- a/drivers/mfd/tps80031.c
+++ b/drivers/mfd/tps80031.c
@@ -488,7 +488,7 @@ static int tps80031_probe(struct i2c_client *client,

tps80031_init_ext_control(tps80031, pdata);

- ret = mfd_add_devices(tps80031->dev, -1,
+ ret = mfd_add_devices(tps80031->dev, PLATFORM_DEVID_NONE,
tps80031_cell, ARRAY_SIZE(tps80031_cell),
NULL, 0,
regmap_irq_get_domain(tps80031->irq_data));
--
2.25.1

2020-10-29 07:42:40

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 41/42] mfd: wm8400: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Charles Keepax <[email protected]>
---
drivers/mfd/wm8400-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c
index 0fe32a05421b..9efca6f3fbb2 100644
--- a/drivers/mfd/wm8400-core.c
+++ b/drivers/mfd/wm8400-core.c
@@ -38,7 +38,8 @@ static int wm8400_register_codec(struct wm8400 *wm8400)
.pdata_size = sizeof(*wm8400),
};

- return devm_mfd_add_devices(wm8400->dev, -1, &cell, 1, NULL, 0, NULL);
+ return devm_mfd_add_devices(wm8400->dev, PLATFORM_DEVID_NONE, &cell, 1,
+ NULL, 0, NULL);
}

/*
--
2.25.1

2020-10-29 07:42:43

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 42/42] mfd: wm8994: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Charles Keepax <[email protected]>
---
drivers/mfd/wm8994-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index 3b2b93c5bbcb..5a8d4cc00cc1 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -578,7 +578,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)

wm8994_irq_init(wm8994);

- ret = mfd_add_devices(wm8994->dev, -1,
+ ret = mfd_add_devices(wm8994->dev, PLATFORM_DEVID_NONE,
wm8994_devs, ARRAY_SIZE(wm8994_devs),
NULL, 0, NULL);
if (ret != 0) {
--
2.25.1

2020-10-29 07:42:46

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 25/42] mfd: retu: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/retu-mfd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/retu-mfd.c b/drivers/mfd/retu-mfd.c
index e7d27b7861c1..55e24e8343f3 100644
--- a/drivers/mfd/retu-mfd.c
+++ b/drivers/mfd/retu-mfd.c
@@ -271,9 +271,9 @@ static int retu_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
if (ret < 0)
return ret;

- ret = mfd_add_devices(rdev->dev, -1, rdat->children, rdat->nchildren,
- NULL, regmap_irq_chip_get_base(rdev->irq_data),
- NULL);
+ ret = mfd_add_devices(rdev->dev, PLATFORM_DEVID_NONE, rdat->children,
+ rdat->nchildren, NULL,
+ regmap_irq_chip_get_base(rdev->irq_data), NULL);
if (ret < 0) {
regmap_del_irq_chip(i2c->irq, rdev->irq_data);
return ret;
--
2.25.1

2020-10-29 07:42:48

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 27/42] mfd: sec: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/sec-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 95473ff9bb4b..7bfab43b455e 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -457,8 +457,8 @@ static int sec_pmic_probe(struct i2c_client *i2c,
sec_pmic->device_type);
return -ENODEV;
}
- ret = devm_mfd_add_devices(sec_pmic->dev, -1, sec_devs, num_sec_devs,
- NULL, 0, NULL);
+ ret = devm_mfd_add_devices(sec_pmic->dev, PLATFORM_DEVID_NONE,
+ sec_devs, num_sec_devs, NULL, 0, NULL);
if (ret)
return ret;

--
2.25.1

2020-10-29 07:44:42

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 39/42] mfd: vx855: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/vx855.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/vx855.c b/drivers/mfd/vx855.c
index 985f81c1739c..a53fb4c1ebdb 100644
--- a/drivers/mfd/vx855.c
+++ b/drivers/mfd/vx855.c
@@ -86,8 +86,8 @@ static int vx855_probe(struct pci_dev *pdev,
vx855_gpio_resources[1].start = gpio_io_offset + VX855_PMIO_R_GPO;
vx855_gpio_resources[1].end = vx855_gpio_resources[1].start + 3;

- ret = mfd_add_devices(&pdev->dev, -1, vx855_cells, ARRAY_SIZE(vx855_cells),
- NULL, 0, NULL);
+ ret = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, vx855_cells,
+ ARRAY_SIZE(vx855_cells), NULL, 0, NULL);

/* we always return -ENODEV here in order to enable other
* drivers like old, not-yet-platform_device ported i2c-viapro */
--
2.25.1

2020-10-29 08:27:10

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 36/42] mfd: tps65910: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/tps65910.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index 11959021b50a..d332072ee9de 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -502,7 +502,7 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
pm_power_off = tps65910_power_off;
}

- ret = devm_mfd_add_devices(tps65910->dev, -1,
+ ret = devm_mfd_add_devices(tps65910->dev, PLATFORM_DEVID_NONE,
tps65910s, ARRAY_SIZE(tps65910s),
NULL, 0,
regmap_irq_get_domain(tps65910->irq_data));
--
2.25.1

2020-10-29 08:27:38

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 34/42] mfd: tps65217: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/tps65217.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 2d9c282ec917..ef941bd611d2 100644
--- a/drivers/mfd/tps65217.c
+++ b/drivers/mfd/tps65217.c
@@ -351,7 +351,7 @@ static int tps65217_probe(struct i2c_client *client)
tps65217s[i].num_resources = 0;
}

- ret = devm_mfd_add_devices(tps->dev, -1, tps65217s,
+ ret = devm_mfd_add_devices(tps->dev, PLATFORM_DEVID_NONE, tps65217s,
ARRAY_SIZE(tps65217s), NULL, 0,
tps->irq_domain);
if (ret < 0) {
--
2.25.1

2020-10-29 08:28:05

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 33/42] mfd: tps65090: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/tps65090.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
index 6cdf6c315034..f8f7170f5822 100644
--- a/drivers/mfd/tps65090.c
+++ b/drivers/mfd/tps65090.c
@@ -209,7 +209,7 @@ static int tps65090_i2c_probe(struct i2c_client *client,
tps65090s[CHARGER].num_resources = 0;
}

- ret = mfd_add_devices(tps65090->dev, -1, tps65090s,
+ ret = mfd_add_devices(tps65090->dev, PLATFORM_DEVID_NONE, tps65090s,
ARRAY_SIZE(tps65090s), NULL,
0, regmap_irq_get_domain(tps65090->irq_data));
if (ret) {
--
2.25.1

2020-10-29 08:28:35

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 35/42] mfd: tps6586x: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/tps6586x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index c36597797ddd..18158fd8aa7d 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -550,7 +550,7 @@ static int tps6586x_i2c_probe(struct i2c_client *client,
}
}

- ret = mfd_add_devices(tps6586x->dev, -1,
+ ret = mfd_add_devices(tps6586x->dev, PLATFORM_DEVID_NONE,
tps6586x_cell, ARRAY_SIZE(tps6586x_cell),
NULL, 0, tps6586x->irq_domain);
if (ret < 0) {
--
2.25.1

2020-10-29 08:28:43

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 16/42] mfd: max77686: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Chanwoo Choi <[email protected]>
---
drivers/mfd/max77686.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c
index 71faf503844b..1f26d00fdd37 100644
--- a/drivers/mfd/max77686.c
+++ b/drivers/mfd/max77686.c
@@ -217,8 +217,8 @@ static int max77686_i2c_probe(struct i2c_client *i2c)
return ret;
}

- ret = devm_mfd_add_devices(max77686->dev, -1, cells, n_devs, NULL,
- 0, NULL);
+ ret = devm_mfd_add_devices(max77686->dev, PLATFORM_DEVID_NONE, cells,
+ n_devs, NULL, 0, NULL);
if (ret < 0) {
dev_err(&i2c->dev, "failed to add MFD devices: %d\n", ret);
return ret;
--
2.25.1

2020-10-29 08:29:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 14/42] mfd: lp3943: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/lp3943.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/lp3943.c b/drivers/mfd/lp3943.c
index 13cb89be3d66..3e5d7336f59b 100644
--- a/drivers/mfd/lp3943.c
+++ b/drivers/mfd/lp3943.c
@@ -120,9 +120,8 @@ static int lp3943_probe(struct i2c_client *cl, const struct i2c_device_id *id)
lp3943->mux_cfg = lp3943_mux_cfg;
i2c_set_clientdata(cl, lp3943);

- return devm_mfd_add_devices(dev, -1, lp3943_devs,
- ARRAY_SIZE(lp3943_devs),
- NULL, 0, NULL);
+ return devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, lp3943_devs,
+ ARRAY_SIZE(lp3943_devs), NULL, 0, NULL);
}

static const struct i2c_device_id lp3943_ids[] = {
--
2.25.1

2020-10-29 08:29:54

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 03/42] mfd: as3722: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/as3722.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/as3722.c b/drivers/mfd/as3722.c
index 59dfeff71592..b2151f56f3d2 100644
--- a/drivers/mfd/as3722.c
+++ b/drivers/mfd/as3722.c
@@ -397,7 +397,7 @@ static int as3722_i2c_probe(struct i2c_client *i2c,
return ret;
}

- ret = devm_mfd_add_devices(&i2c->dev, -1, as3722_devs,
+ ret = devm_mfd_add_devices(&i2c->dev, PLATFORM_DEVID_NONE, as3722_devs,
ARRAY_SIZE(as3722_devs), NULL, 0,
regmap_irq_get_domain(as3722->irq_data));
if (ret) {
--
2.25.1

2020-10-29 08:30:08

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RESEND PATCH 32/42] mfd: tps6507x: use PLATFORM_DEVID_NONE

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
- it brings some meaning,
- it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/mfd/tps6507x.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/tps6507x.c b/drivers/mfd/tps6507x.c
index 1f308c4e3694..15bb92ef64c7 100644
--- a/drivers/mfd/tps6507x.c
+++ b/drivers/mfd/tps6507x.c
@@ -100,8 +100,9 @@ static int tps6507x_i2c_probe(struct i2c_client *i2c,
tps6507x->read_dev = tps6507x_i2c_read_device;
tps6507x->write_dev = tps6507x_i2c_write_device;

- return devm_mfd_add_devices(tps6507x->dev, -1, tps6507x_devs,
- ARRAY_SIZE(tps6507x_devs), NULL, 0, NULL);
+ return devm_mfd_add_devices(tps6507x->dev, PLATFORM_DEVID_NONE,
+ tps6507x_devs, ARRAY_SIZE(tps6507x_devs),
+ NULL, 0, NULL);
}

static const struct i2c_device_id tps6507x_i2c_id[] = {
--
2.25.1

2021-03-16 16:06:04

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [RESEND PATCH 01/42] mfd: arizona: use PLATFORM_DEVID_NONE

On 28/10/2020 23:29, Krzysztof Kozlowski wrote:
> Use PLATFORM_DEVID_NONE define instead of "-1" value because:
> - it brings some meaning,
> - it might point attention why auto device ID was not used.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> Acked-by: Charles Keepax <[email protected]>

Hi Lee,

I sent this patchset some time ago, then made a resend. I did not get
any feedback from you so I just wonder - are you still considering this
patchset and shall I resend?

Best regards,
Krzysztof

> ---
> drivers/mfd/arizona-core.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
> index 000cb82023e3..bf48372db605 100644
> --- a/drivers/mfd/arizona-core.c
> +++ b/drivers/mfd/arizona-core.c
> @@ -1043,8 +1043,9 @@ int arizona_dev_init(struct arizona *arizona)
> case CS47L24:
> break; /* No LDO1 regulator */
> default:
> - ret = mfd_add_devices(arizona->dev, -1, early_devs,
> - ARRAY_SIZE(early_devs), NULL, 0, NULL);
> + ret = mfd_add_devices(arizona->dev, PLATFORM_DEVID_NONE,
> + early_devs, ARRAY_SIZE(early_devs),
> + NULL, 0, NULL);
> if (ret != 0) {
> dev_err(dev, "Failed to add early children: %d\n", ret);
> return ret;
>