LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "Olof Johansson" <olof@lixom.net>,
	"Arnd Bergmann" <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, "Rob Herring" <robh+dt@kernel.org>,
	"Eddie Huang" <eddie.huang@mediatek.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Samuel Ortiz" <sameo@linux.intel.com>,
	"Yingjoe Chen (陳英洲)" <Yingjoe.Chen@mediatek.com>,
	"Henry Chen" <henryc.chen@mediatek.com>,
	"YH Chen (陳昱豪)" <yh.chen@mediatek.com>,
	"Flora Fu" <flora.fu@mediatek.com>
Subject: Re: [PATCH 7/7] mfd: Add support for the MediaTek MT6397 PMIC
Date: Mon, 26 Jan 2015 11:11:19 +0000	[thread overview]
Message-ID: <20150126111119.GE11745@x1> (raw)
In-Reply-To: <20150126105222.GM12209@pengutronix.de>

On Mon, 26 Jan 2015, Sascha Hauer wrote:
> On Fri, Jan 23, 2015 at 04:14:40PM +0000, Lee Jones wrote:
> > On Fri, 23 Jan 2015, Sascha Hauer wrote:
> > 
> > > From: Flora Fu <flora.fu@mediatek.com>
> > > 
> > > This adds support for the MediaTek MT6397 PMIC. This is a
> > > multifunction device with the following sub modules:
> > > 
> > > - Regulator
> > > - RTC
> > > - Audio codec
> > > - GPIO
> > > - Clock
> > > 
> > > It is interfaced to the host controller using SPI interface by a proprietary
> > > hardware called PMIC wrapper or pwrap. MT6397 MFD is a child device of the
> > > pwrap.
> > > 
> > > Signed-off-by: Flora Fu, MediaTek
> > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > Cc: Samuel Ortiz <sameo@linux.intel.com>
> > > Cc: Lee Jones <lee.jones@linaro.org>
> > > ---
> > >  Documentation/devicetree/bindings/mfd/mt6397.txt |  70 +++++

[...]

> > > +	struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
> > > +	int shift = mt6397_irq_shift(data->hwirq);
> > > +	int reg = mt6397_irq_reg(data->hwirq);
> > > +	int reg_ofs = MT6397_INT_CON0 + reg * 2;
> > > +
> > > +	mt6397->irq_masks_cur[reg] &= ~(1 << shift);
> > 
> > s/(1 << shift)/BIT(shift)/
> 
> Is it mentioned somewhere that these BIT macros shall be used? There are
> quadrillions of examples for both styles in the kernel and personally I
> think 1 << x is more readable.

I haven't seen a hard and fast 'rule' per say.  I think it's left up
to the Maintainer of any given subsystem. ;)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2015-01-26 11:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 14:09 [PATCH v2] MediaTek PMIC support Sascha Hauer
2015-01-23 14:09 ` [PATCH 1/7] soc: Add MediaTek infracfg controller support Sascha Hauer
2015-01-23 14:09 ` [PATCH 2/7] soc: Add MediaTek pericfg " Sascha Hauer
2015-01-23 14:09 ` [PATCH 3/7] dt: bindings: Add MediaTek MT8135/MT8173 reset controller defines Sascha Hauer
2015-01-23 14:09 ` [PATCH 4/7] soc: mediatek: Add PMIC wrapper for MT8135 and MT6397 SoC Sascha Hauer
2015-01-23 14:10 ` [PATCH 5/7] ARM: dts: mt8135: Add pericfg, infracfg and pmic wrapper nodes Sascha Hauer
2015-01-23 14:10 ` [PATCH 6/7] ARM: dts: mt8135-evbp1: Add PMIC support Sascha Hauer
2015-01-23 14:10 ` [PATCH 7/7] mfd: Add support for the MediaTek MT6397 PMIC Sascha Hauer
2015-01-23 16:14   ` Lee Jones
2015-01-26 10:52     ` Sascha Hauer
2015-01-26 11:11       ` Lee Jones [this message]
2015-01-26 11:26         ` Sascha Hauer
2015-01-26 11:47 ` [PATCH v2] MediaTek PMIC support Sascha Hauer
2015-01-29 12:39   ` Matthias Brugger
2015-01-29 13:22     ` Matthias Brugger
2015-01-29 14:27     ` Sascha Hauer
2015-01-29 15:44       ` Matthias Brugger
2015-01-29 16:18         ` Sascha Hauer

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=20150126111119.GE11745@x1 \
    --to=lee.jones@linaro.org \
    --cc=Yingjoe.Chen@mediatek.com \
    --cc=arnd@arndb.de \
    --cc=eddie.huang@mediatek.com \
    --cc=flora.fu@mediatek.com \
    --cc=henryc.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sameo@linux.intel.com \
    --cc=yh.chen@mediatek.com \
    --subject='Re: [PATCH 7/7] mfd: Add support for the MediaTek MT6397 PMIC' \
    /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

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).