Bugzilla – Attachment 728064 Details for
Bug 1043231
Kernel build failed at armv7hl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
0006-input-misc-max77693-Use-pwm_get_args-where-appropria.patch
0006-input-misc-max77693-Use-pwm_get_args-where-appropria.patch (text/plain), 3.03 KB, created by
Matwey Kornilov
on 2017-06-07 19:35:44 UTC
(
hide
)
Description:
0006-input-misc-max77693-Use-pwm_get_args-where-appropria.patch
Filename:
MIME Type:
Creator:
Matwey Kornilov
Created:
2017-06-07 19:35:44 UTC
Size:
3.03 KB
patch
obsolete
>From 7f4eaa1196385035eef072101e8712d2565bca09 Mon Sep 17 00:00:00 2001 >From: Boris Brezillon <boris.brezillon@free-electrons.com> >Date: Thu, 14 Apr 2016 21:17:25 +0200 >Subject: [PATCH 06/19] input: misc: max77693: Use pwm_get_args() where > appropriate > >The PWM framework has clarified the concept of reference PWM config (the >platform dependent config retrieved from the DT or the PWM lookup table) >and real PWM state. > >Use pwm_get_args() when the PWM user wants to retrieve this reference >config and not the current state. > >This is part of the rework allowing the PWM framework to support >hardware readout and expose real PWM state even when the PWM has just >been requested (before the user calls pwm_config/enable/disable()). > >Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> >Signed-off-by: Thierry Reding <thierry.reding@gmail.com> >Git-commit: ad4e9fec143c453cae145d7d5ccac902c37fb912 >Patch-mainline: v4.7-rc1 >Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com> >--- > drivers/input/misc/max77693-haptic.c | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > >diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c >index 6d96bff32a0e..29ddeb7be84b 100644 >--- a/drivers/input/misc/max77693-haptic.c >+++ b/drivers/input/misc/max77693-haptic.c >@@ -70,10 +70,13 @@ struct max77693_haptic { > > static int max77693_haptic_set_duty_cycle(struct max77693_haptic *haptic) > { >- int delta = (haptic->pwm_dev->period + haptic->pwm_duty) / 2; >+ struct pwm_args pargs; >+ int delta; > int error; > >- error = pwm_config(haptic->pwm_dev, delta, haptic->pwm_dev->period); >+ pwm_get_args(haptic->pwm_dev, &pargs); >+ delta = (pargs.period + haptic->pwm_duty) / 2; >+ error = pwm_config(haptic->pwm_dev, delta, pargs.period); > if (error) { > dev_err(haptic->dev, "failed to configure pwm: %d\n", error); > return error; >@@ -234,6 +237,7 @@ static int max77693_haptic_play_effect(struct input_dev *dev, void *data, > struct ff_effect *effect) > { > struct max77693_haptic *haptic = input_get_drvdata(dev); >+ struct pwm_args pargs; > u64 period_mag_multi; > > haptic->magnitude = effect->u.rumble.strong_magnitude; >@@ -245,7 +249,8 @@ static int max77693_haptic_play_effect(struct input_dev *dev, void *data, > * The formula to convert magnitude to pwm_duty as follows: > * - pwm_duty = (magnitude * pwm_period) / MAX_MAGNITUDE(0xFFFF) > */ >- period_mag_multi = (u64)haptic->pwm_dev->period * haptic->magnitude; >+ pwm_get_args(haptic->pwm_dev, &pargs); >+ period_mag_multi = (u64)pargs.period * haptic->magnitude; > haptic->pwm_duty = (unsigned int)(period_mag_multi >> > MAX_MAGNITUDE_SHIFT); > >@@ -329,6 +334,12 @@ static int max77693_haptic_probe(struct platform_device *pdev) > return PTR_ERR(haptic->pwm_dev); > } > >+ /* >+ * FIXME: pwm_apply_args() should be removed when switching to the >+ * atomic PWM API. >+ */ >+ pwm_apply_args(haptic->pwm_dev); >+ > haptic->motor_reg = devm_regulator_get(&pdev->dev, "haptic"); > if (IS_ERR(haptic->motor_reg)) { > dev_err(&pdev->dev, "failed to get regulator\n"); >-- >2.12.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 1043231
:
728059
|
728060
|
728061
|
728062
|
728063
| 728064 |
728065
|
728066
|
728067
|
728068
|
728069
|
728070
|
728071
|
728072
|
728073
|
728074
|
728075
|
728076
|
728077
|
728521
|
728695
|
728770