Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 1 | /* |
| 2 | * clk-s2mps11.c - Clock driver for S2MPS11. |
| 3 | * |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 4 | * Copyright (C) 2013,2014 Samsung Electornics |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 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 | * |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 16 | */ |
| 17 | |
| 18 | #include <linux/module.h> |
| 19 | #include <linux/err.h> |
| 20 | #include <linux/of.h> |
| 21 | #include <linux/clkdev.h> |
| 22 | #include <linux/regmap.h> |
| 23 | #include <linux/clk-provider.h> |
| 24 | #include <linux/platform_device.h> |
| 25 | #include <linux/mfd/samsung/s2mps11.h> |
Chanwoo Choi | f928b53 | 2014-11-18 17:59:41 +0900 | [diff] [blame^] | 26 | #include <linux/mfd/samsung/s2mps13.h> |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 27 | #include <linux/mfd/samsung/s2mps14.h> |
Tushar Behera | e8e6b84 | 2013-12-26 15:48:59 +0530 | [diff] [blame] | 28 | #include <linux/mfd/samsung/s5m8767.h> |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 29 | #include <linux/mfd/samsung/core.h> |
| 30 | |
| 31 | #define s2mps11_name(a) (a->hw.init->name) |
| 32 | |
| 33 | static struct clk **clk_table; |
| 34 | static struct clk_onecell_data clk_data; |
| 35 | |
| 36 | enum { |
| 37 | S2MPS11_CLK_AP = 0, |
| 38 | S2MPS11_CLK_CP, |
| 39 | S2MPS11_CLK_BT, |
| 40 | S2MPS11_CLKS_NUM, |
| 41 | }; |
| 42 | |
| 43 | struct s2mps11_clk { |
| 44 | struct sec_pmic_dev *iodev; |
Krzysztof Kozlowski | bf416bd | 2014-05-21 13:22:59 +0200 | [diff] [blame] | 45 | struct device_node *clk_np; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 46 | struct clk_hw hw; |
| 47 | struct clk *clk; |
| 48 | struct clk_lookup *lookup; |
| 49 | u32 mask; |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 50 | unsigned int reg; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 51 | }; |
| 52 | |
| 53 | static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) |
| 54 | { |
| 55 | return container_of(hw, struct s2mps11_clk, hw); |
| 56 | } |
| 57 | |
| 58 | static int s2mps11_clk_prepare(struct clk_hw *hw) |
| 59 | { |
| 60 | struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); |
| 61 | int ret; |
| 62 | |
Krzysztof Kozlowski | 1b1ccee | 2013-12-11 15:07:43 +0100 | [diff] [blame] | 63 | ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 64 | s2mps11->reg, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 65 | s2mps11->mask, s2mps11->mask); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 66 | |
| 67 | return ret; |
| 68 | } |
| 69 | |
| 70 | static void s2mps11_clk_unprepare(struct clk_hw *hw) |
| 71 | { |
| 72 | struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); |
| 73 | int ret; |
| 74 | |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 75 | ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, s2mps11->reg, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 76 | s2mps11->mask, ~s2mps11->mask); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 77 | } |
| 78 | |
Karol Wrona | 89ed7e6 | 2014-07-01 19:13:59 +0200 | [diff] [blame] | 79 | static int s2mps11_clk_is_prepared(struct clk_hw *hw) |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 80 | { |
Karol Wrona | 89ed7e6 | 2014-07-01 19:13:59 +0200 | [diff] [blame] | 81 | int ret; |
| 82 | u32 val; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 83 | struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); |
| 84 | |
Karol Wrona | 89ed7e6 | 2014-07-01 19:13:59 +0200 | [diff] [blame] | 85 | ret = regmap_read(s2mps11->iodev->regmap_pmic, |
| 86 | s2mps11->reg, &val); |
| 87 | if (ret < 0) |
| 88 | return -EINVAL; |
| 89 | |
| 90 | return val & s2mps11->mask; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 91 | } |
| 92 | |
| 93 | static unsigned long s2mps11_clk_recalc_rate(struct clk_hw *hw, |
| 94 | unsigned long parent_rate) |
| 95 | { |
Karol Wrona | 89ed7e6 | 2014-07-01 19:13:59 +0200 | [diff] [blame] | 96 | return 32768; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | static struct clk_ops s2mps11_clk_ops = { |
| 100 | .prepare = s2mps11_clk_prepare, |
| 101 | .unprepare = s2mps11_clk_unprepare, |
Karol Wrona | 89ed7e6 | 2014-07-01 19:13:59 +0200 | [diff] [blame] | 102 | .is_prepared = s2mps11_clk_is_prepared, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 103 | .recalc_rate = s2mps11_clk_recalc_rate, |
| 104 | }; |
| 105 | |
| 106 | static struct clk_init_data s2mps11_clks_init[S2MPS11_CLKS_NUM] = { |
| 107 | [S2MPS11_CLK_AP] = { |
| 108 | .name = "s2mps11_ap", |
| 109 | .ops = &s2mps11_clk_ops, |
| 110 | .flags = CLK_IS_ROOT, |
| 111 | }, |
| 112 | [S2MPS11_CLK_CP] = { |
| 113 | .name = "s2mps11_cp", |
| 114 | .ops = &s2mps11_clk_ops, |
| 115 | .flags = CLK_IS_ROOT, |
| 116 | }, |
| 117 | [S2MPS11_CLK_BT] = { |
| 118 | .name = "s2mps11_bt", |
| 119 | .ops = &s2mps11_clk_ops, |
| 120 | .flags = CLK_IS_ROOT, |
| 121 | }, |
| 122 | }; |
| 123 | |
Chanwoo Choi | f928b53 | 2014-11-18 17:59:41 +0900 | [diff] [blame^] | 124 | static struct clk_init_data s2mps13_clks_init[S2MPS11_CLKS_NUM] = { |
| 125 | [S2MPS11_CLK_AP] = { |
| 126 | .name = "s2mps13_ap", |
| 127 | .ops = &s2mps11_clk_ops, |
| 128 | .flags = CLK_IS_ROOT, |
| 129 | }, |
| 130 | [S2MPS11_CLK_CP] = { |
| 131 | .name = "s2mps13_cp", |
| 132 | .ops = &s2mps11_clk_ops, |
| 133 | .flags = CLK_IS_ROOT, |
| 134 | }, |
| 135 | [S2MPS11_CLK_BT] = { |
| 136 | .name = "s2mps13_bt", |
| 137 | .ops = &s2mps11_clk_ops, |
| 138 | .flags = CLK_IS_ROOT, |
| 139 | }, |
| 140 | }; |
| 141 | |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 142 | static struct clk_init_data s2mps14_clks_init[S2MPS11_CLKS_NUM] = { |
| 143 | [S2MPS11_CLK_AP] = { |
| 144 | .name = "s2mps14_ap", |
| 145 | .ops = &s2mps11_clk_ops, |
| 146 | .flags = CLK_IS_ROOT, |
| 147 | }, |
| 148 | [S2MPS11_CLK_BT] = { |
| 149 | .name = "s2mps14_bt", |
| 150 | .ops = &s2mps11_clk_ops, |
| 151 | .flags = CLK_IS_ROOT, |
| 152 | }, |
| 153 | }; |
| 154 | |
| 155 | static struct device_node *s2mps11_clk_parse_dt(struct platform_device *pdev, |
| 156 | struct clk_init_data *clks_init) |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 157 | { |
| 158 | struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); |
| 159 | struct device_node *clk_np; |
| 160 | int i; |
| 161 | |
| 162 | if (!iodev->dev->of_node) |
Krzysztof Kozlowski | 238e140 | 2014-03-21 13:18:17 +0100 | [diff] [blame] | 163 | return ERR_PTR(-EINVAL); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 164 | |
Krzysztof Kozlowski | afbd1a0 | 2014-03-21 13:39:20 +0100 | [diff] [blame] | 165 | clk_np = of_get_child_by_name(iodev->dev->of_node, "clocks"); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 166 | if (!clk_np) { |
| 167 | dev_err(&pdev->dev, "could not find clock sub-node\n"); |
| 168 | return ERR_PTR(-EINVAL); |
| 169 | } |
| 170 | |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 171 | for (i = 0; i < S2MPS11_CLKS_NUM; i++) { |
| 172 | if (!clks_init[i].name) |
| 173 | continue; /* Skip clocks not present in some devices */ |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 174 | of_property_read_string_index(clk_np, "clock-output-names", i, |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 175 | &clks_init[i].name); |
| 176 | } |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 177 | |
| 178 | return clk_np; |
| 179 | } |
| 180 | |
| 181 | static int s2mps11_clk_probe(struct platform_device *pdev) |
| 182 | { |
| 183 | struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); |
| 184 | struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 185 | unsigned int s2mps11_reg; |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 186 | struct clk_init_data *clks_init; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 187 | int i, ret = 0; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 188 | |
| 189 | s2mps11_clks = devm_kzalloc(&pdev->dev, sizeof(*s2mps11_clk) * |
| 190 | S2MPS11_CLKS_NUM, GFP_KERNEL); |
| 191 | if (!s2mps11_clks) |
| 192 | return -ENOMEM; |
| 193 | |
| 194 | s2mps11_clk = s2mps11_clks; |
| 195 | |
Krzysztof Kozlowski | 7002483 | 2014-05-21 13:23:00 +0200 | [diff] [blame] | 196 | clk_table = devm_kzalloc(&pdev->dev, sizeof(struct clk *) * |
| 197 | S2MPS11_CLKS_NUM, GFP_KERNEL); |
| 198 | if (!clk_table) |
| 199 | return -ENOMEM; |
| 200 | |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 201 | switch(platform_get_device_id(pdev)->driver_data) { |
| 202 | case S2MPS11X: |
| 203 | s2mps11_reg = S2MPS11_REG_RTC_CTRL; |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 204 | clks_init = s2mps11_clks_init; |
| 205 | break; |
Chanwoo Choi | f928b53 | 2014-11-18 17:59:41 +0900 | [diff] [blame^] | 206 | case S2MPS13X: |
| 207 | s2mps11_reg = S2MPS13_REG_RTCCTRL; |
| 208 | clks_init = s2mps13_clks_init; |
| 209 | break; |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 210 | case S2MPS14X: |
| 211 | s2mps11_reg = S2MPS14_REG_RTCCTRL; |
| 212 | clks_init = s2mps14_clks_init; |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 213 | break; |
Tushar Behera | e8e6b84 | 2013-12-26 15:48:59 +0530 | [diff] [blame] | 214 | case S5M8767X: |
| 215 | s2mps11_reg = S5M8767_REG_CTRL1; |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 216 | clks_init = s2mps11_clks_init; |
Tushar Behera | e8e6b84 | 2013-12-26 15:48:59 +0530 | [diff] [blame] | 217 | break; |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 218 | default: |
| 219 | dev_err(&pdev->dev, "Invalid device type\n"); |
| 220 | return -EINVAL; |
| 221 | }; |
| 222 | |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 223 | /* Store clocks of_node in first element of s2mps11_clks array */ |
| 224 | s2mps11_clks->clk_np = s2mps11_clk_parse_dt(pdev, clks_init); |
| 225 | if (IS_ERR(s2mps11_clks->clk_np)) |
| 226 | return PTR_ERR(s2mps11_clks->clk_np); |
| 227 | |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 228 | for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 229 | if (!clks_init[i].name) |
| 230 | continue; /* Skip clocks not present in some devices */ |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 231 | s2mps11_clk->iodev = iodev; |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 232 | s2mps11_clk->hw.init = &clks_init[i]; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 233 | s2mps11_clk->mask = 1 << i; |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 234 | s2mps11_clk->reg = s2mps11_reg; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 235 | |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 236 | s2mps11_clk->clk = devm_clk_register(&pdev->dev, |
| 237 | &s2mps11_clk->hw); |
| 238 | if (IS_ERR(s2mps11_clk->clk)) { |
| 239 | dev_err(&pdev->dev, "Fail to register : %s\n", |
| 240 | s2mps11_name(s2mps11_clk)); |
| 241 | ret = PTR_ERR(s2mps11_clk->clk); |
| 242 | goto err_reg; |
| 243 | } |
| 244 | |
Krzysztof Kozlowski | 2a96dfa | 2014-06-27 14:21:10 +0200 | [diff] [blame] | 245 | s2mps11_clk->lookup = clkdev_alloc(s2mps11_clk->clk, |
| 246 | s2mps11_name(s2mps11_clk), NULL); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 247 | if (!s2mps11_clk->lookup) { |
| 248 | ret = -ENOMEM; |
| 249 | goto err_lup; |
| 250 | } |
| 251 | |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 252 | clkdev_add(s2mps11_clk->lookup); |
| 253 | } |
| 254 | |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 255 | for (i = 0; i < S2MPS11_CLKS_NUM; i++) { |
| 256 | /* Skip clocks not present on S2MPS14 */ |
| 257 | if (!clks_init[i].name) |
| 258 | continue; |
Krzysztof Kozlowski | 7002483 | 2014-05-21 13:23:00 +0200 | [diff] [blame] | 259 | clk_table[i] = s2mps11_clks[i].clk; |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 260 | } |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 261 | |
Krzysztof Kozlowski | 7002483 | 2014-05-21 13:23:00 +0200 | [diff] [blame] | 262 | clk_data.clks = clk_table; |
| 263 | clk_data.clk_num = S2MPS11_CLKS_NUM; |
| 264 | of_clk_add_provider(s2mps11_clks->clk_np, of_clk_src_onecell_get, |
| 265 | &clk_data); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 266 | |
| 267 | platform_set_drvdata(pdev, s2mps11_clks); |
| 268 | |
| 269 | return ret; |
| 270 | err_lup: |
| 271 | devm_clk_unregister(&pdev->dev, s2mps11_clk->clk); |
| 272 | err_reg: |
| 273 | while (s2mps11_clk > s2mps11_clks) { |
| 274 | if (s2mps11_clk->lookup) { |
| 275 | clkdev_drop(s2mps11_clk->lookup); |
| 276 | devm_clk_unregister(&pdev->dev, s2mps11_clk->clk); |
| 277 | } |
| 278 | s2mps11_clk--; |
| 279 | } |
| 280 | |
| 281 | return ret; |
| 282 | } |
| 283 | |
| 284 | static int s2mps11_clk_remove(struct platform_device *pdev) |
| 285 | { |
| 286 | struct s2mps11_clk *s2mps11_clks = platform_get_drvdata(pdev); |
| 287 | int i; |
| 288 | |
Krzysztof Kozlowski | bf416bd | 2014-05-21 13:22:59 +0200 | [diff] [blame] | 289 | of_clk_del_provider(s2mps11_clks[0].clk_np); |
| 290 | /* Drop the reference obtained in s2mps11_clk_parse_dt */ |
| 291 | of_node_put(s2mps11_clks[0].clk_np); |
| 292 | |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 293 | for (i = 0; i < S2MPS11_CLKS_NUM; i++) { |
| 294 | /* Skip clocks not present on S2MPS14 */ |
| 295 | if (!s2mps11_clks[i].lookup) |
| 296 | continue; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 297 | clkdev_drop(s2mps11_clks[i].lookup); |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 298 | } |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 299 | |
| 300 | return 0; |
| 301 | } |
| 302 | |
| 303 | static const struct platform_device_id s2mps11_clk_id[] = { |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 304 | { "s2mps11-clk", S2MPS11X}, |
Chanwoo Choi | f928b53 | 2014-11-18 17:59:41 +0900 | [diff] [blame^] | 305 | { "s2mps13-clk", S2MPS13X}, |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 306 | { "s2mps14-clk", S2MPS14X}, |
Tushar Behera | e8e6b84 | 2013-12-26 15:48:59 +0530 | [diff] [blame] | 307 | { "s5m8767-clk", S5M8767X}, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 308 | { }, |
| 309 | }; |
| 310 | MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); |
| 311 | |
| 312 | static struct platform_driver s2mps11_clk_driver = { |
| 313 | .driver = { |
| 314 | .name = "s2mps11-clk", |
| 315 | .owner = THIS_MODULE, |
| 316 | }, |
| 317 | .probe = s2mps11_clk_probe, |
| 318 | .remove = s2mps11_clk_remove, |
| 319 | .id_table = s2mps11_clk_id, |
| 320 | }; |
| 321 | |
| 322 | static int __init s2mps11_clk_init(void) |
| 323 | { |
| 324 | return platform_driver_register(&s2mps11_clk_driver); |
| 325 | } |
| 326 | subsys_initcall(s2mps11_clk_init); |
| 327 | |
| 328 | static void __init s2mps11_clk_cleanup(void) |
| 329 | { |
| 330 | platform_driver_unregister(&s2mps11_clk_driver); |
| 331 | } |
| 332 | module_exit(s2mps11_clk_cleanup); |
| 333 | |
| 334 | MODULE_DESCRIPTION("S2MPS11 Clock Driver"); |
| 335 | MODULE_AUTHOR("Yadwinder Singh Brar <yadi.brar@samsung.com>"); |
| 336 | MODULE_LICENSE("GPL"); |