* [PATCH v2] rtc: mxc: Convert the driver to DT-only
@ 2020-11-16 18:03 Fabio Estevam
2020-11-17 19:34 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2020-11-16 18:03 UTC (permalink / raw)
To: alexandre.belloni; +Cc: linux-rtc, Fabio Estevam
Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code
by removing the unused non-DT support.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- Remove CONFIG_OF ifdefery - Alexandre
- Remove pdev->id_entry->driver_data non-DT assignment
drivers/rtc/rtc-mxc.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
index a8cfbde048f4..018bfa952d66 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -70,27 +70,12 @@ struct rtc_plat_data {
enum imx_rtc_type devtype;
};
-static const struct platform_device_id imx_rtc_devtype[] = {
- {
- .name = "imx1-rtc",
- .driver_data = IMX1_RTC,
- }, {
- .name = "imx21-rtc",
- .driver_data = IMX21_RTC,
- }, {
- /* sentinel */
- }
-};
-MODULE_DEVICE_TABLE(platform, imx_rtc_devtype);
-
-#ifdef CONFIG_OF
static const struct of_device_id imx_rtc_dt_ids[] = {
{ .compatible = "fsl,imx1-rtc", .data = (const void *)IMX1_RTC },
{ .compatible = "fsl,imx21-rtc", .data = (const void *)IMX21_RTC },
{}
};
MODULE_DEVICE_TABLE(of, imx_rtc_dt_ids);
-#endif
static inline int is_imx1_rtc(struct rtc_plat_data *data)
{
@@ -329,10 +314,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
return -ENOMEM;
of_id = of_match_device(imx_rtc_dt_ids, &pdev->dev);
- if (of_id)
- pdata->devtype = (enum imx_rtc_type)of_id->data;
- else
- pdata->devtype = pdev->id_entry->driver_data;
+ pdata->devtype = (enum imx_rtc_type)of_id->data;
pdata->ioaddr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pdata->ioaddr))
@@ -438,7 +420,6 @@ static struct platform_driver mxc_rtc_driver = {
.name = "mxc_rtc",
.of_match_table = of_match_ptr(imx_rtc_dt_ids),
},
- .id_table = imx_rtc_devtype,
.probe = mxc_rtc_probe,
};
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] rtc: mxc: Convert the driver to DT-only
2020-11-16 18:03 [PATCH v2] rtc: mxc: Convert the driver to DT-only Fabio Estevam
@ 2020-11-17 19:34 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2020-11-17 19:34 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Alexandre Belloni, linux-rtc
On Mon, 16 Nov 2020 15:03:26 -0300, Fabio Estevam wrote:
> Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code
> by removing the unused non-DT support.
Applied, thanks!
[1/1] rtc: mxc: Convert the driver to DT-only
commit: 42882a8a22a86513c8c8c6bc7e0822bb14791999
Best regards,
--
Alexandre Belloni <alexandre.belloni@bootlin.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-17 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-16 18:03 [PATCH v2] rtc: mxc: Convert the driver to DT-only Fabio Estevam
2020-11-17 19:34 ` Alexandre Belloni
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).