[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160607172619.GB130037@google.com>
Date: Tue, 7 Jun 2016 10:26:19 -0700
From: Brian Norris <briannorris@...omium.org>
To: Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc: Thierry Reding <thierry.reding@...il.com>,
linux-pwm@...r.kernel.org, Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Heiko Stuebner <heiko@...ech.de>,
linux-rockchip@...ts.infradead.org,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Milo Kim <milo.kim@...com>,
Doug Anderson <dianders@...gle.com>,
Caesar Wang <wxt@...k-chips.com>,
Stephen Barber <smbarber@...omium.org>,
Ajit Pal Singh <ajitpal.singh@...com>,
Srinivas Kandagatla <srinivas.kandagatla@...il.com>,
Maxime Coquelin <maxime.coquelin@...com>,
Patrice Chotard <patrice.chotard@...com>, kernel@...inux.com
Subject: Re: [PATCH 04/14] pwm: rockchip: Add support for hardware readout
On Sat, Jun 04, 2016 at 08:24:26AM +0200, Boris Brezillon wrote:
> On Fri, 3 Jun 2016 13:20:06 -0700 Brian Norris <briannorris@...omium.org> wrote:
> > On Fri, Jun 03, 2016 at 10:23:02AM +0200, Boris Brezillon wrote:
> > > @@ -75,6 +77,19 @@ static void rockchip_pwm_set_enable_v1(struct pwm_chip *chip,
> > > writel_relaxed(val, pc->base + pc->data->regs.ctrl);
> > > }
> > >
> > > +static void rockchip_pwm_get_state_v1(struct pwm_chip *chip,
> > > + struct pwm_device *pwm,
> > > + struct pwm_state *state)
> > > +{
> > > + struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
> > > + u32 enable_conf = PWM_CTRL_OUTPUT_EN | PWM_CTRL_TIMER_EN;
> > > + u32 val;
> > > +
> > > + val = readl(pc->base + pc->data->regs.ctrl);
> >
> > Nit: I just noticed you've been starting to use readl()/writel() in this
> > series, where previously {readl,writel}_relaxed() were being used. Any
> > reason?
>
> Because I'm lazy and usually don't take the time to think whether it's
> safe of not to use the _relaxed() versions :-). Not sure you'll have a
> noticeable improvement by using _relaxed() for a PWM device by the
> way, but I can change that ;-).
I just figured consistency would be nice.
Brian
Powered by blists - more mailing lists