[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 12 Dec 2011 11:56:50 +0100
From: Domenico Andreoli <cavokz@...il.com>
To: Linus Walleij <linus.walleij@...ricsson.com>
Cc: linux-kernel@...r.kernel.org, Stephen Warren <swarren@...dia.com>,
Grant Likely <grant.likely@...retlab.ca>,
Barry Song <21cnbao@...il.com>,
Shawn Guo <shawn.guo@...escale.com>,
Thomas Abraham <thomas.abraham@...aro.org>,
Dong Aisheng <dong.aisheng@...aro.org>,
Rajendra Nayak <rajendra.nayak@...aro.org>,
Haojian Zhuang <haojian.zhuang@...vell.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v6] pinctrl: add a pin config interface
Hi,
On Fri, Dec 09, 2011 at 12:57:37PM +0100, Linus Walleij wrote:
>
> 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.
[...]
> diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
> index f17fac4..4ad5043 100644
> --- a/include/linux/pinctrl/pinctrl.h
> +++ b/include/linux/pinctrl/pinctrl.h
> @@ -21,6 +21,7 @@
>
> struct pinctrl_dev;
> struct pinmux_ops;
> +struct pinconf_ops;
> struct gpio_chip;
>
> /**
> @@ -97,7 +98,9 @@ struct pinctrl_ops {
> * but may be equal to npins if you have no holes in the pin range.
> * @pctlops: pin control operation vtable, to support global concepts like
> * grouping of pins, this is optional.
> - * @pmxops: pinmux operation vtable, if you support pinmuxing in your driver
> + * @pmxops: pinmux operations vtable, if you support pinmuxing in your driver
> + * @confops: pin config operations vtable, if you support pin configuration in
> + * your driver
> * @owner: module providing the pin controller, used for refcounting
> */
> struct pinctrl_desc {
> @@ -107,6 +110,7 @@ struct pinctrl_desc {
> unsigned int maxpin;
> struct pinctrl_ops *pctlops;
> struct pinmux_ops *pmxops;
> + struct pinconf_ops *confops;
> struct module *owner;
> };
>
> @@ -123,9 +127,7 @@ extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev);
> extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev);
> #else
>
> -struct pinctrl_dev;
this introduces a warning in case CONFIG_PINCTRL is not enabled.
> -
> -/* Sufficiently stupid default function when pinctrl is not in use */
> +/* Sufficiently stupid default functions when pinctrl is not in use */
> static inline bool pin_is_valid(struct pinctrl_dev *pctldev, int pin)
> {
> return pin >= 0;
cheers,
Domenico
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists