[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1519300881-8136-5-git-send-email-claudiu.beznea@microchip.com>
Date: Thu, 22 Feb 2018 14:01:15 +0200
From: Claudiu Beznea <claudiu.beznea@...rochip.com>
To: <thierry.reding@...il.com>, <shc_work@...l.ru>, <kgene@...nel.org>,
<krzk@...nel.org>, <linux@...linux.org.uk>,
<mturquette@...libre.com>, <sboyd@...eaurora.org>,
<jani.nikula@...ux.intel.com>, <joonas.lahtinen@...ux.intel.com>,
<rodrigo.vivi@...el.com>, <airlied@...ux.ie>, <kamil@...as.org>,
<b.zolnierkie@...sung.com>, <jdelvare@...e.com>,
<linux@...ck-us.net>, <dmitry.torokhov@...il.com>,
<rpurdie@...ys.net>, <jacek.anaszewski@...il.com>, <pavel@....cz>,
<mchehab@...nel.org>, <sean@...s.org>, <lee.jones@...aro.org>,
<daniel.thompson@...aro.org>, <jingoohan1@...il.com>,
<milo.kim@...com>, <robh+dt@...nel.org>, <mark.rutland@....com>,
<corbet@....net>, <nicolas.ferre@...rochip.com>,
<alexandre.belloni@...e-electrons.com>
CC: <linux-pwm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-samsung-soc@...r.kernel.org>, <linux-clk@...r.kernel.org>,
<intel-gfx@...ts.freedesktop.org>,
<dri-devel@...ts.freedesktop.org>, <linux-hwmon@...r.kernel.org>,
<linux-input@...r.kernel.org>, <linux-leds@...r.kernel.org>,
<linux-media@...r.kernel.org>, <linux-fbdev@...r.kernel.org>,
<devicetree@...r.kernel.org>, <linux-doc@...r.kernel.org>,
Claudiu Beznea <claudiu.beznea@...rochip.com>
Subject: [PATCH v3 04/10] pwm: pxa: populate PWM mode in of_xlate function
Populate PWM mode in of_xlate function to avoid pwm_apply_state() failure.
Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
---
drivers/pwm/pwm-pxa.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
index 4143a46684d2..7a035716e054 100644
--- a/drivers/pwm/pwm-pxa.c
+++ b/drivers/pwm/pwm-pxa.c
@@ -155,12 +155,16 @@ static struct pwm_device *
pxa_pwm_of_xlate(struct pwm_chip *pc, const struct of_phandle_args *args)
{
struct pwm_device *pwm;
+ struct pwm_caps caps;
pwm = pwm_request_from_chip(pc, 0, NULL);
if (IS_ERR(pwm))
return pwm;
+ pwm_get_caps(pc, pwm, &caps);
+
pwm->args.period = args->args[0];
+ pwm->args.mode = BIT(ffs(caps.modes) - 1);
return pwm;
}
--
2.7.4
Powered by blists - more mailing lists