From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753364AbcJKMqF (ORCPT ); Tue, 11 Oct 2016 08:46:05 -0400 Received: from down.free-electrons.com ([37.187.137.238]:37144 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752374AbcJKMqB (ORCPT ); Tue, 11 Oct 2016 08:46:01 -0400 Date: Tue, 11 Oct 2016 14:45:52 +0200 From: Maxime Ripard To: Icenowy Zheng Cc: Thierry Reding , Rob Herring , Chen-Yu Tsai , Russell King , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH 2/5] pwm: Add Allwinner A31 SoC support Message-ID: <20161011124552.GX3462@lukather> References: <20161011063449.54775-1-icenowy@aosc.xyz> <20161011063449.54775-2-icenowy@aosc.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iXVVnr8Hn1WiTnFI" Content-Disposition: inline In-Reply-To: <20161011063449.54775-2-icenowy@aosc.xyz> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --iXVVnr8Hn1WiTnFI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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.) >=20 > 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 --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --iXVVnr8Hn1WiTnFI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJX/N8AAAoJEBx+YmzsjxAgftcP/0oG4pWW5JgfKbClyLnEqsTF IvMSySSqzULixAXWHfPSUwyqXFPJUSImIFHm6iREk3T0p96VWTcOR/OHJ2wjx6UG dh32mI20aNAZ9qn42oQPclPFguYVvWbGd8jMS1Y8hjTljHHHbCRCdvdqSDUx7TrD aV1D7G13VJAR0Xe4t8WtbuxxKJ9dm8OSDqcNtY6ezXy1oPQTJ+8AAxZenN6C7vDE ljadllAaa+nP0xKZ/CCDwV8rdH5el/u23ZKOnSFrSs+a9+uVfM7frNXz5VJpOK8G k536T84jAaXshyWZMpYyILG2P1/avvK+7/q7u1L8OoqoBaZK8Ysa5xJR5vfiSAJs CZbdpQc2PgaBHL0ZP1nNm2/UmWC2rFsMjtzZU+EmoDx2cn1j26WPdtb2IicKsZgR mLTGrfzFi6B46lxO5p0JfsjI/h1lkxuy3UkaHGd8mtSYiI3ffp4tW1sg750H32jq Vd9f+ME1BjilNKuJ8s+3joodfZrWKXTQVkZgvBMDMFiOAji3pNMvhNU1TUnoK0j2 vpr+F5y9rzc7iKWgsM4CHedQCSQtM5iumZQgnZVi/x7GxaKFCuW5EA3BcqqHeGMZ Jwm3ATOOetWEtAzINz/UAaesNw5LbTsJpb1zZT2wQ5yHvahdnAVzLD3IS4LqsIXw StHADVeUXDGbd0WdtGVc =zGR6 -----END PGP SIGNATURE----- --iXVVnr8Hn1WiTnFI--