mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-21 23:57:36 -04:00
pinctrl: generic: change signature of pinctrl_generic_to_map() to pass void data
In order to make pinctrl_generic_to_map() usable for controllers that use pinmux, change the functions char array pointer that it passes to pinctrl_generic_add_group() to a void pointer. In the pinmux case this property will contain the mux setting as a number rather than as strings in the pins + functions case. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
committed by
Linus Walleij
parent
45ad4de324
commit
2fe8d79e09
@@ -177,8 +177,7 @@ int pinctrl_generic_to_map(struct pinctrl_dev *pctldev, struct device_node *pare
|
||||
struct device_node *np, struct pinctrl_map **maps,
|
||||
unsigned int *num_maps, unsigned int *num_reserved_maps,
|
||||
const char **group_name, unsigned int ngroups,
|
||||
const char **functions, unsigned int *pins,
|
||||
unsigned int npins);
|
||||
void *data, unsigned int *pins, unsigned int npins);
|
||||
#else
|
||||
static inline int
|
||||
pinctrl_generic_pins_function_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
@@ -194,8 +193,7 @@ pinctrl_generic_to_map(struct pinctrl_dev *pctldev, struct device_node *parent,
|
||||
struct device_node *np, struct pinctrl_map **maps,
|
||||
unsigned int *num_maps, unsigned int *num_reserved_maps,
|
||||
const char **group_name, unsigned int ngroups,
|
||||
const char **functions, unsigned int *pins,
|
||||
unsigned int npins)
|
||||
void *data, unsigned int *pins, unsigned int npins)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,7 @@ int pinctrl_generic_to_map(struct pinctrl_dev *pctldev, struct device_node *pare
|
||||
struct device_node *np, struct pinctrl_map **maps,
|
||||
unsigned int *num_maps, unsigned int *num_reserved_maps,
|
||||
const char **group_names, unsigned int ngroups,
|
||||
const char **functions, unsigned int *pins,
|
||||
unsigned int npins)
|
||||
void *data, unsigned int *pins, unsigned int npins)
|
||||
{
|
||||
struct device *dev = pctldev->dev;
|
||||
unsigned int num_configs;
|
||||
@@ -45,7 +44,7 @@ int pinctrl_generic_to_map(struct pinctrl_dev *pctldev, struct device_node *pare
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = pinctrl_generic_add_group(pctldev, group_name, pins, npins, functions);
|
||||
ret = pinctrl_generic_add_group(pctldev, group_name, pins, npins, data);
|
||||
if (ret < 0)
|
||||
return dev_err_probe(dev, ret, "failed to add group %s: %d\n",
|
||||
group_name, ret);
|
||||
|
||||
Reference in New Issue
Block a user