* [PATCH v2] regulator: mp886x: Make similar OF and ID table
@ 2023-09-03 15:51 Biju Das
2023-09-11 0:31 ` Mark Brown
2023-09-11 23:58 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Biju Das @ 2023-09-03 15:51 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Biju Das, linux-kernel, Biju Das, Andy Shevchenko
Make similar OF and ID table to extend support for ID match using
i2c_match_data(). Currently it works only for OF match tables as the
driver_data is wrong for ID match.
While at it, remove trailing comma in the terminator entry for ID
table.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
Note:
This patch is only compile tested.
v1->v2:
* Removed trailing comma in the terminator entry for ID table.
---
drivers/regulator/mp886x.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/regulator/mp886x.c b/drivers/regulator/mp886x.c
index 9911be2e6bac..a62ae5444ad8 100644
--- a/drivers/regulator/mp886x.c
+++ b/drivers/regulator/mp886x.c
@@ -315,7 +315,7 @@ static int mp886x_i2c_probe(struct i2c_client *client)
if (IS_ERR(di->en_gpio))
return PTR_ERR(di->en_gpio);
- di->ci = of_device_get_match_data(dev);
+ di->ci = i2c_get_match_data(client);
di->dev = dev;
regmap = devm_regmap_init_i2c(client, &mp886x_regmap_config);
@@ -341,21 +341,15 @@ static int mp886x_i2c_probe(struct i2c_client *client)
}
static const struct of_device_id mp886x_dt_ids[] = {
- {
- .compatible = "mps,mp8867",
- .data = &mp8867_ci
- },
- {
- .compatible = "mps,mp8869",
- .data = &mp8869_ci
- },
+ { .compatible = "mps,mp8867", .data = &mp8867_ci },
+ { .compatible = "mps,mp8869", .data = &mp8869_ci },
{ }
};
MODULE_DEVICE_TABLE(of, mp886x_dt_ids);
static const struct i2c_device_id mp886x_id[] = {
- { "mp886x", },
- { },
+ { "mp886x", (kernel_ulong_t)&mp8869_ci },
+ { }
};
MODULE_DEVICE_TABLE(i2c, mp886x_id);
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] regulator: mp886x: Make similar OF and ID table
2023-09-03 15:51 [PATCH v2] regulator: mp886x: Make similar OF and ID table Biju Das
@ 2023-09-11 0:31 ` Mark Brown
2023-09-11 23:58 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-09-11 0:31 UTC (permalink / raw)
To: Biju Das; +Cc: Liam Girdwood, linux-kernel, Biju Das, Andy Shevchenko
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
On Sun, Sep 03, 2023 at 04:51:25PM +0100, Biju Das wrote:
> Make similar OF and ID table to extend support for ID match using
> i2c_match_data(). Currently it works only for OF match tables as the
> driver_data is wrong for ID match.
This doesn't apply against current code, please check and resend.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] regulator: mp886x: Make similar OF and ID table
2023-09-03 15:51 [PATCH v2] regulator: mp886x: Make similar OF and ID table Biju Das
2023-09-11 0:31 ` Mark Brown
@ 2023-09-11 23:58 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-09-11 23:58 UTC (permalink / raw)
To: Liam Girdwood, Biju Das; +Cc: linux-kernel, Biju Das, Andy Shevchenko
On Sun, 03 Sep 2023 16:51:25 +0100, Biju Das wrote:
> Make similar OF and ID table to extend support for ID match using
> i2c_match_data(). Currently it works only for OF match tables as the
> driver_data is wrong for ID match.
>
> While at it, remove trailing comma in the terminator entry for ID
> table.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: mp886x: Make similar OF and ID table
commit: 9e38482cb562f03fe8d521a001d44eba176a9201
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-12 2:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-03 15:51 [PATCH v2] regulator: mp886x: Make similar OF and ID table Biju Das
2023-09-11 0:31 ` Mark Brown
2023-09-11 23:58 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®