aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pwm/pwm-sun4i.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
index d6c1b3a5f2a6..470d4f71e7eb 100644
--- a/drivers/pwm/pwm-sun4i.c
+++ b/drivers/pwm/pwm-sun4i.c
@@ -312,27 +312,17 @@ static const struct pwm_ops sun4i_pwm_ops = {
312 .owner = THIS_MODULE, 312 .owner = THIS_MODULE,
313}; 313};
314 314
315static const struct sun4i_pwm_data sun4i_pwm_data_a10 = { 315static const struct sun4i_pwm_data sun4i_pwm_dual_nobypass = {
316 .has_prescaler_bypass = false, 316 .has_prescaler_bypass = false,
317 .npwm = 2, 317 .npwm = 2,
318}; 318};
319 319
320static const struct sun4i_pwm_data sun4i_pwm_data_a10s = { 320static const struct sun4i_pwm_data sun4i_pwm_dual_bypass = {
321 .has_prescaler_bypass = true, 321 .has_prescaler_bypass = true,
322 .npwm = 2, 322 .npwm = 2,
323}; 323};
324 324
325static const struct sun4i_pwm_data sun4i_pwm_data_a13 = { 325static const struct sun4i_pwm_data sun4i_pwm_single_bypass = {
326 .has_prescaler_bypass = true,
327 .npwm = 1,
328};
329
330static const struct sun4i_pwm_data sun4i_pwm_data_a20 = {
331 .has_prescaler_bypass = true,
332 .npwm = 2,
333};
334
335static const struct sun4i_pwm_data sun4i_pwm_data_h3 = {
336 .has_prescaler_bypass = true, 326 .has_prescaler_bypass = true,
337 .npwm = 1, 327 .npwm = 1,
338}; 328};
@@ -340,19 +330,19 @@ static const struct sun4i_pwm_data sun4i_pwm_data_h3 = {
340static const struct of_device_id sun4i_pwm_dt_ids[] = { 330static const struct of_device_id sun4i_pwm_dt_ids[] = {
341 { 331 {
342 .compatible = "allwinner,sun4i-a10-pwm", 332 .compatible = "allwinner,sun4i-a10-pwm",
343 .data = &sun4i_pwm_data_a10, 333 .data = &sun4i_pwm_dual_nobypass,
344 }, { 334 }, {
345 .compatible = "allwinner,sun5i-a10s-pwm", 335 .compatible = "allwinner,sun5i-a10s-pwm",
346 .data = &sun4i_pwm_data_a10s, 336 .data = &sun4i_pwm_dual_bypass,
347 }, { 337 }, {
348 .compatible = "allwinner,sun5i-a13-pwm", 338 .compatible = "allwinner,sun5i-a13-pwm",
349 .data = &sun4i_pwm_data_a13, 339 .data = &sun4i_pwm_single_bypass,
350 }, { 340 }, {
351 .compatible = "allwinner,sun7i-a20-pwm", 341 .compatible = "allwinner,sun7i-a20-pwm",
352 .data = &sun4i_pwm_data_a20, 342 .data = &sun4i_pwm_dual_bypass,
353 }, { 343 }, {
354 .compatible = "allwinner,sun8i-h3-pwm", 344 .compatible = "allwinner,sun8i-h3-pwm",
355 .data = &sun4i_pwm_data_h3, 345 .data = &sun4i_pwm_single_bypass,
356 }, { 346 }, {
357 /* sentinel */ 347 /* sentinel */
358 }, 348 },