Re: [PATCH 1/4 v4] drivers: create a pin control subsystem

From: Barry Song
Date: Thu Aug 25 2011 - 23:13:21 EST


2011/8/19 Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>:
> From: Linus Walleij <linus.walleij@xxxxxxxxxx>
>
> This creates a subsystem for handling of pin control devices.
> These are devices that control different aspects of package
> pins.
>
> Currently it handled pinmuxing, i.e. assign electronic functions
> to groups of pins of pins on primarily PGA and BGA type of chip
> packages and common in embedded systems.
>
> The plan is to also handle other I/O pin control aspects such as
> biasing, driving, input properties such as schmitt-triggering,
> load capacitance etc within this subsystem.
>
> This is being done to depopulate the arch/arm/* directory of such
> custom drivers and try to abstract the infrastructure they all
> need. See the Documentation/pinmux.txt file that is part of this
> patch for more details.
>
> Cc: Grant Likely <grant.likely@xxxxxxxxxxxx>
> Cc: Stephen Warren <swarren@xxxxxxxxxx>
> Cc: Joe Perches <joe@xxxxxxxxxxx>
> Cc: Russell King <linux@xxxxxxxxxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Tested-by: Barry Song <baohua.song@xxxxxxx>

even there are still many discussions about data model and
device/function mapping, it is basically usable to CSR SiRFprimaII.
Then i moved the old prima2 pinmux to this framework and made some
basic tests.
Basic APIs like pinmux_get/pinmux_enable/pinmux_disable/pinmux_put
should be working.

Linus, i'll also send the patch of csr pinmux prototype. you might
review and take it as another example except your stericsson U300 and
take care while you merge pinmux.

> ---
> ÂDocumentation/ABI/testing/sysfs-class-pinmux | Â 11 +
> ÂDocumentation/pinctrl.txt          Â| Â512 +++++++++++++++++++
> ÂMAINTAINERS Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â| Â Â5 +
> Âdrivers/Kconfig               Â|  Â4 +
> Âdrivers/Makefile               |  Â2 +
> Âdrivers/pinctrl/Kconfig           Â|  29 ++
> Âdrivers/pinctrl/Makefile           |  Â6 +
> Âdrivers/pinctrl/core.c            | Â437 ++++++++++++++++
> Âdrivers/pinctrl/core.h            |  22 +
> Âdrivers/pinctrl/pinmux.c           | Â700 ++++++++++++++++++++++++++
> Âdrivers/pinctrl/pinmux.h           |  Â4 +
> Âinclude/linux/pinctrl/machine.h       Â|  62 +++
> Âinclude/linux/pinctrl/pinctrl.h       Â| Â120 +++++
> Âinclude/linux/pinctrl/pinmux.h        | Â122 +++++
> Â14 files changed, 2036 insertions(+), 0 deletions(-)
> Âcreate mode 100644 Documentation/ABI/testing/sysfs-class-pinmux
> Âcreate mode 100644 Documentation/pinctrl.txt
> Âcreate mode 100644 drivers/pinctrl/Kconfig
> Âcreate mode 100644 drivers/pinctrl/Makefile
> Âcreate mode 100644 drivers/pinctrl/core.c
> Âcreate mode 100644 drivers/pinctrl/core.h
> Âcreate mode 100644 drivers/pinctrl/pinmux.c
> Âcreate mode 100644 drivers/pinctrl/pinmux.h
> Âcreate mode 100644 include/linux/pinctrl/machine.h
> Âcreate mode 100644 include/linux/pinctrl/pinctrl.h
> Âcreate mode 100644 include/linux/pinctrl/pinmux.h
>

Thanks
Barry
--
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/