diff options
Diffstat (limited to 'drivers/pinctrl/pinmux.c')
-rw-r--r-- | drivers/pinctrl/pinmux.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index f2c84a90df14..72b760bc880a 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c | |||
@@ -390,37 +390,6 @@ static void release_pins(struct pinctrl_dev *pctldev, | |||
390 | } | 390 | } |
391 | 391 | ||
392 | /** | 392 | /** |
393 | * pinmux_get_group_selector() - returns the group selector for a group | ||
394 | * @pctldev: the pin controller handling the group | ||
395 | * @pin_group: the pin group to look up | ||
396 | */ | ||
397 | static int pinmux_get_group_selector(struct pinctrl_dev *pctldev, | ||
398 | const char *pin_group) | ||
399 | { | ||
400 | const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; | ||
401 | unsigned group_selector = 0; | ||
402 | |||
403 | while (pctlops->list_groups(pctldev, group_selector) >= 0) { | ||
404 | const char *gname = pctlops->get_group_name(pctldev, | ||
405 | group_selector); | ||
406 | if (!strcmp(gname, pin_group)) { | ||
407 | dev_dbg(&pctldev->dev, | ||
408 | "found group selector %u for %s\n", | ||
409 | group_selector, | ||
410 | pin_group); | ||
411 | return group_selector; | ||
412 | } | ||
413 | |||
414 | group_selector++; | ||
415 | } | ||
416 | |||
417 | dev_err(&pctldev->dev, "does not have pin group %s\n", | ||
418 | pin_group); | ||
419 | |||
420 | return -EINVAL; | ||
421 | } | ||
422 | |||
423 | /** | ||
424 | * pinmux_check_pin_group() - check function and pin group combo | 393 | * pinmux_check_pin_group() - check function and pin group combo |
425 | * @pctldev: device to check the pin group vs function for | 394 | * @pctldev: device to check the pin group vs function for |
426 | * @func_selector: the function selector to check the pin group for, we have | 395 | * @func_selector: the function selector to check the pin group for, we have |
@@ -461,7 +430,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev, | |||
461 | return ret; | 430 | return ret; |
462 | if (num_groups < 1) | 431 | if (num_groups < 1) |
463 | return -EINVAL; | 432 | return -EINVAL; |
464 | ret = pinmux_get_group_selector(pctldev, groups[0]); | 433 | ret = pinctrl_get_group_selector(pctldev, groups[0]); |
465 | if (ret < 0) { | 434 | if (ret < 0) { |
466 | dev_err(&pctldev->dev, | 435 | dev_err(&pctldev->dev, |
467 | "function %s wants group %s but the pin " | 436 | "function %s wants group %s but the pin " |
@@ -486,7 +455,7 @@ static int pinmux_check_pin_group(struct pinctrl_dev *pctldev, | |||
486 | "check if we have pin group %s on controller %s\n", | 455 | "check if we have pin group %s on controller %s\n", |
487 | pin_group, pinctrl_dev_get_name(pctldev)); | 456 | pin_group, pinctrl_dev_get_name(pctldev)); |
488 | 457 | ||
489 | ret = pinmux_get_group_selector(pctldev, pin_group); | 458 | ret = pinctrl_get_group_selector(pctldev, pin_group); |
490 | if (ret < 0) { | 459 | if (ret < 0) { |
491 | dev_dbg(&pctldev->dev, | 460 | dev_dbg(&pctldev->dev, |
492 | "%s does not support pin group %s with function %s\n", | 461 | "%s does not support pin group %s with function %s\n", |