[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20161011124552.GX3462@lukather>
Date: Tue, 11 Oct 2016 14:45:52 +0200
From: Maxime Ripard <maxime.ripard@...e-electrons.com>
To: Icenowy Zheng <icenowy@...c.xyz>
Cc: Thierry Reding <thierry.reding@...il.com>,
Rob Herring <robh+dt@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Russell King <linux@...linux.org.uk>,
linux-pwm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-sunxi@...glegroups.com
Subject: Re: [PATCH 2/5] pwm: Add Allwinner A31 SoC support
Hi,
On Tue, Oct 11, 2016 at 02:34:46PM +0800, Icenowy Zheng wrote:
> This adds a generic PWM framework driver for the PWM controller found
> on Allwinner A31 and A31s SoCs.
>
> The PWM controller is different with other Allwinner SoCs, with a
> control register per channel (in other SoCs the control register is
> shared), and each channel are allocated 16 bytes of address (but only 8
> bytes are used.)
>
> In order to use the driver for all channels, device nodes should be
> created per channel.
I don't think there's any need for a new driver that duplicates most
of the logic. The bitfields look roughly the same, and the only
difference is the split difference.
This is something that can easily be handled without creating a new
driver using regmap's reg_field, or through an intermediate functino
that returns the register offset.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists