mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
pinctrl: spacemit: delete spacemit_pctrl_check_power()
As far as I can tell spacemit_pctrl_check_power(), called during the custom implementation of dt_node_to_map, is redundant because the driver's implementation generate_config performs the check too. Removing this would allow the driver to use the newly added common function pinctrl_generic_pinmux_dt_node_to_map(). Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
parent
6a350ccc4d
commit
97a061a300
|
|
@ -409,38 +409,6 @@ static inline u32 spacemit_get_drive_strength_mA(enum spacemit_pin_io_type type,
|
|||
}
|
||||
}
|
||||
|
||||
static int spacemit_pctrl_check_power(struct pinctrl_dev *pctldev,
|
||||
struct device_node *dn,
|
||||
struct spacemit_pin_mux_config *pinmuxs,
|
||||
int num_pins, const char *grpname)
|
||||
{
|
||||
struct spacemit_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct device *dev = pctrl->dev;
|
||||
enum spacemit_pin_io_type type;
|
||||
u32 power = 0, i;
|
||||
|
||||
of_property_read_u32(dn, "power-source", &power);
|
||||
|
||||
for (i = 0; i < num_pins; i++) {
|
||||
type = spacemit_to_pin_io_type(pinmuxs[i].pin);
|
||||
|
||||
if (type != IO_TYPE_EXTERNAL)
|
||||
continue;
|
||||
|
||||
switch (power) {
|
||||
case PIN_POWER_STATE_1V8:
|
||||
case PIN_POWER_STATE_3V3:
|
||||
break;
|
||||
default:
|
||||
dev_err(dev, "group %s has unsupported power\n",
|
||||
grpname);
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void spacemit_set_io_pwr_domain(struct spacemit_pinctrl *pctrl,
|
||||
const struct spacemit_pin *spin,
|
||||
const enum spacemit_pin_io_type type)
|
||||
|
|
@ -548,11 +516,6 @@ static int spacemit_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
return dev_err_probe(dev, -ENODEV, "failed to get pin %d\n", pins[i]);
|
||||
}
|
||||
|
||||
ret = spacemit_pctrl_check_power(pctldev, child, pinmuxs,
|
||||
npins, grpname);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
map[nmaps].type = PIN_MAP_TYPE_MUX_GROUP;
|
||||
map[nmaps].data.mux.function = np->name;
|
||||
map[nmaps].data.mux.group = grpname;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user