Messages in this thread | | | From | Stephen Warren <> | Date | Thu, 1 Dec 2011 13:44:36 -0800 | Subject | RE: [PATCH 1/2 v5] pinctrl: add a pin config interface |
| |
Linus Walleij wrote at Thursday, December 01, 2011 3:55 AM: > This add per-pin and per-group pin config interfaces for biasing, > driving and other such electronic properties. The details of passed > configurations are passed in an opaque unsigned long which may be > dereferences to integer types, structs or lists on either side > of the configuration interface. ...
I'd still love to see separate param/value parameters to all the public APIs as I mentioned elsewhere, but in the interests of moving things forward:
Acked-by: Stephen Warren <swarren@nvidia.com>
> +extern int pin_config_get(struct pinctrl_dev *pctldev, int pin, > + unsigned long *config); > +extern int pin_config_set(struct pinctrl_dev *pctldev, int pin, > + unsigned long config);
Should the per-pin APIs take a pin name (char*) instead of a pin number just like the per-group APIs? That seems more consistent. Currently, only the pinctrl core -> driver API ever deals with pin numbers, and e.g. the mapping table only deals with names.
> +extern int pin_config_group_get(struct pinctrl_dev *pctldev, > + const char *pin_group, > + unsigned long *config); > +extern int pin_config_group_set(struct pinctrl_dev *pctldev, > + const char *pin_group, > + unsigned long config);
-- nvpublic
| |