Thread (20 messages) flat view 20 messages, 6 authors, 2016-08-23

Re: [PATCH 4/9] regulator: axp20x: support AXP806 variant

From: Mark Brown <hidden>
Date: 2016-08-22 16:53:20
Also in: linux-arm-kernel, lkml

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help