forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/clk/clk-s2mps11.c
....@@ -1,19 +1,8 @@
1
-/*
2
- * clk-s2mps11.c - Clock driver for S2MPS11.
3
- *
4
- * Copyright (C) 2013,2014 Samsung Electornics
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License as published by the
8
- * Free Software Foundation; either version 2 of the License, or (at your
9
- * option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- */
1
+// SPDX-License-Identifier: GPL-2.0+
2
+//
3
+// clk-s2mps11.c - Clock driver for S2MPS11.
4
+//
5
+// Copyright (C) 2013,2014 Samsung Electornics
176
187 #include <linux/module.h>
198 #include <linux/err.h>
....@@ -28,12 +17,7 @@
2817 #include <linux/mfd/samsung/s5m8767.h>
2918 #include <linux/mfd/samsung/core.h>
3019
31
-enum {
32
- S2MPS11_CLK_AP = 0,
33
- S2MPS11_CLK_CP,
34
- S2MPS11_CLK_BT,
35
- S2MPS11_CLKS_NUM,
36
-};
20
+#include <dt-bindings/clock/samsung,s2mps11.h>
3721
3822 struct s2mps11_clk {
3923 struct sec_pmic_dev *iodev;
....@@ -87,7 +71,7 @@
8771 return 32768;
8872 }
8973
90
-static struct clk_ops s2mps11_clk_ops = {
74
+static const struct clk_ops s2mps11_clk_ops = {
9175 .prepare = s2mps11_clk_prepare,
9276 .unprepare = s2mps11_clk_unprepare,
9377 .is_prepared = s2mps11_clk_is_prepared,
....@@ -284,18 +268,7 @@
284268 .remove = s2mps11_clk_remove,
285269 .id_table = s2mps11_clk_id,
286270 };
287
-
288
-static int __init s2mps11_clk_init(void)
289
-{
290
- return platform_driver_register(&s2mps11_clk_driver);
291
-}
292
-subsys_initcall(s2mps11_clk_init);
293
-
294
-static void __exit s2mps11_clk_cleanup(void)
295
-{
296
- platform_driver_unregister(&s2mps11_clk_driver);
297
-}
298
-module_exit(s2mps11_clk_cleanup);
271
+module_platform_driver(s2mps11_clk_driver);
299272
300273 MODULE_DESCRIPTION("S2MPS11 Clock Driver");
301274 MODULE_AUTHOR("Yadwinder Singh Brar <yadi.brar@samsung.com>");