aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/aspeed/pinmux-aspeed.h
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2019-10-08 15:11:51 +1030
committerLinus Walleij <linus.walleij@linaro.org>2019-10-16 15:58:09 +0200
commitc136d4c71f755a189fe13a0cd4f3e8f538dda567 (patch)
tree2a40afe05cd9c67ade505d3244230ea7f647d341 /drivers/pinctrl/aspeed/pinmux-aspeed.h
parentpinctrl: aspeed-g6: Fix I3C3/I3C4 pinmux configuration (diff)
downloadlinux-dev-c136d4c71f755a189fe13a0cd4f3e8f538dda567.tar.xz
linux-dev-c136d4c71f755a189fe13a0cd4f3e8f538dda567.zip
pinctrl: aspeed-g6: Make SIG_DESC_CLEAR() behave intuitively
Signal descriptors can represent multi-bit bitfields and so have explicit "enable" and "disable" states. However many descriptor instances only describe a single bit, and so the SIG_DESC_SET() macro is provides an abstraction for the single-bit cases: Its expansion configures the "enable" state to set the bit and "disable" to clear. SIG_DESC_CLEAR() was introduced to provide a similar single-bit abstraction for for descriptors to clear the bit of interest. However its behaviour was defined as the literal inverse of SIG_DESC_SET() - the impact is the bit of interest is set in the disable path. This behaviour isn't intuitive and doesn't align with how we want to use the macro in practice, so make it clear the bit for both the enable and disable paths. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20191008044153.12734-6-andrew@aj.id.au Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to '')
-rw-r--r--drivers/pinctrl/aspeed/pinmux-aspeed.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/aspeed/pinmux-aspeed.h b/drivers/pinctrl/aspeed/pinmux-aspeed.h
index a2c0d52e4f7b..d5202241f411 100644
--- a/drivers/pinctrl/aspeed/pinmux-aspeed.h
+++ b/drivers/pinctrl/aspeed/pinmux-aspeed.h
@@ -508,7 +508,7 @@ struct aspeed_pin_desc {
* @idx: The bit index in the register
*/
#define SIG_DESC_SET(reg, idx) SIG_DESC_IP_BIT(ASPEED_IP_SCU, reg, idx, 1)
-#define SIG_DESC_CLEAR(reg, idx) SIG_DESC_IP_BIT(ASPEED_IP_SCU, reg, idx, 0)
+#define SIG_DESC_CLEAR(reg, idx) { ASPEED_IP_SCU, reg, BIT_MASK(idx), 0, 0 }
#define SIG_DESC_LIST_SYM(sig, group) sig_descs_ ## sig ## _ ## group
#define SIG_DESC_LIST_DECL(sig, group, ...) \