* [PATCH v2] regulator: sy8824x: Make similar OF and ID table
@ 2023-08-28 16:54 Biju Das
2023-09-11 23:58 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Biju Das @ 2023-08-28 16:54 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown; +Cc: Biju Das, linux-kernel, 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, drop trailing comma in the terminator entry from ID
table.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
Note:
This patch is only compile tested.
v1->v2:
* Dropped trailing comma in the terminator entries for ID table.
---
drivers/regulator/sy8824x.c | 26 +++++++-------------------
1 file changed, 7 insertions(+), 19 deletions(-)
diff --git a/drivers/regulator/sy8824x.c b/drivers/regulator/sy8824x.c
index d49c0cba09fb..c05b67e26ac8 100644
--- a/drivers/regulator/sy8824x.c
+++ b/drivers/regulator/sy8824x.c
@@ -142,7 +142,7 @@ static int sy8824_i2c_probe(struct i2c_client *client)
}
di->dev = dev;
- di->cfg = of_device_get_match_data(dev);
+ di->cfg = i2c_get_match_data(client);
regmap = devm_regmap_init_i2c(client, di->cfg->config);
if (IS_ERR(regmap)) {
@@ -204,29 +204,17 @@ static const struct sy8824_config sy20278_cfg = {
};
static const struct of_device_id sy8824_dt_ids[] = {
- {
- .compatible = "silergy,sy8824c",
- .data = &sy8824c_cfg
- },
- {
- .compatible = "silergy,sy8824e",
- .data = &sy8824e_cfg
- },
- {
- .compatible = "silergy,sy20276",
- .data = &sy20276_cfg
- },
- {
- .compatible = "silergy,sy20278",
- .data = &sy20278_cfg
- },
+ { .compatible = "silergy,sy8824c", .data = &sy8824c_cfg },
+ { .compatible = "silergy,sy8824e", .data = &sy8824e_cfg },
+ { .compatible = "silergy,sy20276", .data = &sy20276_cfg },
+ { .compatible = "silergy,sy20278", .data = &sy20278_cfg },
{ }
};
MODULE_DEVICE_TABLE(of, sy8824_dt_ids);
static const struct i2c_device_id sy8824_id[] = {
- { "sy8824", },
- { },
+ { "sy8824", (kernel_ulong_t)&sy8824c_cfg },
+ { }
};
MODULE_DEVICE_TABLE(i2c, sy8824_id);
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] regulator: sy8824x: Make similar OF and ID table
2023-08-28 16:54 [PATCH v2] regulator: sy8824x: Make similar OF and ID table Biju Das
@ 2023-09-11 23:58 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-09-11 23:58 UTC (permalink / raw)
To: Liam Girdwood, Biju Das; +Cc: linux-kernel, Andy Shevchenko
On Mon, 28 Aug 2023 17:54:47 +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, drop trailing comma in the terminator entry from ID
> table.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: sy8824x: Make similar OF and ID table
commit: 24d95bb0460aeccfa008faf12721474336d4e0c3
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] 2+ messages in thread
end of thread, other threads:[~2023-09-12 2:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-28 16:54 [PATCH v2] regulator: sy8824x: Make similar OF and ID table Biju Das
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®