From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH V3 1/4] mfd: da9062: DA9062 MFD core driver Date: Thu, 11 Jun 2015 09:56:53 +0100 Message-ID: <20150611085653.GG2982@x1> References: <20150526161024.GQ11677@x1> <6ED8E3B22081A4459DAC7699F3695FB7014B22F4C4@SW-EX-MBX02.diasemi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-wg0-f50.google.com ([74.125.82.50]:35477 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752442AbbFKI45 (ORCPT ); Thu, 11 Jun 2015 04:56:57 -0400 Received: by wgme6 with SMTP id e6so678577wgm.2 for ; Thu, 11 Jun 2015 01:56:56 -0700 (PDT) Content-Disposition: inline In-Reply-To: <6ED8E3B22081A4459DAC7699F3695FB7014B22F4C4@SW-EX-MBX02.diasemi.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: "Opensource [Steve Twiss]" Cc: LINUXKERNEL , Samuel Ortiz , Alessandro Zummo , DEVICETREE , David Dajun Chen , Dmitry Torokhov , Ian Campbell , Kumar Gala , LINUXINPUT , LINUXWATCHDOG , Liam Girdwood , Mark Brown , Mark Rutland , Pawel Moll , RTCLINUX , Rob Herring , Support Opensource , Wim Van Sebroeck > > > > diff --git a/include/linux/mfd/da9062/registers.h > > > b/include/linux/mfd/da9062/registers.h > > > > new file mode 100644 > > > > index 0000000..d07c2bc > > > > --- /dev/null > > > > +++ b/include/linux/mfd/da9062/registers.h > >=20 > > [...] > >=20 > > > > +/* > > > > + * Registers > > > > + */ > > > > > > Really? ;) > > > > > > > +#define DA9062AA_PAGE_CON 0x000 > > > > +#define DA9062AA_STATUS_A 0x001 > > > > +#define DA9062AA_STATUS_B 0x002 > >=20 > > [...] > >=20 > > > > + > > > > +/* > > > > + * Bit fields > > > > + */ > > > > + > > > > +/* DA9062AA_PAGE_CON =3D 0x000 */ > > > > +#define DA9062AA_PAGE_SHIFT 0 > > > > +#define DA9062AA_PAGE_MASK (0x3f << 0) > > > > +#define DA9062AA_WRITE_MODE_SHIFT 6 > > > > +#define DA9062AA_WRITE_MODE_MASK (0x01 << 6) > > > > > > For 1 << X, you should use BIT(X). > > > > >=20 > > For the two comments above "Registers" and "Bit fields" and the (1<= > definitions ... > >=20 > > The whole of this file is automatically generated by our hardware d= esigners > > I would prefer it if the register definitions and bit fields are no= t altered using > > the #define BIT(nr) (1UL<<(nr)) macro and the comments removed beca= use > > we have scripts that can be used to check this file automatically. > >=20 > > Also if the register map is ever updated, then it will be easier fo= r me to diff > > the new delivered register and bit field definitions with the old o= ne. > >=20 > > My preference would be not to change this header file. > >=20 > > [...] > =20 > If these last two things are a problem can you please let me know. I'm still not particularly happy with this. Can yo speak to your H/W guys and get them to change their scripts to output sensible header files? To be honest, it's probably not a blocker for acceptance, but if someon= e writes a patch next week to change all of the (0x01 << X) lines to start using the BIT() macro, I will accept it. Better to influenced your guys so you are not overly inconvenienced. =46WIW, when upstreaming code, the excuse "someone else wrote it", has never been a good one to use on the lists. Believe me, I've tried. ;) --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-input" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html