RE: [PATCH 1/2 v5] pinctrl: add a pin config interface

From: Stephen Warren
Date: Thu Dec 01 2011 - 16:44:40 EST


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@xxxxxxxxxx>

> +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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/