Age | Commit message (Collapse) | Author | Files | Lines |
|
- Update abx500_pin_config_set() in order to take in
account PIN_CONFIG_BIAS_DISABLE state to disable
pull up or pull down.
- Rework error path.
Signed-off-by: Patrice Chotard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
We use the same way to define pin muxing and pin configuration
than for nomadik. So pickup code from pinctrl_nomadik.c to be
able to implement pin multiplexing and pin configuration using
the device tree. Pin configuration uses generic parsing code.
Signed-off-by: Gabriel Fernandez <[email protected]>
Signed-off-by: Patrice Chotard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Fix a compilation error caused by pinconf_generic_parse_dt_config() not
being defined on !CONFIG_OF platforms by guarding the whole DT node
parsing code with #ifdef CONFIG_OF.
Defining a pinconf_generic_parse_dt_config() on !CONFIG_OF would have
been possible as well, but would have resulted in a larger code size on
!CONFIG_OF platforms (such as arch/sh).
Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Add support for gpio on Intel BayTrail platforms. BayTrail supports 3 banks
of gpios called SCORE, NCORE ans SUS with 102, 28 and 44 gpio pins.
Supports gpio interrupts and ACPI gpio events
Pins may be muxed to alternate function instead of gpio by firmware.
This driver does not touch the pin muxing and expect firmare
to set pin muxing and pullup/down properties properly.
Signed-off-by: Mathias Nyman <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The kerneldoc comment for struct pinconf_ops was missing
pin_config_dbg_parse_modify, and instead described
pin_config_group_dbg_set (which is presumably an old name for the same
function). Rename it in the kerneldoc comment so they match.
Signed-off-by: James Hogan <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Symbols referenced only in this file are made static.
Signed-off-by: Sachin Kamat <[email protected]>
Cc: Patrice Chotard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
'spear310_o2p' is referenced only in this file.
Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Some symbols referenced only in this file are made static.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
'bcm2835_gpio_pins' is used only in this file.
Signed-off-by: Sachin Kamat <[email protected]>
Cc: Stephen Warren <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Signed-off-by: Laurent Pinchart <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Support device instantiation through the device tree. The compatible
property is used to select the SoC pinmux information.
Set the gpio_chip device field to the PFC device to enable automatic
GPIO OF support.
Cc: [email protected]
Signed-off-by: Laurent Pinchart <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Platform data isn't used, support can thus be removed.
Signed-off-by: Laurent Pinchart <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Add the missing unlock before return from function pinctrl_find_gpio_range_from_pin()
in the error handling case.
Introduced by commit 2ff3477efd7086544b9e298fc63afab0645921b4.
(pinctrl: add pin list based GPIO ranges)
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
A level-triggered interrupt should be acked after the interrupt line
becomes inactive and before it is unmasked, or else another interrupt
will be immediately triggered. Acking before or after calling the
handler is not enough.
Signed-off-by: Luigi Semenzato <[email protected]>
Signed-off-by: Doug Anderson <[email protected]>
Acked-by: Tomasz Figa <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
It's convenient if get_maintainer suggests sending samsung/exynos
pinctrl changes to linux-samsung-soc and to Tomasz and Thomas.
Signed-off-by: Doug Anderson <[email protected]>
Acked-by: Kyungmin Park <[email protected]>
Acked-by: Olof Johansson <[email protected]>
Acked-by: Kukjin Kim <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The three functions pinctrl_pm_select_default_state,
pinctrl_pm_select_sleep_state, and pinctrl_pm_select_idle_state
are used in drivers that can be loadable modules, and should
be exported.
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Change the rockchip pinctrl driver to handle the arguments to the pull
pinconfig options correctly. So only accept non-0 values for the
pull options as the rockchip pin-controller can only turn pulls on and
off (this via BIAS_DISABLE).
Signed-off-by: Heiko Stuebner <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Make pinctrl-single able to handle suspend/resume events and change
hogged pins states accordingly.
Signed-off-by: Hebbar Gururaja <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Removes the warnings:
drivers/spi/spi-pl022.c: In function 'pl022_suspend_resources':
drivers/spi/spi-pl022.c:2322:24: warning: unused variable 'pins_state' [-Wunused-variable]
drivers/spi/spi-pl022.c:2321:6: warning: unused variable 'ret' [-Wunused-variable]
drivers/spi/spi-pl022.c: In function 'pl022_resume_resources':
drivers/spi/spi-pl022.c:2334:6: warning: unused variable 'ret' [-Wunused-variable]
introduced in:
f1c9cf0 spi: pl022: use pinctrl PM helpers
Signed-off-by: Fabio Baltieri <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
It will allow us to have a cleaner separation between the data needed by
the driver to work, and the core logic of the driver in itself, and will
allow having too much noise in the core driver in the future.
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
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 <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Acked-by Heiko Stuebner <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Allocating the temorary array in pinconf_generic_parse_dt_config on stack
might cause problems later on, when the number of options grows over time.
Therefore also allocate this array dynamically to be on the safe side.
Suggested-by: Laurent Pinchart <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Reviewed-by: James Hogan <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This adds a shortcut when no valid pinconf properties are found
in the parsed dt node, to set the values immediately and return.
Suggested-by: Laurent Pinchart <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Reviewed-by: James Hogan <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The bias-pull-* options use values > 0 to indicate that the pull should
be activated and optionally also indicate the strength of the pull.
Therefore use an default value of 1 for these options.
Split the low-power-mode option into low-power-enable and -disable.
Update the documentation to describe the param arguments better.
Reported-by: James Hogan <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The comment introduced with the recently added pinctrl_gpio_range.pins
element was wrong. This corrects it.
Thanks to Patrice Chotard for pointing this out.
Signed-off-by: Christian Ruppert <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This updates the GPIO range documentation with the API changes
for sparse/random/arbitrary pin-to-GPIO mappings.
Reviewed-by: Christian Ruppert <[email protected]>
Acked-by: Rob Landley <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The stubs for the !PINCTRL case were placed in the wrong
part of the file, causing breakage in linux-next when compiling
SH without pinctrl. Fix it up by moving the stubs to the right
place.
Signed-off-by: Linus Walleij <[email protected]>
|
|
Traditionally, GPIO ranges are based on consecutive ranges of both GPIO
and pin numbers. This patch allows for GPIO ranges with arbitrary lists
of pin numbers.
Signed-off-by: Christian Ruppert <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This patch does nothing but reorder the functions to improve the
readability of a future patch.
Signed-off-by: Doug Anderson <[email protected]>
Acked-by: Tomasz Figa <[email protected]>
Acked-by: Kukjin Kim <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The patch:
1984695 pinctrl: samsung: Protect bank registers with a spinlock
...added spinlocks to protect many accesses. However, the irq_mask
and irq_unmask functions still do an unprotected read/modify/write.
Add the spinlock there.
Signed-off-by: Doug Anderson <[email protected]>
Acked-by: Tomasz Figa <[email protected]>
Acked-by: Kukjin Kim <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
pinctrl-abx500.c: In function 'abx500_gpio_dbg_show_one':
pinctrl-abx500.c:534:14: warning: 'pud' may be used
uninitialized in this function [-Wuninitialized]
Signed-off-by: Patrice Chotard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This driver adds support the Cortex-A9 based SoCs from Rockchip,
so at least the RK2928, RK3066 (a and b) and RK3188.
Earlier Rockchip SoCs seem to use similar mechanics for gpio
handling so should be supportable with relative small changes.
Pull handling on the rk3188 is currently a stub, due to it being
a bit different to the earlier SoCs.
Pinmuxing as well as gpio (and interrupt-) handling tested on
a rk3066a based machine.
Signed-off-by: Heiko Stuebner <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
pinconf_generic_parse_dt_config() takes a node as input and generates an
array of generic pinconfig values from the properties of this node.
As I couldn't find a mechanism to count the number of properties of a node
the function uses internally an array to accept one of parameter and copies
the real present options to a smaller variable at its end.
Signed-off-by: Heiko Stuebner <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This utilize the new pinctrl core PM helpers to transition
the driver to "default" and "sleep" states.
Signed-off-by: Mugunthan V N <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This utilize the new pinctrl core PM helpers to transition
the driver to "default" and "sleep" states.
Signed-off-by: Mugunthan V N <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This utilize the new pinctrl core PM helpers to transition
the driver to "sleep" and "idle" states, cutting away some
boilerplate code.
Cc: Hebbar Gururaja <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Wolfram Sang <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The A10 and A13 has a few pins that can be muxed into a particular
function that can be used as an interrupt source. Add the available
pins for such functions to the A10 and A13 description array.
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The port controller IP found in the Allwinner A10 and A13 can use few of
the pins it manage as an interrupt source, called external interrupts in
the datasheet.
The number of these external interrupts are SoCs specific, but the
current upper limit is 32. In order to work, the external interrupts'
pins have to be muxed to a specific function to generate an interrupt.
This patch adds the irqchip and the needed logic to use the PIO
controller as an interrupt controller.
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Avoid to use expensive string manipulation functions and search by pin
id when possible.
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This patch fixes issues reported by prevent tool.
Signed-off-by: Thomas Abraham <[email protected]>
Signed-off-by: Kukjin Kim <[email protected]>
[Drop hunk already in-tree from a patch by Wei Yongjun]
Signed-off-by: Linus Walleij <[email protected]>
|
|
Take care to name pin names as
register-offset.bit-pos-of-pin-in-register in case configuring multiple
pins in register.
Signed-off-by: Manjunathappa, Prakash <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Add support to configure multiple pins in each register, existing
implementation added by [1] does not support full fledge multiple pin
configuration in single register, reports a pin clash when different
modules configure different bits of same register. The issue reported
and discussed here
http://www.spinics.net/lists/arm-kernel/msg235213.html
With pinctrl-single,bits-per-mux property specified, use function-mask
property to find out number pins to configure. Allocate and register
pin control functions based sub mask.
Tested on da850/omap-l138 EVM.
does not support variable submask for pins.
does not support pinconf.
[1] "pinctrl: pinctrl-single: Add pinctrl-single,bits type of mux"
(9e605cb68a21d5704839a192a46ebcf387773704),
Signed-off-by: Manjunathappa, Prakash <[email protected]>
Reported-by: Lad, Prabhakar <[email protected]>
Tested-by: Lad, Prabhakar <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This utilize the new pinctrl core PM helpers to transition
the driver to "sleep" and "idle" states, cutting away some
boilerplate code.
Cc: Hebbar Gururaja <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Stephen Warren <[email protected]>
Acked-by: Wolfram Sang <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This augments the PL011 UART driver to utilize the new pinctrl
core PM helpers to transition the driver to default and sleep
states, cutting away some boilerplate code.
Cc: Hebbar Gururaja <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Stephen Warren <[email protected]>
Acked-by: Wolfram Sang <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
If a device have sleep and idle states in addition to the
default state, look up these in the core and stash them in
the pinctrl state container.
Add accessor functions for pinctrl consumers to put the pins
into "default", "sleep" and "idle" states passing nothing but
the struct device * affected.
Solution suggested by Kevin Hilman, Mark Brown and Dmitry
Torokhov in response to a patch series from Hebbar
Gururaja.
Cc: Hebbar Gururaja <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Stephen Warren <[email protected]>
Acked-by: Wolfram Sang <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Mark Brown <[email protected]>
Reviewed-by: Kevin Hilman <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Stephen Warren <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Adds Freescale Vybrid VF610 pin controller
driver to IMX common pinctrl driver framework.
Signed-off-by: Jingchang Lu <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
On some platforms such as VF610, offset of mux and pad ctrl register
may be zero, and the mux_mode and config_val are in one 32-bit register.
This patch adds support to imx core pinctrl framework to handle these
cases.
Signed-off-by: Jingchang Lu <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Fix typo in "communicate directly with with the pinctrl subsystem".
Signed-off-by: James Hogan <[email protected]>
Cc: Linus Walleij <[email protected]>
Acked-by: Rob Landley <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|