Commit a79bcd51 authored by Johnny Huang's avatar Johnny Huang Committed by Linus Walleij

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: default avatarJohnny Huang <johnny_huang@aspeedtech.com>
Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20191202061432.3996-5-andrew@aj.id.auSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 22d69190
This diff is collapsed.
This diff is collapsed.
...@@ -35,6 +35,13 @@ struct aspeed_pin_config { ...@@ -35,6 +35,13 @@ struct aspeed_pin_config {
.drv_data = (void *) &(PIN_SYM(name_)) \ .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 aspeed_pinctrl_data {
struct regmap *scu; struct regmap *scu;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment