clk: x86: Rename clk-lpt to more specific clk-lpss-atom
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 22 Jul 2021 19:34:50 +0000 (22:34 +0300)
committerStephen Boyd <sboyd@kernel.org>
Tue, 27 Jul 2021 21:03:47 +0000 (14:03 -0700)
The LPT stands for Lynxpoint PCH. However the driver is used on a few
Intel Atom SoCs. Rename it to reflect this in a way how another clock
driver, i.e. clk-pmc-atom, is called.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210722193450.35321-1-andriy.shevchenko@linux.intel.com
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/acpi/acpi_lpss.c
drivers/clk/x86/Makefile
drivers/clk/x86/clk-lpss-atom.c [new file with mode: 0644]
drivers/clk/x86/clk-lpt.c [deleted file]
include/linux/platform_data/x86/clk-lpss.h

index 894b7e6ae144dcf89daa475412e20f2baba9d941..7f163074e4e4b5a5078cbabe1d84935fc29325c7 100644 (file)
@@ -385,7 +385,9 @@ static struct platform_device *lpss_clk_dev;
 
 static inline void lpt_register_clock_device(void)
 {
 
 static inline void lpt_register_clock_device(void)
 {
-       lpss_clk_dev = platform_device_register_simple("clk-lpt", -1, NULL, 0);
+       lpss_clk_dev = platform_device_register_simple("clk-lpss-atom",
+                                                      PLATFORM_DEVID_NONE,
+                                                      NULL, 0);
 }
 
 static int register_device_clock(struct acpi_device *adev,
 }
 
 static int register_device_clock(struct acpi_device *adev,
@@ -1337,7 +1339,7 @@ void __init acpi_lpss_init(void)
        const struct x86_cpu_id *id;
        int ret;
 
        const struct x86_cpu_id *id;
        int ret;
 
-       ret = lpt_clk_init();
+       ret = lpss_atom_clk_init();
        if (ret)
                return;
 
        if (ret)
                return;
 
index 18564efdc651933c44539b72724f262572fd4536..1244c4e568ffa52b4a97b0f3d660ee2544769cd1 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_PMC_ATOM)         += clk-pmc-atom.o
 obj-$(CONFIG_X86_AMD_PLATFORM_DEVICE)  += clk-fch.o
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_PMC_ATOM)         += clk-pmc-atom.o
 obj-$(CONFIG_X86_AMD_PLATFORM_DEVICE)  += clk-fch.o
-clk-x86-lpss-objs              := clk-lpt.o
+clk-x86-lpss-y                 := clk-lpss-atom.o
 obj-$(CONFIG_X86_INTEL_LPSS)   += clk-x86-lpss.o
 obj-$(CONFIG_CLK_LGM_CGU)      += clk-cgu.o clk-cgu-pll.o clk-lgm.o
 obj-$(CONFIG_X86_INTEL_LPSS)   += clk-x86-lpss.o
 obj-$(CONFIG_CLK_LGM_CGU)      += clk-cgu.o clk-cgu-pll.o clk-lgm.o
diff --git a/drivers/clk/x86/clk-lpss-atom.c b/drivers/clk/x86/clk-lpss-atom.c
new file mode 100644 (file)
index 0000000..aa9d0bb
--- /dev/null
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Intel Low Power Subsystem clocks.
+ *
+ * Copyright (C) 2013, Intel Corporation
+ * Authors: Mika Westerberg <mika.westerberg@linux.intel.com>
+ *         Heikki Krogerus <heikki.krogerus@linux.intel.com>
+ */
+
+#include <linux/clk-provider.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/platform_data/x86/clk-lpss.h>
+#include <linux/platform_device.h>
+
+static int lpss_atom_clk_probe(struct platform_device *pdev)
+{
+       struct lpss_clk_data *drvdata;
+       struct clk *clk;
+
+       drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
+       if (!drvdata)
+               return -ENOMEM;
+
+       /* LPSS free running clock */
+       drvdata->name = "lpss_clk";
+       clk = clk_register_fixed_rate(&pdev->dev, drvdata->name, NULL,
+                                     0, 100000000);
+       if (IS_ERR(clk))
+               return PTR_ERR(clk);
+
+       drvdata->clk = clk;
+       platform_set_drvdata(pdev, drvdata);
+       return 0;
+}
+
+static struct platform_driver lpss_atom_clk_driver = {
+       .driver = {
+               .name = "clk-lpss-atom",
+       },
+       .probe = lpss_atom_clk_probe,
+};
+
+int __init lpss_atom_clk_init(void)
+{
+       return platform_driver_register(&lpss_atom_clk_driver);
+}
diff --git a/drivers/clk/x86/clk-lpt.c b/drivers/clk/x86/clk-lpt.c
deleted file mode 100644 (file)
index fbe9fd3..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Intel Low Power Subsystem clocks.
- *
- * Copyright (C) 2013, Intel Corporation
- * Authors: Mika Westerberg <mika.westerberg@linux.intel.com>
- *         Heikki Krogerus <heikki.krogerus@linux.intel.com>
- */
-
-#include <linux/clk-provider.h>
-#include <linux/err.h>
-#include <linux/module.h>
-#include <linux/platform_data/x86/clk-lpss.h>
-#include <linux/platform_device.h>
-
-static int lpt_clk_probe(struct platform_device *pdev)
-{
-       struct lpss_clk_data *drvdata;
-       struct clk *clk;
-
-       drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
-       if (!drvdata)
-               return -ENOMEM;
-
-       /* LPSS free running clock */
-       drvdata->name = "lpss_clk";
-       clk = clk_register_fixed_rate(&pdev->dev, drvdata->name, NULL,
-                                     0, 100000000);
-       if (IS_ERR(clk))
-               return PTR_ERR(clk);
-
-       drvdata->clk = clk;
-       platform_set_drvdata(pdev, drvdata);
-       return 0;
-}
-
-static struct platform_driver lpt_clk_driver = {
-       .driver = {
-               .name = "clk-lpt",
-       },
-       .probe = lpt_clk_probe,
-};
-
-int __init lpt_clk_init(void)
-{
-       return platform_driver_register(&lpt_clk_driver);
-}
index 207e1a317800115ab8e6d008ecc506e892b8c4d2..41df326583f98edeff0fd52a092661ea39ffccef 100644 (file)
@@ -15,6 +15,6 @@ struct lpss_clk_data {
        struct clk *clk;
 };
 
        struct clk *clk;
 };
 
-extern int lpt_clk_init(void);
+extern int lpss_atom_clk_init(void);
 
 #endif /* __CLK_LPSS_H */
 
 #endif /* __CLK_LPSS_H */