John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Mediatek Pulse Width Modulator driver |
| 3 | * |
| 4 | * Copyright (C) 2015 John Crispin <blogic@openwrt.org> |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 5 | * Copyright (C) 2017 Zhi Mao <zhi.mao@mediatek.com> |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any |
| 9 | * warranty of any kind, whether express or implied. |
| 10 | */ |
| 11 | |
| 12 | #include <linux/err.h> |
| 13 | #include <linux/io.h> |
| 14 | #include <linux/ioport.h> |
| 15 | #include <linux/kernel.h> |
| 16 | #include <linux/module.h> |
| 17 | #include <linux/clk.h> |
| 18 | #include <linux/of.h> |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 19 | #include <linux/of_device.h> |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 20 | #include <linux/platform_device.h> |
| 21 | #include <linux/pwm.h> |
| 22 | #include <linux/slab.h> |
| 23 | #include <linux/types.h> |
| 24 | |
| 25 | /* PWM registers and bits definitions */ |
| 26 | #define PWMCON 0x00 |
| 27 | #define PWMHDUR 0x04 |
| 28 | #define PWMLDUR 0x08 |
| 29 | #define PWMGDUR 0x0c |
| 30 | #define PWMWAVENUM 0x28 |
| 31 | #define PWMDWIDTH 0x2c |
Sean Wang | 360cc03 | 2018-03-01 16:19:12 +0800 | [diff] [blame] | 32 | #define PWM45DWIDTH_FIXUP 0x30 |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 33 | #define PWMTHRES 0x30 |
Sean Wang | 360cc03 | 2018-03-01 16:19:12 +0800 | [diff] [blame] | 34 | #define PWM45THRES_FIXUP 0x34 |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 35 | |
Zhi Mao | 8bdb65d | 2017-06-30 14:05:20 +0800 | [diff] [blame] | 36 | #define PWM_CLK_DIV_MAX 7 |
| 37 | |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 38 | struct mtk_pwm_platform_data { |
| 39 | unsigned int num_pwms; |
Sean Wang | 360cc03 | 2018-03-01 16:19:12 +0800 | [diff] [blame] | 40 | bool pwm45_fixup; |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | /** |
| 44 | * struct mtk_pwm_chip - struct representing PWM chip |
| 45 | * @chip: linux PWM chip representation |
| 46 | * @regs: base address of PWM chip |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 47 | * @clk_top: the top clock generator |
| 48 | * @clk_main: the clock used by PWM core |
| 49 | * @clk_pwms: the clock used by each PWM channel |
| 50 | * @clk_freq: the fix clock frequency of legacy MIPS SoC |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 51 | */ |
| 52 | struct mtk_pwm_chip { |
| 53 | struct pwm_chip chip; |
| 54 | void __iomem *regs; |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 55 | struct clk *clk_top; |
| 56 | struct clk *clk_main; |
| 57 | struct clk **clk_pwms; |
Sean Wang | 360cc03 | 2018-03-01 16:19:12 +0800 | [diff] [blame] | 58 | const struct mtk_pwm_platform_data *soc; |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 59 | }; |
| 60 | |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 61 | static const unsigned int mtk_pwm_reg_offset[] = { |
| 62 | 0x0010, 0x0050, 0x0090, 0x00d0, 0x0110, 0x0150, 0x0190, 0x0220 |
| 63 | }; |
| 64 | |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 65 | static inline struct mtk_pwm_chip *to_mtk_pwm_chip(struct pwm_chip *chip) |
| 66 | { |
| 67 | return container_of(chip, struct mtk_pwm_chip, chip); |
| 68 | } |
| 69 | |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 70 | static int mtk_pwm_clk_enable(struct pwm_chip *chip, struct pwm_device *pwm) |
| 71 | { |
| 72 | struct mtk_pwm_chip *pc = to_mtk_pwm_chip(chip); |
| 73 | int ret; |
| 74 | |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 75 | ret = clk_prepare_enable(pc->clk_top); |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 76 | if (ret < 0) |
| 77 | return ret; |
| 78 | |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 79 | ret = clk_prepare_enable(pc->clk_main); |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 80 | if (ret < 0) |
| 81 | goto disable_clk_top; |
| 82 | |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 83 | ret = clk_prepare_enable(pc->clk_pwms[pwm->hwpwm]); |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 84 | if (ret < 0) |
| 85 | goto disable_clk_main; |
| 86 | |
| 87 | return 0; |
| 88 | |
| 89 | disable_clk_main: |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 90 | clk_disable_unprepare(pc->clk_main); |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 91 | disable_clk_top: |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 92 | clk_disable_unprepare(pc->clk_top); |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 93 | |
| 94 | return ret; |
| 95 | } |
| 96 | |
| 97 | static void mtk_pwm_clk_disable(struct pwm_chip *chip, struct pwm_device *pwm) |
| 98 | { |
| 99 | struct mtk_pwm_chip *pc = to_mtk_pwm_chip(chip); |
| 100 | |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 101 | clk_disable_unprepare(pc->clk_pwms[pwm->hwpwm]); |
| 102 | clk_disable_unprepare(pc->clk_main); |
| 103 | clk_disable_unprepare(pc->clk_top); |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 104 | } |
| 105 | |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 106 | static inline u32 mtk_pwm_readl(struct mtk_pwm_chip *chip, unsigned int num, |
| 107 | unsigned int offset) |
| 108 | { |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 109 | return readl(chip->regs + mtk_pwm_reg_offset[num] + offset); |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | static inline void mtk_pwm_writel(struct mtk_pwm_chip *chip, |
| 113 | unsigned int num, unsigned int offset, |
| 114 | u32 value) |
| 115 | { |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 116 | writel(value, chip->regs + mtk_pwm_reg_offset[num] + offset); |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | static int mtk_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, |
| 120 | int duty_ns, int period_ns) |
| 121 | { |
| 122 | struct mtk_pwm_chip *pc = to_mtk_pwm_chip(chip); |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 123 | struct clk *clk = pc->clk_pwms[pwm->hwpwm]; |
Sean Wang | 04c0a4e | 2018-03-02 16:49:14 +0800 | [diff] [blame] | 124 | u32 clkdiv = 0, cnt_period, cnt_duty, reg_width = PWMDWIDTH, |
Sean Wang | 360cc03 | 2018-03-01 16:19:12 +0800 | [diff] [blame] | 125 | reg_thres = PWMTHRES; |
Sean Wang | 04c0a4e | 2018-03-02 16:49:14 +0800 | [diff] [blame] | 126 | u64 resolution; |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 127 | int ret; |
| 128 | |
| 129 | ret = mtk_pwm_clk_enable(chip, pwm); |
| 130 | if (ret < 0) |
| 131 | return ret; |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 132 | |
Sean Wang | 04c0a4e | 2018-03-02 16:49:14 +0800 | [diff] [blame] | 133 | /* Using resolution in picosecond gets accuracy higher */ |
| 134 | resolution = (u64)NSEC_PER_SEC * 1000; |
| 135 | do_div(resolution, clk_get_rate(clk)); |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 136 | |
Sean Wang | 04c0a4e | 2018-03-02 16:49:14 +0800 | [diff] [blame] | 137 | cnt_period = DIV_ROUND_CLOSEST_ULL((u64)period_ns * 1000, resolution); |
| 138 | while (cnt_period > 8191) { |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 139 | resolution *= 2; |
| 140 | clkdiv++; |
Sean Wang | 04c0a4e | 2018-03-02 16:49:14 +0800 | [diff] [blame] | 141 | cnt_period = DIV_ROUND_CLOSEST_ULL((u64)period_ns * 1000, |
| 142 | resolution); |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 143 | } |
| 144 | |
Zhi Mao | 8bdb65d | 2017-06-30 14:05:20 +0800 | [diff] [blame] | 145 | if (clkdiv > PWM_CLK_DIV_MAX) { |
| 146 | mtk_pwm_clk_disable(chip, pwm); |
| 147 | dev_err(chip->dev, "period %d not supported\n", period_ns); |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 148 | return -EINVAL; |
Zhi Mao | 8bdb65d | 2017-06-30 14:05:20 +0800 | [diff] [blame] | 149 | } |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 150 | |
Sean Wang | 360cc03 | 2018-03-01 16:19:12 +0800 | [diff] [blame] | 151 | if (pc->soc->pwm45_fixup && pwm->hwpwm > 2) { |
| 152 | /* |
| 153 | * PWM[4,5] has distinct offset for PWMDWIDTH and PWMTHRES |
| 154 | * from the other PWMs on MT7623. |
| 155 | */ |
| 156 | reg_width = PWM45DWIDTH_FIXUP; |
| 157 | reg_thres = PWM45THRES_FIXUP; |
| 158 | } |
| 159 | |
Sean Wang | 04c0a4e | 2018-03-02 16:49:14 +0800 | [diff] [blame] | 160 | cnt_duty = DIV_ROUND_CLOSEST_ULL((u64)duty_ns * 1000, resolution); |
Zhi Mao | cd30798 | 2017-06-30 14:05:17 +0800 | [diff] [blame] | 161 | mtk_pwm_writel(pc, pwm->hwpwm, PWMCON, BIT(15) | clkdiv); |
Sean Wang | 04c0a4e | 2018-03-02 16:49:14 +0800 | [diff] [blame] | 162 | mtk_pwm_writel(pc, pwm->hwpwm, reg_width, cnt_period); |
| 163 | mtk_pwm_writel(pc, pwm->hwpwm, reg_thres, cnt_duty); |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 164 | |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 165 | mtk_pwm_clk_disable(chip, pwm); |
| 166 | |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 167 | return 0; |
| 168 | } |
| 169 | |
| 170 | static int mtk_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) |
| 171 | { |
| 172 | struct mtk_pwm_chip *pc = to_mtk_pwm_chip(chip); |
| 173 | u32 value; |
| 174 | int ret; |
| 175 | |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 176 | ret = mtk_pwm_clk_enable(chip, pwm); |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 177 | if (ret < 0) |
| 178 | return ret; |
| 179 | |
| 180 | value = readl(pc->regs); |
| 181 | value |= BIT(pwm->hwpwm); |
| 182 | writel(value, pc->regs); |
| 183 | |
| 184 | return 0; |
| 185 | } |
| 186 | |
| 187 | static void mtk_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) |
| 188 | { |
| 189 | struct mtk_pwm_chip *pc = to_mtk_pwm_chip(chip); |
| 190 | u32 value; |
| 191 | |
| 192 | value = readl(pc->regs); |
| 193 | value &= ~BIT(pwm->hwpwm); |
| 194 | writel(value, pc->regs); |
| 195 | |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 196 | mtk_pwm_clk_disable(chip, pwm); |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 197 | } |
| 198 | |
| 199 | static const struct pwm_ops mtk_pwm_ops = { |
| 200 | .config = mtk_pwm_config, |
| 201 | .enable = mtk_pwm_enable, |
| 202 | .disable = mtk_pwm_disable, |
| 203 | .owner = THIS_MODULE, |
| 204 | }; |
| 205 | |
| 206 | static int mtk_pwm_probe(struct platform_device *pdev) |
| 207 | { |
| 208 | struct mtk_pwm_chip *pc; |
| 209 | struct resource *res; |
| 210 | unsigned int i; |
| 211 | int ret; |
| 212 | |
| 213 | pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL); |
| 214 | if (!pc) |
| 215 | return -ENOMEM; |
| 216 | |
Sam Shih | e6c7c25 | 2019-09-20 06:49:02 +0800 | [diff] [blame] | 217 | pc->soc = of_device_get_match_data(&pdev->dev); |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 218 | |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 219 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 220 | pc->regs = devm_ioremap_resource(&pdev->dev, res); |
| 221 | if (IS_ERR(pc->regs)) |
| 222 | return PTR_ERR(pc->regs); |
| 223 | |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 224 | pc->clk_pwms = devm_kcalloc(&pdev->dev, pc->soc->num_pwms, |
| 225 | sizeof(*pc->clk_pwms), GFP_KERNEL); |
| 226 | if (!pc->clk_pwms) |
| 227 | return -ENOMEM; |
| 228 | |
| 229 | pc->clk_top = devm_clk_get(&pdev->dev, "top"); |
| 230 | if (IS_ERR(pc->clk_top)) { |
| 231 | dev_err(&pdev->dev, "clock: top fail: %ld\n", |
| 232 | PTR_ERR(pc->clk_top)); |
| 233 | return PTR_ERR(pc->clk_top); |
| 234 | } |
| 235 | |
| 236 | pc->clk_main = devm_clk_get(&pdev->dev, "main"); |
| 237 | if (IS_ERR(pc->clk_main)) { |
| 238 | dev_err(&pdev->dev, "clock: main fail: %ld\n", |
| 239 | PTR_ERR(pc->clk_main)); |
| 240 | return PTR_ERR(pc->clk_main); |
| 241 | } |
| 242 | |
| 243 | for (i = 0; i < pc->soc->num_pwms; i++) { |
| 244 | char name[8]; |
| 245 | |
| 246 | snprintf(name, sizeof(name), "pwm%d", i + 1); |
| 247 | |
| 248 | pc->clk_pwms[i] = devm_clk_get(&pdev->dev, name); |
| 249 | if (IS_ERR(pc->clk_pwms[i])) { |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 250 | dev_err(&pdev->dev, "clock: %s fail: %ld\n", |
Sam Shih | efecdeb | 2019-09-20 06:49:04 +0800 | [diff] [blame^] | 251 | name, PTR_ERR(pc->clk_pwms[i])); |
| 252 | return PTR_ERR(pc->clk_pwms[i]); |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 253 | } |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 254 | } |
| 255 | |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 256 | platform_set_drvdata(pdev, pc); |
| 257 | |
| 258 | pc->chip.dev = &pdev->dev; |
| 259 | pc->chip.ops = &mtk_pwm_ops; |
| 260 | pc->chip.base = -1; |
Sam Shih | e6c7c25 | 2019-09-20 06:49:02 +0800 | [diff] [blame] | 261 | pc->chip.npwm = pc->soc->num_pwms; |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 262 | |
| 263 | ret = pwmchip_add(&pc->chip); |
| 264 | if (ret < 0) { |
| 265 | dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret); |
Zhi Mao | e7c197e | 2017-06-30 14:05:18 +0800 | [diff] [blame] | 266 | return ret; |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | return 0; |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 270 | } |
| 271 | |
| 272 | static int mtk_pwm_remove(struct platform_device *pdev) |
| 273 | { |
| 274 | struct mtk_pwm_chip *pc = platform_get_drvdata(pdev); |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 275 | |
| 276 | return pwmchip_remove(&pc->chip); |
| 277 | } |
| 278 | |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 279 | static const struct mtk_pwm_platform_data mt2712_pwm_data = { |
| 280 | .num_pwms = 8, |
Sean Wang | 360cc03 | 2018-03-01 16:19:12 +0800 | [diff] [blame] | 281 | .pwm45_fixup = false, |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 282 | }; |
| 283 | |
| 284 | static const struct mtk_pwm_platform_data mt7622_pwm_data = { |
| 285 | .num_pwms = 6, |
Sean Wang | 360cc03 | 2018-03-01 16:19:12 +0800 | [diff] [blame] | 286 | .pwm45_fixup = false, |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 287 | }; |
| 288 | |
| 289 | static const struct mtk_pwm_platform_data mt7623_pwm_data = { |
| 290 | .num_pwms = 5, |
Sean Wang | 360cc03 | 2018-03-01 16:19:12 +0800 | [diff] [blame] | 291 | .pwm45_fixup = true, |
John Crispin | 8cdc43a | 2018-07-25 11:52:09 +0200 | [diff] [blame] | 292 | }; |
| 293 | |
| 294 | static const struct mtk_pwm_platform_data mt7628_pwm_data = { |
| 295 | .num_pwms = 4, |
| 296 | .pwm45_fixup = true, |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 297 | }; |
| 298 | |
Fabien Parent | 8d19072 | 2019-08-05 14:58:48 +0200 | [diff] [blame] | 299 | static const struct mtk_pwm_platform_data mt8516_pwm_data = { |
| 300 | .num_pwms = 5, |
| 301 | .pwm45_fixup = false, |
Fabien Parent | 8d19072 | 2019-08-05 14:58:48 +0200 | [diff] [blame] | 302 | }; |
| 303 | |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 304 | static const struct of_device_id mtk_pwm_of_match[] = { |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 305 | { .compatible = "mediatek,mt2712-pwm", .data = &mt2712_pwm_data }, |
| 306 | { .compatible = "mediatek,mt7622-pwm", .data = &mt7622_pwm_data }, |
| 307 | { .compatible = "mediatek,mt7623-pwm", .data = &mt7623_pwm_data }, |
John Crispin | 8cdc43a | 2018-07-25 11:52:09 +0200 | [diff] [blame] | 308 | { .compatible = "mediatek,mt7628-pwm", .data = &mt7628_pwm_data }, |
Fabien Parent | 8d19072 | 2019-08-05 14:58:48 +0200 | [diff] [blame] | 309 | { .compatible = "mediatek,mt8516-pwm", .data = &mt8516_pwm_data }, |
Zhi Mao | 424268c | 2017-10-25 18:11:01 +0800 | [diff] [blame] | 310 | { }, |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 311 | }; |
| 312 | MODULE_DEVICE_TABLE(of, mtk_pwm_of_match); |
| 313 | |
| 314 | static struct platform_driver mtk_pwm_driver = { |
| 315 | .driver = { |
| 316 | .name = "mtk-pwm", |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 317 | .of_match_table = mtk_pwm_of_match, |
| 318 | }, |
| 319 | .probe = mtk_pwm_probe, |
| 320 | .remove = mtk_pwm_remove, |
| 321 | }; |
| 322 | module_platform_driver(mtk_pwm_driver); |
| 323 | |
| 324 | MODULE_AUTHOR("John Crispin <blogic@openwrt.org>"); |
John Crispin | caf065f | 2017-01-23 19:34:37 +0100 | [diff] [blame] | 325 | MODULE_LICENSE("GPL"); |