diff options
author | Johnny Huang <johnny_huang@aspeedtech.com> | 2019-12-02 09:14:29 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-12-13 11:39:47 +0300 |
commit | a79bcd51ae06b134c97d1fa707b7c7385d2d61af (patch) | |
tree | bc259a1cc8cbba48650bcd44ccb59f4168bcff31 /drivers/pinctrl/aspeed/pinctrl-aspeed.h | |
parent | 22d6919039838226d2041cc22e279985b4230f64 (diff) | |
download | linux-a79bcd51ae06b134c97d1fa707b7c7385d2d61af.tar.xz |
pinctrl: aspeed: Add ASPEED_SB_PINCONF() helper
This helper macro is for declaring single bit (SB) mask pinconf,
and is used to prepare for modifying aspeed_pin_config
structure, the aspeed_pin_config structure @bit variable will be
modified to @mask.
This case is common in the AST2400/AST2500 which the mask is a single bit.
Signed-off-by: Johnny Huang <johnny_huang@aspeedtech.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20191202061432.3996-5-andrew@aj.id.au
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/aspeed/pinctrl-aspeed.h')
-rw-r--r-- | drivers/pinctrl/aspeed/pinctrl-aspeed.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.h b/drivers/pinctrl/aspeed/pinctrl-aspeed.h index a5d83986f32e..a7db31202033 100644 --- a/drivers/pinctrl/aspeed/pinctrl-aspeed.h +++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.h @@ -35,6 +35,13 @@ struct aspeed_pin_config { .drv_data = (void *) &(PIN_SYM(name_)) \ } +#define ASPEED_SB_PINCONF(param_, pin0_, pin1_, reg_, bit_) { \ + .param = param_, \ + .pins = {pin0_, pin1_}, \ + .reg = reg_, \ + .bit = bit_ \ +} + struct aspeed_pinctrl_data { struct regmap *scu; |