|
@@ -468,6 +468,9 @@ int pinctrl_get_group_pins(struct pinctrl_dev *pctldev, const char *pin_group,
|
|
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
|
|
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
|
|
int gs;
|
|
int gs;
|
|
|
|
|
|
|
|
+ if (!pctlops->get_group_pins)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
gs = pinctrl_get_group_selector(pctldev, pin_group);
|
|
gs = pinctrl_get_group_selector(pctldev, pin_group);
|
|
if (gs < 0)
|
|
if (gs < 0)
|
|
return gs;
|
|
return gs;
|
|
@@ -1362,15 +1365,16 @@ static int pinctrl_groups_show(struct seq_file *s, void *what)
|
|
|
|
|
|
seq_puts(s, "registered pin groups:\n");
|
|
seq_puts(s, "registered pin groups:\n");
|
|
while (selector < ngroups) {
|
|
while (selector < ngroups) {
|
|
- const unsigned *pins;
|
|
|
|
- unsigned num_pins;
|
|
|
|
|
|
+ const unsigned *pins = NULL;
|
|
|
|
+ unsigned num_pins = 0;
|
|
const char *gname = ops->get_group_name(pctldev, selector);
|
|
const char *gname = ops->get_group_name(pctldev, selector);
|
|
const char *pname;
|
|
const char *pname;
|
|
- int ret;
|
|
|
|
|
|
+ int ret = 0;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
- ret = ops->get_group_pins(pctldev, selector,
|
|
|
|
- &pins, &num_pins);
|
|
|
|
|
|
+ if (ops->get_group_pins)
|
|
|
|
+ ret = ops->get_group_pins(pctldev, selector,
|
|
|
|
+ &pins, &num_pins);
|
|
if (ret)
|
|
if (ret)
|
|
seq_printf(s, "%s [ERROR GETTING PINS]\n",
|
|
seq_printf(s, "%s [ERROR GETTING PINS]\n",
|
|
gname);
|
|
gname);
|
|
@@ -1694,8 +1698,7 @@ static int pinctrl_check_ops(struct pinctrl_dev *pctldev)
|
|
|
|
|
|
if (!ops ||
|
|
if (!ops ||
|
|
!ops->get_groups_count ||
|
|
!ops->get_groups_count ||
|
|
- !ops->get_group_name ||
|
|
|
|
- !ops->get_group_pins)
|
|
|
|
|
|
+ !ops->get_group_name)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
if (ops->dt_node_to_map && !ops->dt_free_map)
|
|
if (ops->dt_node_to_map && !ops->dt_free_map)
|