mirror of
https://github.com/torvalds/linux.git
synced 2024-12-13 06:32:50 +00:00
rtc: tegra: Turn into regular driver
Drivers registered with module_platform_driver_probe() are considered non-hotpluggable, which among other things means that they don't support deferred probe. However, recent changes in how the ARM SMMU works have required the BPMP (which is the clock provider on Tegra186 and later) be bound to the SMMU, which in turn means that the BPMP driver can defer probe and hence clocks become available much later than they used to. For most other drivers this is not a problem because they already properly support deferred probe, but rtc-tegra is the odd one out that now fails to probe and will therefore never be registered. Fix this by making the driver a regular driver that supports unloading and deferred probe. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
c6af561a4a
commit
3e483e59c7
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* An RTC driver for the NVIDIA Tegra 200 series internal RTC.
|
||||
*
|
||||
* Copyright (c) 2010, NVIDIA Corporation.
|
||||
* Copyright (c) 2010-2019, NVIDIA Corporation.
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
@ -274,7 +274,7 @@ static const struct of_device_id tegra_rtc_dt_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match);
|
||||
|
||||
static int __init tegra_rtc_probe(struct platform_device *pdev)
|
||||
static int tegra_rtc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct tegra_rtc_info *info;
|
||||
struct resource *res;
|
||||
@ -406,6 +406,7 @@ static void tegra_rtc_shutdown(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static struct platform_driver tegra_rtc_driver = {
|
||||
.probe = tegra_rtc_probe,
|
||||
.remove = tegra_rtc_remove,
|
||||
.shutdown = tegra_rtc_shutdown,
|
||||
.driver = {
|
||||
@ -414,8 +415,7 @@ static struct platform_driver tegra_rtc_driver = {
|
||||
.pm = &tegra_rtc_pm_ops,
|
||||
},
|
||||
};
|
||||
|
||||
module_platform_driver_probe(tegra_rtc_driver, tegra_rtc_probe);
|
||||
module_platform_driver(tegra_rtc_driver);
|
||||
|
||||
MODULE_AUTHOR("Jon Mayo <jmayo@nvidia.com>");
|
||||
MODULE_DESCRIPTION("driver for Tegra internal RTC");
|
||||
|
Loading…
Reference in New Issue
Block a user