[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160822165259.GS22076@sirena.org.uk>
Date: Mon, 22 Aug 2016 17:52:59 +0100
From: Mark Brown <broonie@...nel.org>
To: Chen-Yu Tsai <wens@...e.org>
Cc: Lee Jones <lee.jones@...aro.org>, Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Liam Girdwood <lgirdwood@...il.com>,
Maxime Ripard <maxime.ripard@...e-electrons.com>,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-sunxi@...glegroups.com
Subject: Re: [PATCH 4/9] regulator: axp20x: support AXP806 variant
On Sun, Aug 21, 2016 at 10:11:20AM +0800, Chen-Yu Tsai wrote:
> + if (id == AXP806_DCDCB) {
> + return (((reg & GENMASK(7, 6)) == BIT(6)) ||
> + ((reg & GENMASK(7, 6)) == BIT(7)));
> + } else if (id == AXP806_DCDCC) {
> + return ((reg & GENMASK(7, 6)) == BIT(7));
> + } else if (id == AXP806_DCDCE) {
> + return !!(reg & BIT(5));
> + }
This looks like you're trying to write a switch statement, please do
that.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists