| .. | .. |
|---|
| 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 |
|---|
| 17 | 6 | |
|---|
| 18 | 7 | #include <linux/module.h> |
|---|
| 19 | 8 | #include <linux/err.h> |
|---|
| .. | .. |
|---|
| 28 | 17 | #include <linux/mfd/samsung/s5m8767.h> |
|---|
| 29 | 18 | #include <linux/mfd/samsung/core.h> |
|---|
| 30 | 19 | |
|---|
| 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> |
|---|
| 37 | 21 | |
|---|
| 38 | 22 | struct s2mps11_clk { |
|---|
| 39 | 23 | struct sec_pmic_dev *iodev; |
|---|
| .. | .. |
|---|
| 87 | 71 | return 32768; |
|---|
| 88 | 72 | } |
|---|
| 89 | 73 | |
|---|
| 90 | | -static struct clk_ops s2mps11_clk_ops = { |
|---|
| 74 | +static const struct clk_ops s2mps11_clk_ops = { |
|---|
| 91 | 75 | .prepare = s2mps11_clk_prepare, |
|---|
| 92 | 76 | .unprepare = s2mps11_clk_unprepare, |
|---|
| 93 | 77 | .is_prepared = s2mps11_clk_is_prepared, |
|---|
| .. | .. |
|---|
| 284 | 268 | .remove = s2mps11_clk_remove, |
|---|
| 285 | 269 | .id_table = s2mps11_clk_id, |
|---|
| 286 | 270 | }; |
|---|
| 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); |
|---|
| 299 | 272 | |
|---|
| 300 | 273 | MODULE_DESCRIPTION("S2MPS11 Clock Driver"); |
|---|
| 301 | 274 | MODULE_AUTHOR("Yadwinder Singh Brar <yadi.brar@samsung.com>"); |
|---|