pinctrl: rockchip: Change the flag's name from IOMUX_UNMASKED to IOMUX_WRITABLE_32BIT
Using the name IOMUX_UNMASKED of flag is not so suitable, pickup the IOMUX_WRITABLE_32BIT name. And need to clean the value when set the iomux. Change-Id: I3e2d69702f4669770ff933ba2c40a641a924b55e Signed-off-by: David Wu <david.wu@rock-chips.com>
This commit is contained in:
parent
1d2570d36f
commit
4bafc2da2d
|
|
@ -37,7 +37,7 @@ enum rockchip_pinctrl_type {
|
|||
#define IOMUX_UNROUTED BIT(3)
|
||||
#define IOMUX_WIDTH_3BIT BIT(4)
|
||||
#define IOMUX_8WIDTH_2BIT BIT(5)
|
||||
#define IOMUX_UNMASKED BIT(6)
|
||||
#define IOMUX_WRITABLE_32BIT BIT(6)
|
||||
|
||||
/**
|
||||
* @type: iomux variant using IOMUX_* constants
|
||||
|
|
@ -1114,10 +1114,12 @@ static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)
|
|||
}
|
||||
}
|
||||
|
||||
if (mux_type & IOMUX_UNMASKED)
|
||||
if (mux_type & IOMUX_WRITABLE_32BIT) {
|
||||
regmap_read(regmap, reg, &data);
|
||||
else
|
||||
data &= ~(mask << bit);
|
||||
} else {
|
||||
data = (mask << (bit + 16));
|
||||
}
|
||||
|
||||
data |= (mux & mask) << bit;
|
||||
ret = regmap_write(regmap, reg, data);
|
||||
|
|
@ -2412,9 +2414,9 @@ static struct rockchip_pin_ctrl rk3228_pin_ctrl = {
|
|||
};
|
||||
|
||||
static struct rockchip_pin_bank rk3288_pin_banks[] = {
|
||||
PIN_BANK_IOMUX_FLAGS(0, 24, "gpio0", IOMUX_SOURCE_PMU | IOMUX_UNMASKED,
|
||||
IOMUX_SOURCE_PMU | IOMUX_UNMASKED,
|
||||
IOMUX_SOURCE_PMU | IOMUX_UNMASKED,
|
||||
PIN_BANK_IOMUX_FLAGS(0, 24, "gpio0", IOMUX_SOURCE_PMU | IOMUX_WRITABLE_32BIT,
|
||||
IOMUX_SOURCE_PMU | IOMUX_WRITABLE_32BIT,
|
||||
IOMUX_SOURCE_PMU | IOMUX_WRITABLE_32BIT,
|
||||
IOMUX_UNROUTED
|
||||
),
|
||||
PIN_BANK_IOMUX_FLAGS(1, 32, "gpio1", IOMUX_UNROUTED,
|
||||
|
|
|
|||
Loading…
Reference in New Issue