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 | |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 31 | enum { |
| 32 | S2MPS11_CLK_AP = 0, |
| 33 | S2MPS11_CLK_CP, |
| 34 | S2MPS11_CLK_BT, |
| 35 | S2MPS11_CLKS_NUM, |
| 36 | }; |
| 37 | |
| 38 | struct s2mps11_clk { |
| 39 | struct sec_pmic_dev *iodev; |
Krzysztof Kozlowski | bf416bd | 2014-05-21 13:22:59 +0200 | [diff] [blame] | 40 | struct device_node *clk_np; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 41 | struct clk_hw hw; |
| 42 | struct clk *clk; |
| 43 | struct clk_lookup *lookup; |
| 44 | u32 mask; |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 45 | unsigned int reg; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) |
| 49 | { |
| 50 | return container_of(hw, struct s2mps11_clk, hw); |
| 51 | } |
| 52 | |
| 53 | static int s2mps11_clk_prepare(struct clk_hw *hw) |
| 54 | { |
| 55 | struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 56 | |
Vaibhav Hiremath | 7764d0c | 2015-07-22 15:04:53 +0530 | [diff] [blame] | 57 | return regmap_update_bits(s2mps11->iodev->regmap_pmic, |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 58 | s2mps11->reg, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 59 | s2mps11->mask, s2mps11->mask); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | static void s2mps11_clk_unprepare(struct clk_hw *hw) |
| 63 | { |
| 64 | struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 65 | |
Vaibhav Hiremath | 7764d0c | 2015-07-22 15:04:53 +0530 | [diff] [blame] | 66 | regmap_update_bits(s2mps11->iodev->regmap_pmic, s2mps11->reg, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 67 | s2mps11->mask, ~s2mps11->mask); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 68 | } |
| 69 | |
Karol Wrona | 89ed7e6 | 2014-07-01 19:13:59 +0200 | [diff] [blame] | 70 | static int s2mps11_clk_is_prepared(struct clk_hw *hw) |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 71 | { |
Karol Wrona | 89ed7e6 | 2014-07-01 19:13:59 +0200 | [diff] [blame] | 72 | int ret; |
| 73 | u32 val; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 74 | struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); |
| 75 | |
Karol Wrona | 89ed7e6 | 2014-07-01 19:13:59 +0200 | [diff] [blame] | 76 | ret = regmap_read(s2mps11->iodev->regmap_pmic, |
| 77 | s2mps11->reg, &val); |
| 78 | if (ret < 0) |
| 79 | return -EINVAL; |
| 80 | |
| 81 | return val & s2mps11->mask; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | static unsigned long s2mps11_clk_recalc_rate(struct clk_hw *hw, |
| 85 | unsigned long parent_rate) |
| 86 | { |
Karol Wrona | 89ed7e6 | 2014-07-01 19:13:59 +0200 | [diff] [blame] | 87 | return 32768; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | static struct clk_ops s2mps11_clk_ops = { |
| 91 | .prepare = s2mps11_clk_prepare, |
| 92 | .unprepare = s2mps11_clk_unprepare, |
Karol Wrona | 89ed7e6 | 2014-07-01 19:13:59 +0200 | [diff] [blame] | 93 | .is_prepared = s2mps11_clk_is_prepared, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 94 | .recalc_rate = s2mps11_clk_recalc_rate, |
| 95 | }; |
| 96 | |
Andi Shyti | 31ad0e2a | 2016-01-20 19:14:22 +0900 | [diff] [blame] | 97 | /* This s2mps11_clks_init tructure is common to s2mps11, s2mps13 and s2mps14 */ |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 98 | static struct clk_init_data s2mps11_clks_init[S2MPS11_CLKS_NUM] = { |
| 99 | [S2MPS11_CLK_AP] = { |
| 100 | .name = "s2mps11_ap", |
| 101 | .ops = &s2mps11_clk_ops, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 102 | }, |
| 103 | [S2MPS11_CLK_CP] = { |
| 104 | .name = "s2mps11_cp", |
| 105 | .ops = &s2mps11_clk_ops, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 106 | }, |
| 107 | [S2MPS11_CLK_BT] = { |
| 108 | .name = "s2mps11_bt", |
| 109 | .ops = &s2mps11_clk_ops, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 110 | }, |
| 111 | }; |
| 112 | |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 113 | static struct device_node *s2mps11_clk_parse_dt(struct platform_device *pdev, |
| 114 | struct clk_init_data *clks_init) |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 115 | { |
| 116 | struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); |
| 117 | struct device_node *clk_np; |
| 118 | int i; |
| 119 | |
| 120 | if (!iodev->dev->of_node) |
Krzysztof Kozlowski | 238e140 | 2014-03-21 13:18:17 +0100 | [diff] [blame] | 121 | return ERR_PTR(-EINVAL); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 122 | |
Krzysztof Kozlowski | afbd1a0 | 2014-03-21 13:39:20 +0100 | [diff] [blame] | 123 | 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] | 124 | if (!clk_np) { |
| 125 | dev_err(&pdev->dev, "could not find clock sub-node\n"); |
| 126 | return ERR_PTR(-EINVAL); |
| 127 | } |
| 128 | |
Andi Shyti | 31ad0e2a | 2016-01-20 19:14:22 +0900 | [diff] [blame] | 129 | for (i = 0; i < S2MPS11_CLKS_NUM; i++) |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 130 | of_property_read_string_index(clk_np, "clock-output-names", i, |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 131 | &clks_init[i].name); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 132 | |
| 133 | return clk_np; |
| 134 | } |
| 135 | |
| 136 | static int s2mps11_clk_probe(struct platform_device *pdev) |
| 137 | { |
| 138 | struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); |
Andi Shyti | dedbb27 | 2016-01-20 19:14:24 +0900 | [diff] [blame] | 139 | struct s2mps11_clk *s2mps11_clks; |
Andi Shyti | 36da4de | 2016-01-20 19:14:23 +0900 | [diff] [blame] | 140 | struct clk_onecell_data *clk_data; |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 141 | unsigned int s2mps11_reg; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 142 | int i, ret = 0; |
Andi Shyti | 31ad0e2a | 2016-01-20 19:14:22 +0900 | [diff] [blame] | 143 | enum sec_device_type hwid = platform_get_device_id(pdev)->driver_data; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 144 | |
Vaibhav Hiremath | 7764d0c | 2015-07-22 15:04:53 +0530 | [diff] [blame] | 145 | s2mps11_clks = devm_kcalloc(&pdev->dev, S2MPS11_CLKS_NUM, |
Andi Shyti | dedbb27 | 2016-01-20 19:14:24 +0900 | [diff] [blame] | 146 | sizeof(*s2mps11_clks), GFP_KERNEL); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 147 | if (!s2mps11_clks) |
| 148 | return -ENOMEM; |
| 149 | |
Andi Shyti | 36da4de | 2016-01-20 19:14:23 +0900 | [diff] [blame] | 150 | clk_data = devm_kzalloc(&pdev->dev, sizeof(*clk_data), GFP_KERNEL); |
| 151 | if (!clk_data) |
| 152 | return -ENOMEM; |
| 153 | |
| 154 | clk_data->clks = devm_kcalloc(&pdev->dev, S2MPS11_CLKS_NUM, |
Vaibhav Hiremath | 7764d0c | 2015-07-22 15:04:53 +0530 | [diff] [blame] | 155 | sizeof(struct clk *), GFP_KERNEL); |
Andi Shyti | 36da4de | 2016-01-20 19:14:23 +0900 | [diff] [blame] | 156 | if (!clk_data->clks) |
Krzysztof Kozlowski | 7002483 | 2014-05-21 13:23:00 +0200 | [diff] [blame] | 157 | return -ENOMEM; |
| 158 | |
Andi Shyti | 31ad0e2a | 2016-01-20 19:14:22 +0900 | [diff] [blame] | 159 | switch (hwid) { |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 160 | case S2MPS11X: |
| 161 | s2mps11_reg = S2MPS11_REG_RTC_CTRL; |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 162 | break; |
Chanwoo Choi | f928b53 | 2014-11-18 17:59:41 +0900 | [diff] [blame] | 163 | case S2MPS13X: |
| 164 | s2mps11_reg = S2MPS13_REG_RTCCTRL; |
Chanwoo Choi | f928b53 | 2014-11-18 17:59:41 +0900 | [diff] [blame] | 165 | break; |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 166 | case S2MPS14X: |
| 167 | s2mps11_reg = S2MPS14_REG_RTCCTRL; |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 168 | break; |
Tushar Behera | e8e6b84 | 2013-12-26 15:48:59 +0530 | [diff] [blame] | 169 | case S5M8767X: |
| 170 | s2mps11_reg = S5M8767_REG_CTRL1; |
| 171 | break; |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 172 | default: |
| 173 | dev_err(&pdev->dev, "Invalid device type\n"); |
| 174 | return -EINVAL; |
kbuild test robot | 250d07d | 2014-11-26 07:45:12 +0800 | [diff] [blame] | 175 | } |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 176 | |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 177 | /* Store clocks of_node in first element of s2mps11_clks array */ |
Andi Shyti | 31ad0e2a | 2016-01-20 19:14:22 +0900 | [diff] [blame] | 178 | s2mps11_clks->clk_np = s2mps11_clk_parse_dt(pdev, s2mps11_clks_init); |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 179 | if (IS_ERR(s2mps11_clks->clk_np)) |
| 180 | return PTR_ERR(s2mps11_clks->clk_np); |
| 181 | |
Andi Shyti | dedbb27 | 2016-01-20 19:14:24 +0900 | [diff] [blame] | 182 | for (i = 0; i < S2MPS11_CLKS_NUM; i++) { |
Andi Shyti | 31ad0e2a | 2016-01-20 19:14:22 +0900 | [diff] [blame] | 183 | if (i == S2MPS11_CLK_CP && hwid == S2MPS14X) |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 184 | continue; /* Skip clocks not present in some devices */ |
Andi Shyti | dedbb27 | 2016-01-20 19:14:24 +0900 | [diff] [blame] | 185 | s2mps11_clks[i].iodev = iodev; |
| 186 | s2mps11_clks[i].hw.init = &s2mps11_clks_init[i]; |
| 187 | s2mps11_clks[i].mask = 1 << i; |
| 188 | s2mps11_clks[i].reg = s2mps11_reg; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 189 | |
Andi Shyti | dedbb27 | 2016-01-20 19:14:24 +0900 | [diff] [blame] | 190 | s2mps11_clks[i].clk = devm_clk_register(&pdev->dev, |
| 191 | &s2mps11_clks[i].hw); |
| 192 | if (IS_ERR(s2mps11_clks[i].clk)) { |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 193 | dev_err(&pdev->dev, "Fail to register : %s\n", |
Andi Shyti | dedbb27 | 2016-01-20 19:14:24 +0900 | [diff] [blame] | 194 | s2mps11_clks_init[i].name); |
| 195 | ret = PTR_ERR(s2mps11_clks[i].clk); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 196 | goto err_reg; |
| 197 | } |
| 198 | |
Andi Shyti | dedbb27 | 2016-01-20 19:14:24 +0900 | [diff] [blame] | 199 | s2mps11_clks[i].lookup = clkdev_create(s2mps11_clks[i].clk, |
| 200 | s2mps11_clks_init[i].name, NULL); |
| 201 | if (!s2mps11_clks[i].lookup) { |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 202 | ret = -ENOMEM; |
Axel Lin | 264e3b7 | 2015-07-16 21:59:43 +0800 | [diff] [blame] | 203 | goto err_reg; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 204 | } |
Andi Shyti | 36da4de | 2016-01-20 19:14:23 +0900 | [diff] [blame] | 205 | clk_data->clks[i] = s2mps11_clks[i].clk; |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 206 | } |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 207 | |
Andi Shyti | 36da4de | 2016-01-20 19:14:23 +0900 | [diff] [blame] | 208 | clk_data->clk_num = S2MPS11_CLKS_NUM; |
Krzysztof Kozlowski | 7002483 | 2014-05-21 13:23:00 +0200 | [diff] [blame] | 209 | of_clk_add_provider(s2mps11_clks->clk_np, of_clk_src_onecell_get, |
Andi Shyti | 36da4de | 2016-01-20 19:14:23 +0900 | [diff] [blame] | 210 | clk_data); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 211 | |
| 212 | platform_set_drvdata(pdev, s2mps11_clks); |
| 213 | |
| 214 | return ret; |
Axel Lin | 264e3b7 | 2015-07-16 21:59:43 +0800 | [diff] [blame] | 215 | |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 216 | err_reg: |
Axel Lin | 264e3b7 | 2015-07-16 21:59:43 +0800 | [diff] [blame] | 217 | while (--i >= 0) |
| 218 | clkdev_drop(s2mps11_clks[i].lookup); |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 219 | |
| 220 | return ret; |
| 221 | } |
| 222 | |
| 223 | static int s2mps11_clk_remove(struct platform_device *pdev) |
| 224 | { |
| 225 | struct s2mps11_clk *s2mps11_clks = platform_get_drvdata(pdev); |
| 226 | int i; |
| 227 | |
Krzysztof Kozlowski | bf416bd | 2014-05-21 13:22:59 +0200 | [diff] [blame] | 228 | of_clk_del_provider(s2mps11_clks[0].clk_np); |
| 229 | /* Drop the reference obtained in s2mps11_clk_parse_dt */ |
| 230 | of_node_put(s2mps11_clks[0].clk_np); |
| 231 | |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 232 | for (i = 0; i < S2MPS11_CLKS_NUM; i++) { |
| 233 | /* Skip clocks not present on S2MPS14 */ |
| 234 | if (!s2mps11_clks[i].lookup) |
| 235 | continue; |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 236 | clkdev_drop(s2mps11_clks[i].lookup); |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 237 | } |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 238 | |
| 239 | return 0; |
| 240 | } |
| 241 | |
| 242 | static const struct platform_device_id s2mps11_clk_id[] = { |
Tushar Behera | 64d64c3 | 2013-12-26 15:48:58 +0530 | [diff] [blame] | 243 | { "s2mps11-clk", S2MPS11X}, |
Chanwoo Choi | f928b53 | 2014-11-18 17:59:41 +0900 | [diff] [blame] | 244 | { "s2mps13-clk", S2MPS13X}, |
Krzysztof Kozlowski | e8b60a4 | 2014-05-21 13:23:01 +0200 | [diff] [blame] | 245 | { "s2mps14-clk", S2MPS14X}, |
Tushar Behera | e8e6b84 | 2013-12-26 15:48:59 +0530 | [diff] [blame] | 246 | { "s5m8767-clk", S5M8767X}, |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 247 | { }, |
| 248 | }; |
| 249 | MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); |
| 250 | |
| 251 | static struct platform_driver s2mps11_clk_driver = { |
| 252 | .driver = { |
| 253 | .name = "s2mps11-clk", |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 254 | }, |
| 255 | .probe = s2mps11_clk_probe, |
| 256 | .remove = s2mps11_clk_remove, |
| 257 | .id_table = s2mps11_clk_id, |
| 258 | }; |
| 259 | |
| 260 | static int __init s2mps11_clk_init(void) |
| 261 | { |
| 262 | return platform_driver_register(&s2mps11_clk_driver); |
| 263 | } |
| 264 | subsys_initcall(s2mps11_clk_init); |
| 265 | |
Vaibhav Hiremath | 7764d0c | 2015-07-22 15:04:53 +0530 | [diff] [blame] | 266 | static void __exit s2mps11_clk_cleanup(void) |
Yadwinder Singh Brar | 7cc560d | 2013-07-07 17:14:20 +0530 | [diff] [blame] | 267 | { |
| 268 | platform_driver_unregister(&s2mps11_clk_driver); |
| 269 | } |
| 270 | module_exit(s2mps11_clk_cleanup); |
| 271 | |
| 272 | MODULE_DESCRIPTION("S2MPS11 Clock Driver"); |
| 273 | MODULE_AUTHOR("Yadwinder Singh Brar <yadi.brar@samsung.com>"); |
| 274 | MODULE_LICENSE("GPL"); |