pinctrl: intel: merrifield: Group IO accessors in code
Consolidate IO accessors in the code to make maintenance a little bit easier in the future. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
5e0b7e7cd2
commit
e99542fb8d
|
@ -489,6 +489,21 @@ static int mrfld_read_bufcfg(struct mrfld_pinctrl *mp, unsigned int pin, u32 *va
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void mrfld_update_bufcfg(struct mrfld_pinctrl *mp, unsigned int pin,
|
||||
u32 bits, u32 mask)
|
||||
{
|
||||
void __iomem *bufcfg;
|
||||
u32 value;
|
||||
|
||||
bufcfg = mrfld_get_bufcfg(mp, pin);
|
||||
value = readl(bufcfg);
|
||||
|
||||
value &= ~mask;
|
||||
value |= bits & mask;
|
||||
|
||||
writel(value, bufcfg);
|
||||
}
|
||||
|
||||
static int mrfld_get_groups_count(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
struct mrfld_pinctrl *mp = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
@ -570,21 +585,6 @@ static int mrfld_get_function_groups(struct pinctrl_dev *pctldev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void mrfld_update_bufcfg(struct mrfld_pinctrl *mp, unsigned int pin,
|
||||
u32 bits, u32 mask)
|
||||
{
|
||||
void __iomem *bufcfg;
|
||||
u32 value;
|
||||
|
||||
bufcfg = mrfld_get_bufcfg(mp, pin);
|
||||
value = readl(bufcfg);
|
||||
|
||||
value &= ~mask;
|
||||
value |= bits & mask;
|
||||
|
||||
writel(value, bufcfg);
|
||||
}
|
||||
|
||||
static int mrfld_pinmux_set_mux(struct pinctrl_dev *pctldev,
|
||||
unsigned int function,
|
||||
unsigned int group)
|
||||
|
|
Loading…
Reference in New Issue