| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Imagination Technologies Pulse Width Modulator driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2014-2015, Imagination Technologies |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Based on drivers/pwm/pwm-tegra.c, Copyright (c) 2010, NVIDIA Corporation |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 10 | | - * the Free Software Foundation; either version 2 of the License. |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | |
|---|
| 13 | 10 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 123 | 120 | } else if (mul <= max_timebase * 512) { |
|---|
| 124 | 121 | div = PWM_CTRL_CFG_SUB_DIV0_DIV1; |
|---|
| 125 | 122 | timebase = DIV_ROUND_UP(mul, 512); |
|---|
| 126 | | - } else if (mul > max_timebase * 512) { |
|---|
| 123 | + } else { |
|---|
| 127 | 124 | dev_err(chip->dev, |
|---|
| 128 | 125 | "failed to configure timebase steps/divider value\n"); |
|---|
| 129 | 126 | return -EINVAL; |
|---|
| .. | .. |
|---|
| 159 | 156 | struct img_pwm_chip *pwm_chip = to_img_pwm_chip(chip); |
|---|
| 160 | 157 | int ret; |
|---|
| 161 | 158 | |
|---|
| 162 | | - ret = pm_runtime_get_sync(chip->dev); |
|---|
| 159 | + ret = pm_runtime_resume_and_get(chip->dev); |
|---|
| 163 | 160 | if (ret < 0) |
|---|
| 164 | 161 | return ret; |
|---|
| 165 | 162 | |
|---|