lkml.org 
[lkml]   [2011]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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


    \
     
     \ /
      Last update: 2011-12-12 11:59    [W:6.043 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site