blob: 911329a15da03f94f43f14d1ab9ccc857e1ba7c6 [file] [log] [blame]
Beniamino Galvani101353c2014-06-21 16:22:06 +02001/*
2 * PWM driver for Rockchip SoCs
3 *
4 * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com>
Caesar Wangf6306292014-08-08 15:28:49 +08005 * Copyright (C) 2014 ROCKCHIP, Inc.
Beniamino Galvani101353c2014-06-21 16:22:06 +02006 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 */
11
12#include <linux/clk.h>
13#include <linux/io.h>
14#include <linux/module.h>
15#include <linux/of.h>
Caesar Wangf6306292014-08-08 15:28:49 +080016#include <linux/of_device.h>
Beniamino Galvani101353c2014-06-21 16:22:06 +020017#include <linux/platform_device.h>
18#include <linux/pwm.h>
19#include <linux/time.h>
20
Beniamino Galvani101353c2014-06-21 16:22:06 +020021#define PWM_CTRL_TIMER_EN (1 << 0)
22#define PWM_CTRL_OUTPUT_EN (1 << 3)
23
Caesar Wangf6306292014-08-08 15:28:49 +080024#define PWM_ENABLE (1 << 0)
25#define PWM_CONTINUOUS (1 << 1)
26#define PWM_DUTY_POSITIVE (1 << 3)
Doug Anderson72643542014-08-25 15:59:25 -070027#define PWM_DUTY_NEGATIVE (0 << 3)
Caesar Wangf6306292014-08-08 15:28:49 +080028#define PWM_INACTIVE_NEGATIVE (0 << 4)
Doug Anderson72643542014-08-25 15:59:25 -070029#define PWM_INACTIVE_POSITIVE (1 << 4)
David Wubc834d72017-08-08 23:38:32 +080030#define PWM_POLARITY_MASK (PWM_DUTY_POSITIVE | PWM_INACTIVE_POSITIVE)
Caesar Wangf6306292014-08-08 15:28:49 +080031#define PWM_OUTPUT_LEFT (0 << 5)
32#define PWM_LP_DISABLE (0 << 8)
Beniamino Galvani101353c2014-06-21 16:22:06 +020033
34struct rockchip_pwm_chip {
35 struct pwm_chip chip;
36 struct clk *clk;
David Wu27922ff52017-08-08 23:38:29 +080037 struct clk *pclk;
Caesar Wangf6306292014-08-08 15:28:49 +080038 const struct rockchip_pwm_data *data;
Beniamino Galvani101353c2014-06-21 16:22:06 +020039 void __iomem *base;
40};
41
Caesar Wangf6306292014-08-08 15:28:49 +080042struct rockchip_pwm_regs {
43 unsigned long duty;
44 unsigned long period;
45 unsigned long cntr;
46 unsigned long ctrl;
47};
48
49struct rockchip_pwm_data {
50 struct rockchip_pwm_regs regs;
51 unsigned int prescaler;
Boris Brezillon2bf1c982016-06-14 11:13:14 +020052 bool supports_polarity;
Doug Anderson72643542014-08-25 15:59:25 -070053 const struct pwm_ops *ops;
Caesar Wangf6306292014-08-08 15:28:49 +080054
Boris Brezillon1ebb74c2016-06-14 11:13:12 +020055 void (*get_state)(struct pwm_chip *chip, struct pwm_device *pwm,
56 struct pwm_state *state);
David Wued054692017-08-08 23:38:31 +080057 int (*pwm_apply)(struct pwm_chip *chip, struct pwm_device *pwm,
58 struct pwm_state *state);
Caesar Wangf6306292014-08-08 15:28:49 +080059};
60
Beniamino Galvani101353c2014-06-21 16:22:06 +020061static inline struct rockchip_pwm_chip *to_rockchip_pwm_chip(struct pwm_chip *c)
62{
63 return container_of(c, struct rockchip_pwm_chip, chip);
64}
65
Boris Brezillon1ebb74c2016-06-14 11:13:12 +020066static void rockchip_pwm_get_state_v1(struct pwm_chip *chip,
67 struct pwm_device *pwm,
68 struct pwm_state *state)
69{
70 struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
71 u32 enable_conf = PWM_CTRL_OUTPUT_EN | PWM_CTRL_TIMER_EN;
72 u32 val;
73
74 val = readl_relaxed(pc->base + pc->data->regs.ctrl);
75 if ((val & enable_conf) == enable_conf)
76 state->enabled = true;
77}
78
Boris Brezillon1ebb74c2016-06-14 11:13:12 +020079static void rockchip_pwm_get_state_v2(struct pwm_chip *chip,
80 struct pwm_device *pwm,
81 struct pwm_state *state)
82{
83 struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
84 u32 enable_conf = PWM_OUTPUT_LEFT | PWM_LP_DISABLE | PWM_ENABLE |
85 PWM_CONTINUOUS;
86 u32 val;
87
88 val = readl_relaxed(pc->base + pc->data->regs.ctrl);
89 if ((val & enable_conf) != enable_conf)
90 return;
91
92 state->enabled = true;
93
94 if (!(val & PWM_DUTY_POSITIVE))
95 state->polarity = PWM_POLARITY_INVERSED;
96}
97
98static void rockchip_pwm_get_state(struct pwm_chip *chip,
99 struct pwm_device *pwm,
100 struct pwm_state *state)
101{
102 struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
103 unsigned long clk_rate;
104 u64 tmp;
105 int ret;
106
David Wu27922ff52017-08-08 23:38:29 +0800107 ret = clk_enable(pc->pclk);
Boris Brezillon1ebb74c2016-06-14 11:13:12 +0200108 if (ret)
109 return;
110
111 clk_rate = clk_get_rate(pc->clk);
112
113 tmp = readl_relaxed(pc->base + pc->data->regs.period);
114 tmp *= pc->data->prescaler * NSEC_PER_SEC;
115 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate);
116
117 tmp = readl_relaxed(pc->base + pc->data->regs.duty);
118 tmp *= pc->data->prescaler * NSEC_PER_SEC;
119 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate);
120
121 pc->data->get_state(chip, pwm, state);
122
David Wu27922ff52017-08-08 23:38:29 +0800123 clk_disable(pc->pclk);
Boris Brezillon1ebb74c2016-06-14 11:13:12 +0200124}
125
David Wuf90df9c2017-08-08 23:38:30 +0800126static void rockchip_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
David Wubc834d72017-08-08 23:38:32 +0800127 struct pwm_state *state)
Beniamino Galvani101353c2014-06-21 16:22:06 +0200128{
129 struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
130 unsigned long period, duty;
131 u64 clk_rate, div;
David Wubc834d72017-08-08 23:38:32 +0800132 u32 ctrl;
Beniamino Galvani101353c2014-06-21 16:22:06 +0200133
134 clk_rate = clk_get_rate(pc->clk);
135
136 /*
137 * Since period and duty cycle registers have a width of 32
138 * bits, every possible input period can be obtained using the
139 * default prescaler value for all practical clock rate values.
140 */
David Wubc834d72017-08-08 23:38:32 +0800141 div = clk_rate * state->period;
Boris Brezillon12f9ce42016-06-14 11:13:11 +0200142 period = DIV_ROUND_CLOSEST_ULL(div,
143 pc->data->prescaler * NSEC_PER_SEC);
Beniamino Galvani101353c2014-06-21 16:22:06 +0200144
David Wubc834d72017-08-08 23:38:32 +0800145 div = clk_rate * state->duty_cycle;
Boris Brezillon12f9ce42016-06-14 11:13:11 +0200146 duty = DIV_ROUND_CLOSEST_ULL(div, pc->data->prescaler * NSEC_PER_SEC);
Beniamino Galvani101353c2014-06-21 16:22:06 +0200147
Caesar Wangf6306292014-08-08 15:28:49 +0800148 writel(period, pc->base + pc->data->regs.period);
149 writel(duty, pc->base + pc->data->regs.duty);
David Wubc834d72017-08-08 23:38:32 +0800150
151 ctrl = readl_relaxed(pc->base + pc->data->regs.ctrl);
152 if (pc->data->supports_polarity) {
153 ctrl &= ~PWM_POLARITY_MASK;
154 if (state->polarity == PWM_POLARITY_INVERSED)
155 ctrl |= PWM_DUTY_NEGATIVE | PWM_INACTIVE_POSITIVE;
156 else
157 ctrl |= PWM_DUTY_POSITIVE | PWM_INACTIVE_NEGATIVE;
158 }
159 writel(ctrl, pc->base + pc->data->regs.ctrl);
Beniamino Galvani101353c2014-06-21 16:22:06 +0200160}
161
David Wua9001522017-03-01 19:10:55 +0800162static int rockchip_pwm_enable(struct pwm_chip *chip,
David Wubc834d72017-08-08 23:38:32 +0800163 struct pwm_device *pwm,
164 bool enable,
165 u32 enable_conf)
David Wua9001522017-03-01 19:10:55 +0800166{
167 struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
168 int ret;
David Wued054692017-08-08 23:38:31 +0800169 u32 val;
David Wua9001522017-03-01 19:10:55 +0800170
171 if (enable) {
172 ret = clk_enable(pc->clk);
173 if (ret)
174 return ret;
175 }
176
David Wued054692017-08-08 23:38:31 +0800177 val = readl_relaxed(pc->base + pc->data->regs.ctrl);
178
179 if (enable)
180 val |= enable_conf;
181 else
182 val &= ~enable_conf;
183
184 writel_relaxed(val, pc->base + pc->data->regs.ctrl);
David Wua9001522017-03-01 19:10:55 +0800185
186 if (!enable)
187 clk_disable(pc->clk);
188
189 return 0;
190}
191
David Wued054692017-08-08 23:38:31 +0800192static int rockchip_pwm_apply_v1(struct pwm_chip *chip, struct pwm_device *pwm,
193 struct pwm_state *state)
Beniamino Galvani101353c2014-06-21 16:22:06 +0200194{
David Wued054692017-08-08 23:38:31 +0800195 u32 enable_conf = PWM_CTRL_OUTPUT_EN | PWM_CTRL_TIMER_EN;
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200196 struct pwm_state curstate;
197 bool enabled;
David Wued054692017-08-08 23:38:31 +0800198 int ret = 0;
Beniamino Galvani101353c2014-06-21 16:22:06 +0200199
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200200 pwm_get_state(pwm, &curstate);
201 enabled = curstate.enabled;
202
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200203 if (state->polarity != curstate.polarity && enabled) {
David Wubc834d72017-08-08 23:38:32 +0800204 ret = rockchip_pwm_enable(chip, pwm, false, enable_conf);
David Wua9001522017-03-01 19:10:55 +0800205 if (ret)
David Wued054692017-08-08 23:38:31 +0800206 return ret;
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200207 enabled = false;
208 }
Beniamino Galvani101353c2014-06-21 16:22:06 +0200209
David Wubc834d72017-08-08 23:38:32 +0800210 rockchip_pwm_config(chip, pwm, state);
Beniamino Galvani101353c2014-06-21 16:22:06 +0200211
David Wued054692017-08-08 23:38:31 +0800212 if (state->enabled != enabled)
David Wua9001522017-03-01 19:10:55 +0800213 ret = rockchip_pwm_enable(chip, pwm, state->enabled,
David Wubc834d72017-08-08 23:38:32 +0800214 enable_conf);
David Wued054692017-08-08 23:38:31 +0800215
216 return ret;
217}
218
219static int rockchip_pwm_apply_v2(struct pwm_chip *chip, struct pwm_device *pwm,
220 struct pwm_state *state)
221{
222 u32 enable_conf = PWM_OUTPUT_LEFT | PWM_LP_DISABLE | PWM_ENABLE |
223 PWM_CONTINUOUS;
224 struct pwm_state curstate;
225 bool enabled;
226 int ret = 0;
227
228 pwm_get_state(pwm, &curstate);
229 enabled = curstate.enabled;
230
231 if (state->polarity != curstate.polarity && enabled) {
David Wubc834d72017-08-08 23:38:32 +0800232 ret = rockchip_pwm_enable(chip, pwm, false, enable_conf);
David Wua9001522017-03-01 19:10:55 +0800233 if (ret)
David Wued054692017-08-08 23:38:31 +0800234 return ret;
235 enabled = false;
David Wua9001522017-03-01 19:10:55 +0800236 }
Beniamino Galvani101353c2014-06-21 16:22:06 +0200237
David Wubc834d72017-08-08 23:38:32 +0800238 rockchip_pwm_config(chip, pwm, state);
David Wued054692017-08-08 23:38:31 +0800239
240 if (state->enabled != enabled)
241 ret = rockchip_pwm_enable(chip, pwm, state->enabled,
David Wubc834d72017-08-08 23:38:32 +0800242 enable_conf);
David Wued054692017-08-08 23:38:31 +0800243
244 return ret;
245}
246
247static int rockchip_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
248 struct pwm_state *state)
249{
250 struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
251 int ret;
252
253 ret = clk_enable(pc->pclk);
254 if (ret)
255 return ret;
256
257 ret = pc->data->pwm_apply(chip, pwm, state);
258 if (ret)
259 goto out;
260
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200261 /*
262 * Update the state with the real hardware, which can differ a bit
263 * because of period/duty_cycle approximation.
264 */
265 rockchip_pwm_get_state(chip, pwm, state);
266
267out:
David Wu27922ff52017-08-08 23:38:29 +0800268 clk_disable(pc->pclk);
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200269
270 return ret;
Beniamino Galvani101353c2014-06-21 16:22:06 +0200271}
272
Doug Anderson72643542014-08-25 15:59:25 -0700273static const struct pwm_ops rockchip_pwm_ops_v1 = {
Boris Brezillon1ebb74c2016-06-14 11:13:12 +0200274 .get_state = rockchip_pwm_get_state,
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200275 .apply = rockchip_pwm_apply,
Beniamino Galvani101353c2014-06-21 16:22:06 +0200276 .owner = THIS_MODULE,
277};
278
Doug Anderson72643542014-08-25 15:59:25 -0700279static const struct pwm_ops rockchip_pwm_ops_v2 = {
Boris Brezillon1ebb74c2016-06-14 11:13:12 +0200280 .get_state = rockchip_pwm_get_state,
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200281 .apply = rockchip_pwm_apply,
Doug Anderson72643542014-08-25 15:59:25 -0700282 .owner = THIS_MODULE,
283};
284
Caesar Wangf6306292014-08-08 15:28:49 +0800285static const struct rockchip_pwm_data pwm_data_v1 = {
286 .regs = {
287 .duty = 0x04,
288 .period = 0x08,
289 .cntr = 0x00,
290 .ctrl = 0x0c,
291 },
292 .prescaler = 2,
Doug Anderson72643542014-08-25 15:59:25 -0700293 .ops = &rockchip_pwm_ops_v1,
Boris Brezillon1ebb74c2016-06-14 11:13:12 +0200294 .get_state = rockchip_pwm_get_state_v1,
David Wued054692017-08-08 23:38:31 +0800295 .pwm_apply = rockchip_pwm_apply_v1,
Caesar Wangf6306292014-08-08 15:28:49 +0800296};
297
298static const struct rockchip_pwm_data pwm_data_v2 = {
299 .regs = {
300 .duty = 0x08,
301 .period = 0x04,
302 .cntr = 0x00,
303 .ctrl = 0x0c,
304 },
305 .prescaler = 1,
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200306 .supports_polarity = true,
Doug Anderson72643542014-08-25 15:59:25 -0700307 .ops = &rockchip_pwm_ops_v2,
Boris Brezillon1ebb74c2016-06-14 11:13:12 +0200308 .get_state = rockchip_pwm_get_state_v2,
David Wued054692017-08-08 23:38:31 +0800309 .pwm_apply = rockchip_pwm_apply_v2,
Caesar Wangf6306292014-08-08 15:28:49 +0800310};
311
312static const struct rockchip_pwm_data pwm_data_vop = {
313 .regs = {
314 .duty = 0x08,
315 .period = 0x04,
316 .cntr = 0x0c,
317 .ctrl = 0x00,
318 },
319 .prescaler = 1,
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200320 .supports_polarity = true,
Doug Anderson72643542014-08-25 15:59:25 -0700321 .ops = &rockchip_pwm_ops_v2,
Boris Brezillon1ebb74c2016-06-14 11:13:12 +0200322 .get_state = rockchip_pwm_get_state_v2,
David Wued054692017-08-08 23:38:31 +0800323 .pwm_apply = rockchip_pwm_apply_v2,
Caesar Wangf6306292014-08-08 15:28:49 +0800324};
325
326static const struct of_device_id rockchip_pwm_dt_ids[] = {
327 { .compatible = "rockchip,rk2928-pwm", .data = &pwm_data_v1},
328 { .compatible = "rockchip,rk3288-pwm", .data = &pwm_data_v2},
329 { .compatible = "rockchip,vop-pwm", .data = &pwm_data_vop},
330 { /* sentinel */ }
331};
332MODULE_DEVICE_TABLE(of, rockchip_pwm_dt_ids);
333
Beniamino Galvani101353c2014-06-21 16:22:06 +0200334static int rockchip_pwm_probe(struct platform_device *pdev)
335{
Caesar Wangf6306292014-08-08 15:28:49 +0800336 const struct of_device_id *id;
Beniamino Galvani101353c2014-06-21 16:22:06 +0200337 struct rockchip_pwm_chip *pc;
338 struct resource *r;
David Wu27922ff52017-08-08 23:38:29 +0800339 int ret, count;
Beniamino Galvani101353c2014-06-21 16:22:06 +0200340
Caesar Wangf6306292014-08-08 15:28:49 +0800341 id = of_match_device(rockchip_pwm_dt_ids, &pdev->dev);
342 if (!id)
343 return -EINVAL;
344
Beniamino Galvani101353c2014-06-21 16:22:06 +0200345 pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
346 if (!pc)
347 return -ENOMEM;
348
349 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
350 pc->base = devm_ioremap_resource(&pdev->dev, r);
351 if (IS_ERR(pc->base))
352 return PTR_ERR(pc->base);
353
David Wu27922ff52017-08-08 23:38:29 +0800354 pc->clk = devm_clk_get(&pdev->dev, "pwm");
355 if (IS_ERR(pc->clk)) {
356 pc->clk = devm_clk_get(&pdev->dev, NULL);
357 if (IS_ERR(pc->clk)) {
358 ret = PTR_ERR(pc->clk);
359 if (ret != -EPROBE_DEFER)
360 dev_err(&pdev->dev, "Can't get bus clk: %d\n",
361 ret);
362 return ret;
363 }
364 }
365
366 count = of_count_phandle_with_args(pdev->dev.of_node,
367 "clocks", "#clock-cells");
368 if (count == 2)
369 pc->pclk = devm_clk_get(&pdev->dev, "pclk");
370 else
371 pc->pclk = pc->clk;
372
373 if (IS_ERR(pc->pclk)) {
374 ret = PTR_ERR(pc->pclk);
375 if (ret != -EPROBE_DEFER)
376 dev_err(&pdev->dev, "Can't get APB clk: %d\n", ret);
377 return ret;
378 }
Beniamino Galvani101353c2014-06-21 16:22:06 +0200379
Boris Brezillon48cf9732016-06-14 11:13:13 +0200380 ret = clk_prepare_enable(pc->clk);
David Wu27922ff52017-08-08 23:38:29 +0800381 if (ret) {
382 dev_err(&pdev->dev, "Can't prepare enable bus clk: %d\n", ret);
Beniamino Galvani101353c2014-06-21 16:22:06 +0200383 return ret;
David Wu27922ff52017-08-08 23:38:29 +0800384 }
385
386 ret = clk_prepare(pc->pclk);
387 if (ret) {
388 dev_err(&pdev->dev, "Can't prepare APB clk: %d\n", ret);
389 goto err_clk;
390 }
Beniamino Galvani101353c2014-06-21 16:22:06 +0200391
392 platform_set_drvdata(pdev, pc);
393
Caesar Wangf6306292014-08-08 15:28:49 +0800394 pc->data = id->data;
Beniamino Galvani101353c2014-06-21 16:22:06 +0200395 pc->chip.dev = &pdev->dev;
Doug Anderson72643542014-08-25 15:59:25 -0700396 pc->chip.ops = pc->data->ops;
Beniamino Galvani101353c2014-06-21 16:22:06 +0200397 pc->chip.base = -1;
398 pc->chip.npwm = 1;
399
Boris Brezillon2bf1c982016-06-14 11:13:14 +0200400 if (pc->data->supports_polarity) {
Doug Anderson72643542014-08-25 15:59:25 -0700401 pc->chip.of_xlate = of_pwm_xlate_with_flags;
402 pc->chip.of_pwm_n_cells = 3;
403 }
404
Beniamino Galvani101353c2014-06-21 16:22:06 +0200405 ret = pwmchip_add(&pc->chip);
406 if (ret < 0) {
407 clk_unprepare(pc->clk);
408 dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
David Wu27922ff52017-08-08 23:38:29 +0800409 goto err_pclk;
Beniamino Galvani101353c2014-06-21 16:22:06 +0200410 }
411
Boris Brezillon48cf9732016-06-14 11:13:13 +0200412 /* Keep the PWM clk enabled if the PWM appears to be up and running. */
413 if (!pwm_is_enabled(pc->chip.pwms))
414 clk_disable(pc->clk);
415
David Wu27922ff52017-08-08 23:38:29 +0800416 return 0;
417
418err_pclk:
419 clk_unprepare(pc->pclk);
420err_clk:
421 clk_disable_unprepare(pc->clk);
422
Beniamino Galvani101353c2014-06-21 16:22:06 +0200423 return ret;
424}
425
426static int rockchip_pwm_remove(struct platform_device *pdev)
427{
428 struct rockchip_pwm_chip *pc = platform_get_drvdata(pdev);
429
Boris Brezillon48cf9732016-06-14 11:13:13 +0200430 /*
431 * Disable the PWM clk before unpreparing it if the PWM device is still
432 * running. This should only happen when the last PWM user left it
433 * enabled, or when nobody requested a PWM that was previously enabled
434 * by the bootloader.
435 *
436 * FIXME: Maybe the core should disable all PWM devices in
437 * pwmchip_remove(). In this case we'd only have to call
438 * clk_unprepare() after pwmchip_remove().
439 *
440 */
441 if (pwm_is_enabled(pc->chip.pwms))
442 clk_disable(pc->clk);
443
David Wu27922ff52017-08-08 23:38:29 +0800444 clk_unprepare(pc->pclk);
Beniamino Galvani101353c2014-06-21 16:22:06 +0200445 clk_unprepare(pc->clk);
446
447 return pwmchip_remove(&pc->chip);
448}
449
Beniamino Galvani101353c2014-06-21 16:22:06 +0200450static struct platform_driver rockchip_pwm_driver = {
451 .driver = {
452 .name = "rockchip-pwm",
453 .of_match_table = rockchip_pwm_dt_ids,
454 },
455 .probe = rockchip_pwm_probe,
456 .remove = rockchip_pwm_remove,
457};
458module_platform_driver(rockchip_pwm_driver);
459
460MODULE_AUTHOR("Beniamino Galvani <b.galvani@gmail.com>");
461MODULE_DESCRIPTION("Rockchip SoC PWM driver");
462MODULE_LICENSE("GPL v2");