From: Lee Jones <lee.jones@linaro.org>
To: "Opensource [Steve Twiss]" <stwiss.opensource@diasemi.com>
Cc: LINUXKERNEL <linux-kernel@vger.kernel.org>,
Samuel Ortiz <sameo@linux.intel.com>,
Alessandro Zummo <a.zummo@towertech.it>,
DEVICETREE <devicetree@vger.kernel.org>,
David Dajun Chen <david.chen@diasemi.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
LINUXINPUT <linux-input@vger.kernel.org>,
LINUXWATCHDOG <linux-watchdog@vger.kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Pawel Moll <pawel.moll@arm.com>,
RTCLINUX <rtc-linux@googlegroups.com>,
Rob Herring <robh+dt@kernel.org>,
Support Opensource <Support.Opensource@diasemi.com>,
Wim Van Sebroeck <wim@iguana.be>
Subject: Re: [PATCH V3 1/4] mfd: da9062: DA9062 MFD core driver
Date: Thu, 11 Jun 2015 09:56:53 +0100 [thread overview]
Message-ID: <20150611085653.GG2982@x1> (raw)
In-Reply-To: <6ED8E3B22081A4459DAC7699F3695FB7014B22F4C4@SW-EX-MBX02.diasemi.com>
> > > > 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
> >
> > [...]
> >
> > > > +/*
> > > > + * Registers
> > > > + */
> > >
> > > Really? ;)
> > >
> > > > +#define DA9062AA_PAGE_CON 0x000
> > > > +#define DA9062AA_STATUS_A 0x001
> > > > +#define DA9062AA_STATUS_B 0x002
> >
> > [...]
> >
> > > > +
> > > > +/*
> > > > + * Bit fields
> > > > + */
> > > > +
> > > > +/* DA9062AA_PAGE_CON = 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).
> > >
> >
> > For the two comments above "Registers" and "Bit fields" and the (1<<x)
> > 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.
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 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.
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. ;)
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow 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
next prev parent reply other threads:[~2015-06-11 8:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 13:10 [PATCH V3 0/4] da9062: DA9062 driver submission S Twiss
[not found] ` <cover.1432041031.git.stwiss.opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2015-05-19 13:10 ` [PATCH V3 1/4] mfd: da9062: DA9062 MFD core driver S Twiss
2015-05-26 16:10 ` Lee Jones
2015-05-28 12:52 ` Opensource [Steve Twiss]
2015-06-11 8:27 ` Opensource [Steve Twiss]
2015-06-11 8:50 ` Lee Jones
2015-06-11 8:56 ` Lee Jones [this message]
2015-06-11 9:27 ` Opensource [Steve Twiss]
2015-06-11 21:46 ` [rtc-linux] " Alexandre Belloni
2015-06-29 8:01 ` Opensource [Steve Twiss]
2015-07-01 8:02 ` Lee Jones
2015-05-19 13:10 ` [PATCH V3 4/4] devicetree: da9062: Add bindings for DA9062 driver S Twiss
2015-05-19 13:10 ` [PATCH V3 2/4] regulator: da9062: DA9062 regulator driver S Twiss
2015-05-21 12:04 ` Mark Brown
2015-05-21 13:48 ` Opensource [Steve Twiss]
2015-05-19 13:10 ` [PATCH V3 3/4] watchdog: da9062: DA9062 watchdog driver S Twiss
[not found] ` <ded171f203fe1d0c72f0d7ea4c3d54257f4e970e.1432041031.git.stwiss.opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2015-05-20 20:30 ` Guenter Roeck
[not found] ` <20150520203016.GA5710-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-05-21 7:15 ` Opensource [Steve Twiss]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150611085653.GG2982@x1 \
--to=lee.jones@linaro.org \
--cc=Support.Opensource@diasemi.com \
--cc=a.zummo@towertech.it \
--cc=broonie@kernel.org \
--cc=david.chen@diasemi.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=lgirdwood@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=sameo@linux.intel.com \
--cc=stwiss.opensource@diasemi.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).