History log of /include/linux/pinctrl/pinconf-generic.h
Revision Date Author Comments
0d37899363b0e5486f8800231b7edd75e8b60942 03-Sep-2014 Geert Uytterhoeven <geert+renesas@glider.be> pinctrl: generic: Fix PIN_CONFIG_DRIVE_OPEN_SOURCE source/drain doc mismatch

PIN_CONFIG_DRIVE_OPEN_SOURCE enables open source, not open drain.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8ba3f4d00078e7a49c60c0bd6298f29402c3a0a0 11-Dec-2013 Sherman Yin <syin@broadcom.com> pinctrl: Adds slew-rate, input-enable/disable

This commit adds slew-rate and input-enable/disable support for pinconf
-generic.

Signed-off-by: Sherman Yin <syin@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
e9c9489f1077880cb8332f3e1600bf8edba3e86a 25-Nov-2013 Linus Walleij <linus.walleij@linaro.org> pinctrl: provide documentation pointer

The PIN_CONFIG_OUTPUT parameter is really tricky to understand
and needs an explicit pointer to the documentation.

Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3287c24088abded9f111ca797fdd36f86912d199 21-Aug-2013 Laxman Dewangan <ldewangan@nvidia.com> pinctrl: utils : add support to pass config type in generic util APIs

Add support to pass the config type like GROUP or PIN when using
the utils or generic pin configuration APIs. This will make the
APIs more generic.

Added additional inline APIs such that it can be use directly as
callback for the pinctrl_ops.

Changes from V1:
- Remove separate implementation for pins and group for
pinctrl_utils_dt_free_map and improve this function
to support both i.e. PINS and GROUPs.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
0d74d4a161c9f9870039af414b712552c0ed6dfb 15-Aug-2013 Linus Walleij <linus.walleij@linaro.org> pinctrl: add includes and ifdefs for non-DT builds

Commit e81c8f18afc4fdd6e34d8c83814b8b5134dbb30f
"pinctrl: pinconf-generic: add generic APIs for mapping pinctrl node"
Added function prototypes with implicit dependencies
on other header files causing build warnings like this:

In file included from
arch/arm/mach-ux500/board-mop500-pins.c:12:0:
include/linux/pinctrl/pinconf-generic.h:142:3:
warning: 'struct device_node' declared inside parameter list [enabled
by default]
unsigned *reserved_maps, unsigned *num_maps);
^
include/linux/pinctrl/pinconf-generic.h:142:3:
warning: its scope is only this definition or declaration, which is
probably not what you want [enabled by default]
include/linux/pinctrl/pinconf-generic.h:142:3:
warning: 'struct pinctrl_dev' declared inside parameter list [enabled
by default]
include/linux/pinctrl/pinconf-generic.h:145:3:
warning: 'struct device_node' declared inside parameter list [enabled
by default]
unsigned *num_maps);
^
Let's just add ifdefs for non-DT systems (the actual code is
already ifdefed) and #include <linux/device.h> to get the
most important structs and forward-declare the pinctrl
core structs.

Reported-by: Olof Johansson <olof@lixom.net>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
e81c8f18afc4fdd6e34d8c83814b8b5134dbb30f 06-Aug-2013 Laxman Dewangan <ldewangan@nvidia.com> pinctrl: pinconf-generic: add generic APIs for mapping pinctrl node

Add generic APIs to map the DT node and its sub node in pinconf generic
driver. These APIs can be used from driver to parse the DT node who
uses the pinconf generic APIs for defining their nodes.

Changes from V1:
- Add generic property for pins and functions in pinconf-generic.
- Add APIs to map the DT and subnode.
- Move common utils APIs to the pinctrl-utils from this file.
- Update the binding document accordingly.
Changes from V2:
- Rebased the pinctrl binding doc on top of Stephen's cleanup.
- Rename properties "pinctrl-pins" and "pinctrl-function" to
"pins" and "function".

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
256aeb648741bf095e884793862d3dfa6b1c1fb5 25-Jun-2013 Heiko Stübner <heiko@sntech.de> pinctrl: set unit for debounce time pinconfig to usec

Currently the debounce time pinconfig option uses an unspecified
"time units" unit. As pinconfig options should use SI units and a
real unit is also necessary for generic dt bindings, change it
to usec. Currently no driver is using the generic pinconfig option
for this, so the unit change is safe to do.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
70637a6dcaa6e4cb707d0d50a7ea448f13438786 25-Jun-2013 Heiko Stübner <heiko@sntech.de> pinctrl: more clarifications for generic pull configs

PULL_PIN_DEFAULT is meant for hardware completely hiding any pull
settings from the driver, so that it's really only possible to turn
the pull on or off, but it not being possible to determine any
pull settings from software.

Also the binding-documentation for the pull arguments did not match
the changes to the expected values.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5ca3353bcee929c3b7bbf39f79038842f443f01a 16-Jun-2013 Linus Walleij <linus.walleij@linaro.org> pinctrl: establish pull-up/pull-down terminology

It is counter-intuitive to have "0" mean disable in a boolean
manner for electronic properties of pins such as pull-up and
pull-down. Therefore, define that a pull-up/pull-down argument
of 0 to such a generic option means that the pin is
short-circuited to VDD or GROUND. Pull disablement shall be
done using PIN_CONFIG_BIAS_DISABLE.

Cc: James Hogan <james.hogan@imgtec.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by Heiko Stuebner <heiko@sntech.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7970cb770dffa23cb20a36f46602e688e075f5d9 06-Jun-2013 Heiko Stübner <heiko@sntech.de> pinctrl: add pinconf-generic define for a pin-default pull

There exist controllers that don't support to set the pull to up or down
separately but instead automatically set the pull direction based on
embedded knowledge inside the controller, for example depending on the
selected mux function of the pin.

Therefore this patch adds another config option to use this default
pull-state for a pin where it is not possible to know or decide if the
pin will be pulled up or down.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
a2df4269cad79635201587c5c5404f0b1cb0b05c 24-May-2013 James Hogan <james.hogan@imgtec.com> pinconf-generic: add BIAS_BUS_HOLD pinconf

Add a new PIN_CONFIG_BIAS_BUS_HOLD pin configuration for a bus holder
pin mode (also known as bus keeper, or repeater). This is a weak latch
which drives the last value on a tristate bus. Another device on the bus
can drive the bus high or low before going tristate to change the value
driven by the pin.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
63ad9cbff5896dadfee510f631ffcb0176984722 23-Apr-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> pinctrl: generic: Fix typos and clarify comments

Drive strength controls both sink and source currents, clarify the
description accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ea27c396174d5a4576853cbe7aeabeb9f7cba6e1 11-Feb-2013 Haojian Zhuang <haojian.zhuang@linaro.org> pinctrl: generic: rename input schmitt disable

Rename PIN_CONFIG_INPUT_SCHMITT_DISABLE to
PIN_CONFIG_INPUT_SCHMITT_ENABLE. It's used to make it more generialize.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
684697cbbcd076b8fde78d8863e341700533b542 18-Jan-2013 Haojian Zhuang <haojian.zhuang@linaro.org> pinctrl: generic: add slew rate config parameter

Add PIN_CONFIG_SLEW_RATE parameter into pinconf-generic driver.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
f868ef995b32f0f08d7b6ce700bbe25de3ad65ac 08-Jan-2013 Maxime Ripard <maxime.ripard@free-electrons.com> pinctrl: pinconf-generic: add drive strength parameter

Some pin configurations IP allows to set the current output to the pin.
This patch adds such a parameter to the pinconf-generic mechanism.

This parameter takes as argument the drive strength in mA.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
483f33f63c1cb3c6becb465bac7b75d7ff5e3b8f 04-Jan-2013 Linus Walleij <linus.walleij@linaro.org> pinctrl: add pinconf-generic defines for output

This adds a definition of a generic output configuration
for a certain pin when using the generic pin configuration
library. Whereas driving pins low/high is usually a GPIO
business, you may want to set up pins into a default state
using hogs, and never touch them again. This helps out
with that scenario.

Based on a patch from Patrice Chotard.

Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2ccb0bcfb0dd2001b1a40048c1e407cd9a78bd3d 15-Nov-2012 Haojian Zhuang <haojian.zhuang@gmail.com> pinctrl: generic: add input schmitt disable parameter

In Marvell PXA/MMP silicons, input schmitt disable value is 0x40, not 0.
So append new config parameter -- input schmitt disable.

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
394349f7789fdfcdc74b61afcac84046535c40b7 24-Nov-2011 Linus Walleij <linus.walleij@linaro.org> pinctrl: introduce generic pin config

This is a split-off from the earlier patch set which adds generic
pin configuration for the pin controllers that want it. Since
we may have a system with mixed generic and custom pin controllers,
we pass a boolean in the pin controller ops vtable to indicate
if it is generic.

ChangeLog v1->v5:
- Follow parent patch versioning number system.
- Document the semantic meaning of return values from pin config
get functions, so we can iterate over pins and check their
properties from debugfs as part of the generic config code.
- Use proper cast functions in the generic debugfs pin config
file.
- Expand generic config to optionally cover groups too.
ChangeLog v5->v6:
- Update to match underlying changes.
ChangeLog v6->v7:
- Drop DRIVE_OFF parameter, use bias high impedance for this
- Delete argument for drive modes push-pull, od and os. These
are now just state transitions.
- Delete slew rate rising/falling due to discussions on on
proper semantics
- Drop config wakeup, struct irq_chip does this for now, add
back if need be.
- Set PIN_CONFIG_END to 0x7fff making room for custom config
parameters from 0x8000 and up.
- Prefix accessor functions with pinconf_