Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1376696 > unrolled thread
| Started by | Thierry Reding <thierry.reding@gmail.com> |
|---|---|
| First post | 2016-04-12 13:00 +0200 |
| Last post | 2016-04-12 13:00 +0200 |
| Articles | 1 — 1 participant |
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.
Re: [RESEND 10/11] pwm: sti: Enable PWM Capture Thierry Reding <thierry.reding@gmail.com> - 2016-04-12 13:00 +0200
| From | Thierry Reding <thierry.reding@gmail.com> |
|---|---|
| Date | 2016-04-12 13:00 +0200 |
| Subject | Re: [RESEND 10/11] pwm: sti: Enable PWM Capture |
| Message-ID | <rn4d4-68J-3@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Mar 02, 2016 at 03:32:08PM +0000, Lee Jones wrote:
> Once all functionality is in place, we provide the means to
> enable PWM Capture. Here we are simply obtaining the
> associated regmap and twiddling the relevant enable register
> bits.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> drivers/pwm/pwm-sti.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/pwm/pwm-sti.c b/drivers/pwm/pwm-sti.c
> index 8de9b4a..93cf20e 100644
> --- a/drivers/pwm/pwm-sti.c
> +++ b/drivers/pwm/pwm-sti.c
> @@ -279,6 +279,13 @@ static int sti_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
> pwm->hwpwm);
> goto out;
> }
> +
> + ret = regmap_field_write(pc->pwm_cpt_en, 1);
> + if (ret) {
> + dev_err(dev, "failed to enable PWM capture:%d\n",
> + pwm->hwpwm);
> + goto out;
> + }
Should this perhaps be part of the driver's ->capture() implementation?
It seems redundant to have this logic enabled if we may never use it.
Thierry
Back to top | Article view | linux.kernel
csiph-web