Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1615211 > unrolled thread
| Started by | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| First post | 2017-04-03 15:50 +0200 |
| Last post | 2017-04-03 18:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 3/3] hwmon: pwm-fan: remove no longer needed suspend/resume code Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-04-03 15:50 +0200
Re: [PATCH 3/3] hwmon: pwm-fan: remove no longer needed suspend/resume code Guenter Roeck <linux@roeck-us.net> - 2017-04-03 18:00 +0200
| From | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| Date | 2017-04-03 15:50 +0200 |
| Subject | [PATCH 3/3] hwmon: pwm-fan: remove no longer needed suspend/resume code |
| Message-ID | <tsawO-7yd-5@gated-at.bofh.it> |
The suspend/resume is now properly handled by pwm-samsung driver
(pwm-fan is currently only used by ARM Exynos boards) and the old
code only handles ctx->pwm_value != 0 case. Just remove it.
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
drivers/hwmon/pwm-fan.c | 32 --------------------------------
1 file changed, 32 deletions(-)
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
index f9af393..9dc40f3 100644
--- a/drivers/hwmon/pwm-fan.c
+++ b/drivers/hwmon/pwm-fan.c
@@ -302,37 +302,6 @@ static int pwm_fan_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
-static int pwm_fan_suspend(struct device *dev)
-{
- struct pwm_fan_ctx *ctx = dev_get_drvdata(dev);
-
- if (ctx->pwm_value)
- pwm_disable(ctx->pwm);
- return 0;
-}
-
-static int pwm_fan_resume(struct device *dev)
-{
- struct pwm_fan_ctx *ctx = dev_get_drvdata(dev);
- struct pwm_args pargs;
- unsigned long duty;
- int ret;
-
- if (ctx->pwm_value == 0)
- return 0;
-
- pwm_get_args(ctx->pwm, &pargs);
- duty = DIV_ROUND_UP(ctx->pwm_value * (pargs.period - 1), MAX_PWM);
- ret = pwm_config(ctx->pwm, duty, pargs.period);
- if (ret)
- return ret;
- return pwm_enable(ctx->pwm);
-}
-#endif
-
-static SIMPLE_DEV_PM_OPS(pwm_fan_pm, pwm_fan_suspend, pwm_fan_resume);
-
static const struct of_device_id of_pwm_fan_match[] = {
{ .compatible = "pwm-fan", },
{},
@@ -344,7 +313,6 @@ static int pwm_fan_resume(struct device *dev)
.remove = pwm_fan_remove,
.driver = {
.name = "pwm-fan",
- .pm = &pwm_fan_pm,
.of_match_table = of_pwm_fan_match,
},
};
--
1.9.1
[toc] | [next] | [standalone]
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2017-04-03 18:00 +0200 |
| Subject | Re: [PATCH 3/3] hwmon: pwm-fan: remove no longer needed suspend/resume code |
| Message-ID | <tscyB-nv-5@gated-at.bofh.it> |
| In reply to | #1615211 |
On Mon, Apr 03, 2017 at 03:47:06PM +0200, Bartlomiej Zolnierkiewicz wrote:
> The suspend/resume is now properly handled by pwm-samsung driver
> (pwm-fan is currently only used by ARM Exynos boards) and the old
> code only handles ctx->pwm_value != 0 case. Just remove it.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
I assume this will be picked up with the rest of the series.
If not please let me know.
Guenter
> ---
> drivers/hwmon/pwm-fan.c | 32 --------------------------------
> 1 file changed, 32 deletions(-)
>
> diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
> index f9af393..9dc40f3 100644
> --- a/drivers/hwmon/pwm-fan.c
> +++ b/drivers/hwmon/pwm-fan.c
> @@ -302,37 +302,6 @@ static int pwm_fan_remove(struct platform_device *pdev)
> return 0;
> }
>
> -#ifdef CONFIG_PM_SLEEP
> -static int pwm_fan_suspend(struct device *dev)
> -{
> - struct pwm_fan_ctx *ctx = dev_get_drvdata(dev);
> -
> - if (ctx->pwm_value)
> - pwm_disable(ctx->pwm);
> - return 0;
> -}
> -
> -static int pwm_fan_resume(struct device *dev)
> -{
> - struct pwm_fan_ctx *ctx = dev_get_drvdata(dev);
> - struct pwm_args pargs;
> - unsigned long duty;
> - int ret;
> -
> - if (ctx->pwm_value == 0)
> - return 0;
> -
> - pwm_get_args(ctx->pwm, &pargs);
> - duty = DIV_ROUND_UP(ctx->pwm_value * (pargs.period - 1), MAX_PWM);
> - ret = pwm_config(ctx->pwm, duty, pargs.period);
> - if (ret)
> - return ret;
> - return pwm_enable(ctx->pwm);
> -}
> -#endif
> -
> -static SIMPLE_DEV_PM_OPS(pwm_fan_pm, pwm_fan_suspend, pwm_fan_resume);
> -
> static const struct of_device_id of_pwm_fan_match[] = {
> { .compatible = "pwm-fan", },
> {},
> @@ -344,7 +313,6 @@ static int pwm_fan_resume(struct device *dev)
> .remove = pwm_fan_remove,
> .driver = {
> .name = "pwm-fan",
> - .pm = &pwm_fan_pm,
> .of_match_table = of_pwm_fan_match,
> },
> };
> --
> 1.9.1
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web