Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752883AbbFKJ2L (ORCPT ); Thu, 11 Jun 2015 05:28:11 -0400 Received: from mail1.bemta5.messagelabs.com ([195.245.231.151]:29369 "EHLO mail1.bemta5.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbbFKJ17 (ORCPT ); Thu, 11 Jun 2015 05:27:59 -0400 X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-13.tower-180.messagelabs.com!1434014866!37398465!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=-,-,- X-VirusChecked: Checked From: "Opensource [Steve Twiss]" To: Lee Jones 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 Subject: RE: [PATCH V3 1/4] mfd: da9062: DA9062 MFD core driver Thread-Topic: [PATCH V3 1/4] mfd: da9062: DA9062 MFD core driver Thread-Index: AQHQkje+BbbztfyjIkOz27ag7HsO6Z2OZ74AgALzVjCAFbuuAP///SqAgAAVEsA= Date: Thu, 11 Jun 2015 09:27:45 +0000 Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7014B22F4DC@SW-EX-MBX02.diasemi.com> References: <20150526161024.GQ11677@x1> <6ED8E3B22081A4459DAC7699F3695FB7014B22F4C4@SW-EX-MBX02.diasemi.com> <20150611085653.GG2982@x1> In-Reply-To: <20150611085653.GG2982@x1> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.26.77] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t5B9SFGM009707 Content-Length: 2424 Lines: 66 On 11 June 2015 09:57 Lee Jones wrote: > To: Opensource [Steve Twiss] > Subject: Re: [PATCH V3 1/4] mfd: da9062: DA9062 MFD core driver > > > > > > diff --git a/include/linux/mfd/da9062/registers.h [...] > > > > > +#define DA9062AA_WRITE_MODE_SHIFT 6 > > > > > +#define DA9062AA_WRITE_MODE_MASK (0x01 << 6) > > > > > > > > For 1 << X, you should use BIT(X). > > > > > > > > > > For the two comments above "Registers" and "Bit fields" and the (1< > > definitions ... > > > > > > The whole of this file is automatically generated by our hardware designers > > > I would prefer it if the register definitions and bit fields are not altered using > > > the #define BIT(nr) (1UL<<(nr)) macro and the comments removed because > > > we have scripts that can be used to check this file automatically. > > > > > > Also if the register map is ever updated, then it will be easier for me to diff > > > the new delivered register and bit field definitions with the old one. > > > > > > My preference would be not to change this header file. > > > > > > [...] > > > > If these last two things are a problem can you please let me know. HI Lee, Thanks for replying so quickly. > 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? Ah. Ok. For our side, the generated headers might not just be used for Linux. I've just discussed this with my colleagues and they will need it to remain. So I guess internally we will keep the headers like this, but as it enters my submission process I can change it for the Linux community. > To be honest, it's probably not a blocker for acceptance, but if someone > 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. Yep: I will change this BIT() macro for the submissions in future. Depending on the next step, I will send a patch to this or update the submission if there are further comments on this patch set. > FWIW, 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. ;) heh okay :) Regards, Steve ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?