Add driver from Hi256 camera sensor, also enable it's clock.
It's a 2 MP YUV Sensor, with 1 mipi lane.
Change-Id: Iafaf439572a14e02bcd255badd5f6fed3ad13ad4
Signed-off-by: Li Sun <sunli@codeaurora.org>
Add gc0339 description in device tree.
It's a sensor chip from Galaxycore.
Change-Id: Ia4bc635d59ab4574b2ed6a8dc3c5749ef1692fe5
Signed-off-by: Li Sun <sunli@codeaurora.org>
Comprises of following commits
commit 8bec91e021
Author: Richard Genoud <richard.genoud@gmail.com>
Date: Thu Mar 21 12:21:47 2013 +0100
pinmux: forbid mux_usecount to be set at UINT_MAX
If pin_free is called on a pin already freed, mux_usecount is set to
UINT_MAX which is really a bad idea.
This will issue a warning, so that we can correct the code responsible
for the double free.
Change-Id: If67ae08fe85fd7dc5733763a7eab6daf1b232993
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 740924a267e85de09707ea158bbf594b4d8bae01
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 4f124b5696
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date: Wed Mar 13 17:13:46 2013 +0530
pinctrl: generic: Fix compilation error
The function definition of pinconf_generic_dump_config is defined
under CONFIG_DEBUG_FS macro. Define the declaration too under this macro.
Without this patch we get the following build error:
drivers/built-in.o: In function `pcs_pinconf_config_dbg_show':
drivers/pinctrl/pinctrl-single.c:726: undefined reference to
`pinconf_generic_dump_config'
Change-Id: Ie12160eb737721d064740ba7ce9d7f2ddbc875bf
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: bf4d7be57ba9040347065f48a60f895a254f6e28
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 0b8ceb752b
Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Date: Wed Mar 13 03:18:18 2013 +0100
pinctrl: Print the correct information in debugfs pinconf-state file
A bad copy&paste resulted in the debugfs pinconf-state file printing the
pin name instead of the state name. Fix it.
Change-Id: I6b7a54536f2c1b4044b870b3f11dd211c3acad92
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 53ded8191e81507da0786ac45152eebb68d25d0c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit eda8952bf6
Author: Haojian Zhuang <haojian.zhuang@linaro.org>
Date: Tue Feb 12 01:10:57 2013 +0800
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.
Change-Id: I92cff6cdfc31cf507bab3c41c06798006cc09188
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>
Git-commit: ea27c396174d5a4576853cbe7aeabeb9f7cba6e1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit a31518fb81
Author: Laurent Meunier <laurent.meunier@st.com>
Date: Wed Feb 6 09:09:44 2013 +0100
pinctrl/pinconfig: add debug interface
This update adds a debugfs interface to modify a pin configuration
for a given state in the pinctrl map. This allows to modify the
configuration for a non-active state, typically sleep state.
This configuration is not applied right away, but only when the state
will be entered.
This solution is mandated for us by HW validation: in order
to test and verify several pin configurations during sleep without
recompiling the software.
Change-Id: I9dd698c1fb865b492a0da782c79a7510146f5096
Signed-off-by: Laurent Meunier <laurent.meunier@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: f07512e615dd8ebd0866efc38b39ccd41f1495d8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit c9dc9e7714
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date: Thu Jan 24 15:01:00 2013 +0530
pinctrl: core: Make pinctrl_release static
'pinctrl_release' is used only in this file. Hence make it static.
Without this patch we get the following sparse error:
drivers/pinctrl/core.c:815:6: warning:
symbol 'pinctrl_release' was not declared. Should it be static?
Change-Id: I40b4efdd14653e43339a40ff752b70c34a9d2481
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commint: 2917e8338c9b8fbd7374621a3291004984590d21
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 9b6740c677
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Tue Jan 22 10:56:14 2013 -0700
drivers/pinctrl: grab default handles from device core
This makes the device core auto-grab the pinctrl handle and set
the "default" (PINCTRL_STATE_DEFAULT) state for every device
that is present in the device model right before probe. This will
account for the lion's share of embedded silicon devcies.
A modification of the semantics for pinctrl_get() is also done:
previously if the pinctrl handle for a certain device was already
taken, the pinctrl core would return an error. Now, since the
core may have already default-grabbed the handle and set its
state to "default", if the handle was already taken, this will
be disregarded and the located, previously instanitated handle
will be returned to the caller.
This way all code in drivers explicitly requesting their pinctrl
handlers will still be functional, and drivers that want to
explicitly retrieve and switch their handles can still do that.
But if the desired functionality is just boilerplate of this
type in the probe() function:
struct pinctrl *p;
p = devm_pinctrl_get_select_default(&dev);
if (IS_ERR(p)) {
if (PTR_ERR(p) == -EPROBE_DEFER)
return -EPROBE_DEFER;
dev_warn(&dev, "no pinctrl handle\n");
}
The discussion began with the addition of such boilerplate
to the omap4 keypad driver:
http://marc.info/?l=linux-input&m=135091157719300&w=2
A previous approach using notifiers was discussed:
http://marc.info/?l=linux-kernel&m=135263661110528&w=2
This failed because it could not handle deferred probes.
This patch alone does not solve the entire dilemma faced:
whether code should be distributed into the drivers or
if it should be centralized to e.g. a PM domain. But it
solves the immediate issue of the addition of boilerplate
to a lot of drivers that just want to grab the default
state. As mentioned, they can later explicitly retrieve
the handle and set different states, and this could as
well be done by e.g. PM domains as it is only related
to a certain struct device * pointer.
ChangeLog v4->v5 (Stephen):
- Simplified the devicecore grab code.
- Deleted a piece of documentation recommending that pins
be mapped to a device rather than hogged.
ChangeLog v3->v4 (Linus):
- Drop overzealous NULL checks.
- Move kref initialization to pinctrl_create().
- Seeking Tested-by from Stephen Warren so we do not disturb
the Tegra platform.
- Seeking ACK on this from Greg (and others who like it) so I
can merge it through the pinctrl subsystem.
ChangeLog v2->v3 (Linus):
- Abstain from using IS_ERR_OR_NULL() in the driver core,
Russell recently sent a patch to remove it. Handle the
NULL case explicitly even though it's a bogus case.
- Make sure we handle probe deferral correctly in the device
core file. devm_kfree() the container on error so we don't
waste memory for devices without pinctrl handles.
- Introduce reference counting into the pinctrl core using
<linux/kref.h> so that we don't release pinctrl handles
that have been obtained for two or more places.
ChangeLog v1->v2 (Linus):
- Only store a pointer in the device struct, and only allocate
this if it's really used by the device.
Change-Id: Ib66cef0978b9d0e90eab57d75325e3051504b750
Cc: Felipe Balbi <balbi@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Mitch Bradley <wmb@firmworks.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Rickard Andersson <rickard.andersson@stericsson.com>
Cc: Russell King <linux@arm.linux.org.uk>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[swarren: fixed and simplified error-handling in pinctrl_bind_pins(), to
correctly handle deferred probe. Removed admonition from docs not to use
pinctrl hogs for devices]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: ab78029ecc347debbd737f06688d788bd9d60c1d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 8d08d963bb
Author: Haojian Zhuang <haojian.zhuang@linaro.org>
Date: Fri Jan 18 15:31:15 2013 +0800
pinctrl: generic: add slew rate config parameter
Add PIN_CONFIG_SLEW_RATE parameter into pinconf-generic driver.
Change-Id: Id55e16fc91805b92fc6fc1b8453d99e8e06f65ee
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 684697cbbcd076b8fde78d8863e341700533b542
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 4614e78e61
Author: Haojian Zhuang <haojian.zhuang@linaro.org>
Date: Fri Jan 18 15:31:06 2013 +0800
pinctrl: core: get devname from pinctrl_dev
Add new function to get devname from pinctrl_dev. pinctrl_dev_get_name()
can only get pinctrl description name. If we want to use gpio driver to
find pinctrl device node, we need to fetch the pinctrl device name.
Change-Id: Ibe5bd398eaa6f676142a697d03ec48336626fe8d
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: d6e99abb424a916ecbb127dba065a379b460a062
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit a79d906147
Author: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Tue Jan 8 22:43:12 2013 +0100
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.
Change-Id: I98fe32bad1857eb5e8816fabdce25e78f68718d7
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 714c5c2f47544135e34cce5f4144a611e7b88996
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 6c159992b1
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Fri Jan 11 21:22:36 2013 +0100
pinctrl: do not defer device tree hogs
commit af1024e0f7cde9023ddd0f3116db03911d5914c0
"pinctrl: skip deferral of hogs"
Attempts to avoid probe deferral on hogged pins, but we
forgot the device tree case. This patch fixes this.
Change-Id: I1d7ff97d826196c688b08131134ff23a785c4562
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: b2083062a3b4035e85349120b426ecef2b6d155f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 50ec39a475
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Fri Jan 4 17:57:40 2013 +0100
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.
Change-Id: Ibedfa94222ffc5c04b9bc267c8bf2d3a80f96937
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>
Git-commit: 483f33f63c1cb3c6becb465bac7b75d7ff5e3b8f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit b02491e8a4
Author: Julien Delacou <julien.delacou@stericsson.com>
Date: Mon Dec 10 14:47:33 2012 +0100
pinctrl: add sleep mode management for hogs
This fix allows handling sleep mode for hogged
pins in pinctrl. It provides functions to set pins
to sleep/default configurations according to their
current state.
Change-Id: I52c8916c3a83043d9f8af0c8cfc014e778fa1ba7
Signed-off-by: Julien Delacou <julien.delacou@stericsson.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 840a47ba43a2aefbd9834924228549879ee3cb49
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 6eacf84554
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Tue Dec 11 14:14:32 2012 +0100
pinctrl: skip deferral of hogs
Up until now, as hogs were always taken at the end of the
pin control device registration, it didn't cause any problem.
But when starting to hog pins from the device core it will
cause deferral of the pin controller device itself since the
default pin fetch is done *before* the device probes, so
let's fix this annoyance (which is also aesthetically ugly).
Also take some care to make sure that if any one map entry
results in a deferral rather than a failure, then that
deferral will take precedence.
Change-Id: If12198394de9585424e079174c827c93e05c8538
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 89216494ae23dc0071a2b7f8d8264cee55cc211d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 8527f416e9
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Tue Dec 11 13:12:35 2012 +0100
pinctrl: fix comment mistake
This variable pertains to pinctrl handles not muxes
specifically.
Change-Id: I0879682b64c5aa8f357e8e9fcc667035f9e4282a
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: b0666ba4745e35adc4e4f25e46c883cc84075ced
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 71064ada0f
Author: Axel Lin <axel.lin@ingics.com>
Date: Wed Nov 28 14:37:20 2012 +0800
pinctrl: Drop selecting PINCONF for MMP2, PXA168 and PXA910
These drivers do not need to select PINCONF.
Change-Id: I0aca5db957ad4de90f1f826545ee451a83009d39
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: d279bc77b4937d176cca289cda6cff609d480d37
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 24abc3d4a2
Author: Haojian Zhuang <haojian.zhuang@gmail.com>
Date: Thu Nov 15 16:36:33 2012 +0800
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.
Change-Id: I7502860a68994deee489e1e0cccd184c685c3068
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 2ccb0bcfb0dd2001b1a40048c1e407cd9a78bd3d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 257ad892d8
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Tue Nov 20 14:25:07 2012 +0100
pinctrl: add function to retrieve range from pin
This adds a function to the pinctrl core to retrieve the GPIO
range associated with a certain pin for a certain controller.
This is needed when a pinctrl driver want to look up the
corresponding struct gpio_chip for a certain pin. As the
GPIO drivers can now create these ranges themselves, the
pinctrl driver no longer knows about all its associated GPIO
chips.
Change-Id: Ib89718d6bc8d2e4a4b6dab25da1a4e287d1fe9ec
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 9afbefb227792a3c195085d662050dcca748f521
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 4035a6b75c
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Tue Nov 20 14:54:18 2012 +0100
pinctrl: make range registration defer properly
This makes the pinctrl_find_and_add_gpio_range() return
-EPROBE_DEFER if the range hosting pin controller cannot be
located. We may assume that the common case for why adding a
range fails is that the targe pin controller device has not
probed yet.
Change-Id: Idafb8c917a94384a6ad1a13064c0f0fb9ced0275
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: dfa9751548444caadda2d6de1a2b67e05b34c2aa
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 9577ee81df
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Tue Nov 20 14:03:37 2012 +0100
gpiolib: rename find_pinctrl_*
Rename the function find_pinctrl_and_add_gpio_range()
to pinctrl_find_and_add_gpio_range() so as to be consistent
with the rest of the functions.
Change-Id: I28a24d41566e40a01af9b9dfca816c41e2dacfa7
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 192c369c6165dff233f22aa70209a92b030d233d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 9f0488d99a
Author: Axel Lin <axel.lin@ingics.com>
Date: Mon Nov 12 10:00:22 2012 +0800
pinctrl: tegra: Make PINCTRL_TEGRA select PINMUX && PINCONF
Then we can remove "select PINMUX && PINCONF" from PINCTRL_TEGRA{20,30}.
This simplifies the dependency.
Change-Id: Ic000045ad4fa0985ec16e9648c0224eaa0af9f54
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 507ccdbfd80020c402cbbf65ceeb3235edb79021
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 1f14945283
Author: Axel Lin <axel.lin@ingics.com>
Date: Sat Nov 10 21:53:20 2012 +0800
pinctrl: pinmux: Release all taken pins in pinmux_enable_setting error paths
Currently pinmux_enable_setting does not release all taken pins if
ops->enable() returns error. This patch ensures all taken pins are
released in any error paths.
Change-Id: Ia99bf9c78db6f50a43c9624a01ab57ae18e9107a
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: e38d457de7be63e6ced1ea254aa51466deb1fef0
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 4aca036de5
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Tue Nov 6 16:03:35 2012 +0100
gpiolib: separation of pin concerns
The fact that of_gpiochip_add_pin_range() and
gpiochip_add_pin_range() share too much code is fragile and
will invariably mean that bugs need to be fixed in two places
instead of one.
So separate the concerns of gpiolib.c and gpiolib-of.c and
have the latter call the former as back-end. This is necessary
also when going forward with other device descriptions such
as ACPI.
This is done by:
- Adding a return code to gpiochip_add_pin_range() so we can
reliably check whether this succeeds.
- Get rid of the custom of_pinctrl_add_gpio_range() from
pinctrl. Instead create of_pinctrl_get() to just retrive the
pin controller per se from an OF node. This composite
function was just begging to be deleted, it was way to
purpose-specific.
- Use pinctrl_dev_get_name() to get the name of the retrieved
pin controller and use that to call back into the generic
gpiochip_add_pin_range().
Now the pin range is only allocated and tied to a pin
controller from the core implementation in gpiolib.c.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[took their side]
Git-commit: 1e63d7b9363f0c57d00991f9f2e0af374dfc591a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Change-Id: Idbdd912d93757c3a2bada6e4ff701ef6dcea47da
commit e77d22c907
Author: Shiraz Hashim <shiraz.hashim@st.com>
Date: Sat Oct 27 15:21:36 2012 +0530
gpiolib: provide provision to register pin ranges
pinctrl subsystem needs gpio chip base to prepare set of gpio
pin ranges, which a given pinctrl driver can handle. This is
important to handle pinctrl gpio request calls in order to
program a given pin properly for gpio operation.
As gpio base is allocated dynamically during gpiochip
registration, presently there exists no clean way to pass this
information to the pinctrl subsystem.
After few discussions from [1], it was concluded that may be
gpio controller reporting the pin range it supports, is a
better way than pinctrl subsystem directly registering it.
[1] http://comments.gmane.org/gmane.linux.ports.arm.kernel/184816
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
[Edited documentation a bit]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[minor conflict in pinctrl.txt]
Git-commit: f23f1516b6757c326cc638bed8c402c77e2a596e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Change-Id: Ieff451394290d77f8fcab23244eb3594773d03fe
commit 6b74abd0f7
Author: Viresh Kumar <viresh.kumar@linaro.org>
Date: Sat Oct 27 15:21:35 2012 +0530
Revert "pinctrl: remove pinctrl_remove_gpio_range"
This reverts earlier commit which removed
pinctrl_remove_gpio_range(), because at that time there
weren't any more users of that routine. It was removed as the
removal of ranges was done in unregister of pinctrl.
But as we are now registering stuff from gpiolib, we may
remove and insert a gpio module multiple times. So, we
need this routine again.
Change-Id: Ie2586936f9afd4493a47ce9c5242e430b06fcf59
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 7e10ee68f8ccc62e0934ff02f39ce541f3879844
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 696b23ae20
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Wed Oct 17 20:51:54 2012 +0200
pinctrl: reserve pins when states are activated
This switches the way that pins are reserved for multiplexing:
We used to do this when the map was parsed, at the creation of
the settings inside the pinctrl handle, in pinmux_map_to_setting().
However this does not work for us, because we want to use the
same set of pins with different devices at different times: the
current code assumes that the pin groups in a pinmux state will
only be used with one single device, albeit different groups can
be active at different times. For example if a single I2C driver
block is used to drive two different busses located on two
pin groups A and B, then the pins for all possible states of a
function are reserved when fetching the pinctrl handle: the
I2C bus can choose either set A or set B by a mux state at
runtime, but all pins in both group A and B (the superset) are
effectively reserved for that I2C function and mapped to the
device. Another device can never get in and use the pins in
group A, even if the device/function is using group B at the
moment.
Instead: let use reserve the pins when the state is activated
and drop them when the state is disabled, i.e. when we move to
another state. This way different devices/functions can use the
same pins at different times.
We know that this is an odd way of doing things, but we really
need to switch e.g. an SD-card slot to become a tracing output
sink at runtime: we plug in a special "tracing card" then mux
the pins that used to be an SD slot around to the tracing
unit and push out tracing data there instead of SD-card
traffic.
As a side effect pinmux_free_setting() is unused but the stubs
are kept for future additions of code.
Change-Id: Idb468968d22c6fdcc949acb8fda998082b9b8f4d
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Loic Pallardy <loic.pallardy@st.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Jean Nicolas Graux <jean-nicolas.graux@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 1a78958dc212f3698fdc543857af80155cb30f7f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit c76fbb757c
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Date: Mon Oct 22 12:58:09 2012 +0800
pinctrl: fix missing unlock on error in pinctrl_groups_show()
Add the missing unlock on the error handle path in function
pinctrl_groups_show().
Change-Id: Iac18ab1f87524130860e0ca645af7ed937548711
Cc: stable@kernel.org
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: b4dd784ba8af03bf1f9ee5118c792d7abd4919bd
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit fd4c73c073
Author: Haojian Zhuang <haojian.zhuang@gmail.com>
Date: Thu Oct 18 17:07:01 2012 +0800
pinctrl: remove mutex lock in groups show
Mutex is locked duplicatly by pinconf_groups_show() and
pin_config_group_get(). It results dead lock. So avoid to lock mutex
in pinconf_groups_show().
Change-Id: I2aa3fa241a20f60eb78f1cd517f9f661e9b826a1
Cc: stable@kernel.org
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 7ae9d71e8df27a3ab60a05ae3add08728debc09c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 5181dfb990
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Wed Sep 26 14:59:47 2012 +0200
pinctrl: clarify idle vs sleep states
This pure documentation fix tries to align the "idle" and
"sleep" pin states to the idle and suspend states from
runtime PM.
Change-Id: I9f07d20b59e4f4849b5187b19490333f11a6be86
Cc: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 27df74677c545284fa1b9b814db5b94e2bc71ff2
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 1c2c4bc18a
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date: Tue Sep 25 12:41:40 2012 +0530
pinctrl: Fix potential memory leak in pinctrl_register_one_pin()
'pindesc' was not freed when returning from an error induced
exit path.
Change-Id: I0a063e2f365e0066f5fd01951b972650e71f6896
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: eb26cc9c71f81f44777bbf5ca1bd72aa76997786
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 8ce52e0b86
Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Thu Sep 13 21:48:14 2012 +0200
pinctrl: use kasprintf() in pinmux_request_gpio()
Instead of using a temporary buffer, snprintf() and kstrdup(), just
use kasprintf() that does the same thing in just oneline.
Change-Id: I0cbf91c2462a945d2913356fb4311d4631733eba
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Colin Cross <ccross@google.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 23a895aee6081c144ffcc61eaf52dc62e10b3bd1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 5e4b3305ca
Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date: Mon Jul 30 18:38:33 2012 +0200
pinctrl: use ERR_CAST instead of ERR_PTR(PTR_ERR(...))
This doesn't change semantics, just looks nicer.
Change-Id: I84a707b883578d66f78f0f19efe36422123c39b5
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 861fe36c39472f69b3d01cb97fafd4a38a594110
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit b32fc675ad
Author: Richard Genoud <richard.genoud@gmail.com>
Date: Fri Aug 10 16:53:49 2012 +0200
trivial: pinctrl core: remove extraneous code lines
In function pinctrl_get_locked, pointer p is returned on
error, and also return on no_error.
So, we just return it with no error test.
It's pretty the same in function pinctrl_lookup_state_locked:
state is returned in every case, so we drop the error test
and just return state.
Change-Id: If021fc9f5b6ae99459bb629e0aa42480f85f02f6
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Git-commit: d599bfb324ad74e63b616809c1c13c76d1493cf9
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 62e998a2de
Author: Richard Genoud <richard.genoud@gmail.com>
Date: Fri Aug 10 16:52:58 2012 +0200
pinctrl: header: trivial: declare struct device
As struct device is used as a function argument, it should at
least be declared (device.h is not included).
Change-Id: Iaf153a73e74cc336b85cebc28804da1f7d74985a
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: c2f6d8cc5dd19aefd97c0d144e3f1ff6654f909e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit cc92f7e883
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Mon Jun 18 20:07:50 2012 +0200
pinctrl: select the proper symbol
The Kconfig entry for the COH901 pin controller depended on
PINMUX_U300 which is stale, use PINCTRL_U300 as it is called
these days.
Change-Id: I36d5c877c7d5c9edde0a774aa26057575f19770b
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 3c94d1bbda491ba924e5c479e87bc2faae463253
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 89b725e6ee
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Wed May 23 21:22:41 2012 +0800
pinctrl: add pinctrl_add_gpio_ranges function
Often GPIO ranges are added in batch, so create a special
function for that.
Change-Id: Idd9eac3cd36d7e5aadfb57eff09c5614b5b64ea0
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 3e5e00b654997aa2c3998d30f7213b9611eb23d7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 8f83ecd3bf
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Wed May 23 21:22:40 2012 +0800
pinctrl: remove pinctrl_remove_gpio_range
The gpio ranges will be automatically removed when the pinctrl
driver is unregistered.
Change-Id: If3f24caeb6a86e13722db2caf7cc0ea3eabe6892
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 5d589b092ab212bbcc27828167e1c036e7fc77d2
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 8f4ca4cfc0
Author: Devendra Naga <devendra.aaru@gmail.com>
Date: Sat Jun 16 23:43:16 2012 +0530
pinctrl/pinctrl-core: cleanup pinctrl_register
lots of places the ret is used just for non zero cases
with out that also we can check the status of the function
calls.
Change-Id: Id9bfb63ece903720c2bd154250d035ecbeda2ee5
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: da9aecb02d8763ef17130dfd7c678747ad84b070
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 20adcc7747
Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Date: Wed May 23 00:20:17 2012 +0200
pinctrl: fix a minor harmless typo
The way the for_each_maps() macro is currently used, using "i" instead of
"_i_" works and is harmless. Still, this is a bug, that can trigger any
time, if the code around that macro changes. Better fix it now.
Change-Id: I5985e88a83946a34d6bf8e9bf703b80e1354707b
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: bc66468cee4c23856b2e51d711e62e4ef773001a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 864da596ec
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Mon May 7 11:17:53 2012 +0200
pinctrl: add sleep state definition
There is an IDLE definition in the pinctrl framework, but for
ux500 SLEEP is more apropriate.
I've added some comments on the semantics of the common states
so as to avoid misunderstandings.
ChangeLog v1->v2:
- Fixed terminology "on"->"into".
Change-Id: I71261d4af4d7339f02fdaa9f0b47d749c0feea2e
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 83166a87f76aed8aaa03c2dd276bc057c716f02a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 36591d6d69
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Mon May 14 19:06:37 2012 +0800
pinctrl: make pinmux disable function optional
Some SoCs may not have pinmux disable function in HW.
Change-Id: I04c0cc9639caa43c075284a4e1a24c8543f30c73
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 02b50ce4cb1b6aff7d9f1c0c5b4ceb44107bacb4
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit e90e7c4259
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Mon May 14 19:06:36 2012 +0800
pinctrl: a minor error checking improvement for pinconf
Also checking invalid num_configs when validate the pinconf map.
Change-Id: I8d2e078a83a9912fce7c316f6ce595a1ac21ca53
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: c95df2db2cb5a147b42374f391858232517c0576
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 82718cfa34
Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Date: Wed May 9 09:22:40 2012 +0200
pinctrl: (cosmetic) fix two entries in DocBook comments
This removes a repeated word and a repeated and incomplete line from two
pinctrl headers.
Change-Id: I0e4233c4ba1c2eb1972cc8a88a5262684e5fee4d
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 30388abe5a7d0f37da77c6c633ebf00be069d732
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 07aa3d9f29
Author: Stephen Warren <swarren@nvidia.com>
Date: Tue May 1 11:14:15 2012 -0600
pinctrl: add more info to error msgs in pin_request
Additionally print which pin the request failed for, which entity already
claimed it, and what entity was trying to claim it.
Remove duplicate device name from a debug message.
Clean up some indentation.
Change-Id: I6e372a28f79296ec9f5c86aeb75d415c6751deae
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: d4705316c18d371eb404d0ae5dcf51ce6e341d0f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit d6ae0911d6
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Wed Apr 25 19:38:13 2012 +0800
pinctrl: support gpio request deferred probing
As pinctrl handles, it may be possible the pinctrl gpio ranges
are still not got registered when user call pinctrl_gpio_request.
Thus, add defer support for it too.
Change-Id: Ifa057e24812a893a0d967ca62013da6795e37907
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 4650b7cbea4db73f459181f67f939b510e3a17b2
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 1484b14245
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Thu Apr 26 16:15:50 2012 +0800
pinctrl: add pinctrl_provide_dummies interface for platforms to use
Add a interface pinctrl_provide_dummies for platform to indicate
whether it needs use pinctrl dummy state.
ChangeLog v3->v4:
* remove dummy gpio support in pinctrl subsystem.
Let gpio driver decide whether it wants to use pinctrl gpio mux
function.
ChangeLog v2->v3:
* Also changed the missed pinctrl gpio APIs in v1.
ChangeLog v1->v2:
* Based on sascha's suggestion, drop using kconfig since it will hide
pinctrl errors on all other boards.
See: https://lkml.org/lkml/2012/4/18/282
It seemed both Linus and Stephen agreed with this way, so i'm ok
with it too.
* Add dummy gpio support.
pinctrl gpio in the same situation as state.
* Patch name changed.
Original is pinctrl: handle dummy state in core.
* Split removing old dt dummy interface into a separate patch
Change-Id: I05fb6d692ce0fe20124093f14d8aaa11e162ba40
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 5b3aa5f7c6287b1a0698950a91e94546888e553b
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit a5982f0856
Author: John Crispin <blogic@openwrt.org>
Date: Thu Apr 26 16:47:11 2012 +0200
pinctrl: enhance reporting of errors when loading from DT
There are a few places in the api where the code simply returns -EINVAL when
it finds an error. An example is pinmux_map_to_setting() which now reports an
error if we try to match a group with a function that it does not support.
The reporting of errors in pinconf_check_ops and pinmux_check_ops now has the
same style and is located inside the according functions and not the calling
code.
When the map is found in the DT but the default state can not be selected we
get an error to know that the code at least tried.
The patch also removes a stray word from one comment and a "->" from another
for the sake of consistency.
Finally we replace a few pr_err/debug() calls with dev_err/dbg().
Thanks go to Stephen Warren for reviewing the patch and enhancing the reporting
inside pinmux_map_to_setting().
Change-Id: I708cae3dd305b58a1cca81cdf75dbbe868688b58
Signed-off-by: John Crispin <blogic@openwrt.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: ad6e1107baa2e7fda55c2020c25127eab9c0122b
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 5a466c0d30
Author: Stephen Warren <swarren@nvidia.com>
Date: Thu Apr 26 10:18:52 2012 -0600
pinctrl: add kerneldoc for pinctrl_ops device tree functions
Change-Id: Ib50f7333a8eebf2349c08c389476d3a74883c887
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 9e1e815600792e41e1f540736136cb
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 5a0fa5bebc
Author: Stephen Warren <swarren@nvidia.com>
Date: Wed Apr 25 10:32:16 2012 -0600
pinctrl: propagate map validation errors
pinctrl_register_map() was returning early if pinmux_validate_map() or
pinconf_validate_map() failed, but was not actually returning the error
code.
Change-Id: I84e8ca3a2d9b0c07e11e9a6c95f7b8f7ebc22f89
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: fde04f419a230fb7f7dc018a9deca6f5d431831e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 5191bb602d
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Tue Apr 24 15:20:02 2012 +0200
pinctrl: fix dangling comment
This comment was referring to an older PINMUX define, it should
be PINCTRL now.
Change-Id: I0c39702ce82d16ff791e109f41fe2fc704bf4bce
Reported-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: dd5127010afa560b1cfde7e2cffeadabdd20885d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit f0011d6257
Author: John Crispin <blogic@openwrt.org>
Date: Mon Apr 23 19:01:58 2012 +0200
pinctrl: fix signed vs unsigned conditionals inside pinmux_map_to_setting
pinmux_map_to_setting() uses setting->data.mux.func/group to store the return
code of pinmux_func_name_to_selector/pinctrl_get_group_selector(). However,
struct pinctrl_setting_mux defines these elements as unsigned, resulting in all
error codes getting lost. The conditionals following the assignments will always
evaluate to false thus breaking the error paths.
This bug can be triggered by loading a pinmux group map from the devicetree
with an invalid function/group string.
Change-Id: Ib69381da71b4f7f32fda32d0aac975407f22a51d
Signed-off-by: John Crispin <blogic@openwrt.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 15f70e1b9a1a6351c252cb8892272cc4601818c7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 38491d2cb8
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Tue Apr 17 15:00:46 2012 +0800
pinctrl: show pin name for pingroups in sysfs
Pin name is more useful to users.
After change, when cat pingroups in sysfs, it becomes:
root@freescale /sys/kernel/debug/pinctrl/20e0000.iomuxc$ cat pingroups
registered pin groups:
group: uart4grp-1
pin 219 (MX6Q_PAD_KEY_ROW0)
pin 218 (MX6Q_PAD_KEY_COL0)
group: usdhc4grp-1
pin 305 (MX6Q_PAD_SD4_CMD)
pin 306 (MX6Q_PAD_SD4_CLK)
pin 315 (MX6Q_PAD_SD4_DAT0)
pin 316 (MX6Q_PAD_SD4_DAT1)
pin 317 (MX6Q_PAD_SD4_DAT2)
pin 318 (MX6Q_PAD_SD4_DAT3)
pin 319 (MX6Q_PAD_SD4_DAT4)
pin 320 (MX6Q_PAD_SD4_DAT5)
pin 321 (MX6Q_PAD_SD4_DAT6)
pin 322 (MX6Q_PAD_SD4_DAT7)
Change-Id: I046250c81f219524f0dab75f444f5b5714bc5bcc
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: dcb5dbc305b975cccf40942feba40964069541d3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 200f130b8b
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Tue Apr 17 15:00:45 2012 +0800
pinctrl: show pin name when request pins
Pin name is more useful to users.
Change-Id: I3504b0b3c6d1e7fa98810e3fb7150ce2f21432ce
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: d0bd8df56ebffe4a5ca42e27aca2a1243c70ed53
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 4be45faa89
Author: Stephen Warren <swarren@nvidia.com>
Date: Mon Apr 16 10:51:00 2012 -0600
pinctrl: implement devm_pinctrl_get()/put()
These functions allow the driver core to automatically clean up any
allocations made by drivers, thus leading to simplified drivers.
Change-Id: Ib6037480dd4c51e43da155c401e4d64b0f8d56f3
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 6d4ca1fb467932773da7b808c52f3d7ef4461ba0
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit e7a7b81cbf
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Mon Apr 16 22:07:24 2012 +0800
pinctrl: a minor fix of pin config debug information
Change-Id: Id5f875d3a6ea2726ef99c4eace004f19adca82cc
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 2aeefe0233174015aef19dc06aac02a1119a44be
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit ac9a29dd12
Author: Viresh Kumar <viresh.kumar@st.com>
Date: Mon Apr 16 14:22:34 2012 +0530
pinctrl: pinconf: fix compilation error if PINCONF is not selected
When we compile pinctrl layer for platforms without CONFIG_PINCONF, we get
following compilation errors:
drivers/built-in.o: In function `pinctrl_show':
linux-2.6/drivers/pinctrl/core.c:1116: undefined
reference to `pinconf_show_setting'
drivers/built-in.o: In function `pinctrl_maps_show':
linux-2.6/drivers/pinctrl/core.c:1071: undefined
reference to `pinconf_show_map'
drivers/built-in.o: In function `pinctrl_init_device_debugfs':
linux-2.6/drivers/pinctrl/core.c:1224: undefined
reference to `pinconf_init_device_debugfs'
make[1]: *** [.tmp_vmlinux1] Error 1
This patch fixes this.
Change-Id: I948e3e5f79655ffad2b9a0124dd6885c72787636
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 96593afe6d724ffca309340afa914f8e1c6719fd
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit bb5febf273
Author: Stephen Warren <swarren@nvidia.com>
Date: Fri Apr 13 10:49:06 2012 -0600
pinctrl: allow pctldevs to decode pin config in debugfs
Add a pinconf op so that pin controller drivers can decode their pin
config settings for debugfs.
Change-Id: I3daf0dc489903962dd398c366dcf914db1fd1143
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 6cb4158757a8629e14851e7802f3b6bfaa7d6f00
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit fd887fa204
Author: Stephen Warren <swarren@nvidia.com>
Date: Wed Apr 11 16:45:45 2012 -0600
pinctrl: ifdef CONFIG_DEBUG_FS cleanup
Only provide prototypes for pin{mux,conf}.c debugfs-related functions
when both CONFIG_PIN* /and/ CONFIG_DEBUG_FS are enabled, otherwise
provide static inlines.
Change-Id: I9e32e63583be875d8920a5692cdd439357302a7f
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: c736d73c9e6d9849ecb08c34c1d3917b210e8f38
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 2c382502ce
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Thu Apr 12 19:48:42 2012 +0200
pinctrl: mark non-EXPERIMENTAL
With the finalization of the external driver API and the device
tree support, this subsystem is now mature and can be promoted to
non-experimental status.
Change-Id: If959f828d476a0470118ed7d3dfc031c072efa84
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 630e2d0494f001cc3c435cac374f92e4bde0f518
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit a13f7d3250
Author: Linus Walleij <linus.walleij@linaro.org>
Date: Tue Apr 10 10:00:38 2012 +0200
pinctrl: implement pinctrl deferred probing
If drivers try to obtain pinctrl handles for a pin controller that
has not yet registered to the subsystem, we need to be able to
back out and retry with deferred probing. So let's return
-EPROBE_DEFER whenever this location fails. Also downgrade the
errors to info, maybe we will even set them to debug once the
deferred probing is commonplace.
Change-Id: I621368a66637485001f77c1a9d74c5198ba0c342
Cc: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: c05127c4e2c6e7d9949347a76fd05c337bcd5e84
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit cd2d5b3b69
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Tue Apr 10 12:41:34 2012 +0800
pinctrl: add some error checking for user interfaces
This patch can avoid kernel oops in case the mux or config
function is not supported by driver.
Change-Id: I127693bd11296608b64388abd4b5241021868619
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: ad8bb720c23a80233e45ed31d67458f5e5b7ab31
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 4e99dd4a87
Author: Dong Aisheng <dong.aisheng@linaro.org>
Date: Fri Apr 6 20:18:09 2012 +0800
pinctrl: fix pinmux_check_ops error checking
Do not use get_functions_count before checking.
Change-Id: I591f4bf9a33d9cc0e1cf64e91f839c47d415a58b
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: a1d31f71e6ed2f714830df8885ec07dfe1f6632e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit 203c1b3e2b
Author: Viresh Kumar <viresh.kumar@st.com>
Date: Fri Mar 30 11:25:40 2012 +0530
pinctrl: replace list_*() with get_*_count()
Most of the SoC drivers implement list_groups() and list_functions()
routines for pinctrl and pinmux. These routines continue returning
zero until the selector argument is greater than total count of
available groups or functions.
This patch replaces these list_*() routines with get_*_count()
routines, which returns the number of available selection for SoC
driver. pinctrl layer will use this value to check the range it can
choose.
This patch fixes all user drivers for this change. There are other
routines in user drivers, which have checks to check validity of
selector passed to them. It is also no more required and hence
removed.
Documentation updated as well.
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
[Folded in fix and fixed a minor merge artifact manually]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: d1e90e9e7467dbfe521b25ba79f520bf676ebc36
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Change-Id: Ib31455134ae94c874ba986b88028b0ebb2613d0a
commit 502e9e1082
Author: Stephen Warren <swarren@nvidia.com>
Date: Tue Apr 3 21:53:56 2012 -0600
pinctrl: fix build when CONFIG_OF && !CONFIG_PINCTRL
pinctrl/devicetree.c won't compile when !CONFIG_PINCTRL, since the
pinctrl headers don't declare some types when !PINCTRL. Make sure
pinctrl/Makefile only attempts to compile devicetree.c when OF &&
PINCTRL.
Change-Id: I2e14fa681ca3f4ca4e2234a3b22a26ceb56842fe
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: eafeb7a44aa8f79c992b9d557ede740c739f4b25
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
commit c221fde9bd
Author: Stephen Warren <swarren@wwwdotorg.org>
Date: Fri Mar 23 10:29:46 2012 -0600
pinctrl: core device tree mapping table parsing support
During pinctrl_get(), if the client device has a device tree node, look
for the common pinctrl properties there. If found, parse the referenced
device tree nodes, with the help of the pinctrl drivers, and generate
mapping table entries from them.
During pinctrl_put(), free any results of device tree parsing.
Change-Id: Ie9c90c81b5bb6272525a4952079fcdc4bfe47cd0
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 57291ce295c0aca738dd284c4a9c591c09ebee71
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Change-Id: I30e06169954fd5a35287f31ba9039edf2916472c
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
ITC (interrupt threshold control) is the maximum rate at which
usb controller generates interrupts. ITC interval is measured
in micro frames (which is 125us). Device tree entry will help
configure ITC per controller and per platform.
Change-Id: Ibdb8f806c8334042025cad33744160594cfcca80
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
Due to process variation, not all hw has the same max speed. Duplicate
each speed_bin twice to allow greater flexibility between process yield
and chip demand. The bin values are chosen so that additional fuses can be
blown once to change between bins without the use of the multipurpose
redundant fuses.
Change-Id: I2e4f8c5c4d29e0461b455a3bd46a884bb43f6c20
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
This change fixes the way ci13xxx_msm driver is probed. The
driver will not be created by device tree, but will be created
by the msm_otg.
Change-Id: I82f9b0ccb601f12364c3b6e3c681dc607d3f9af5
Signed-off-by: Amit Blay <ablay@codeaurora.org>
This makes the device core auto-grab the pinctrl handle and set
the "default" (PINCTRL_STATE_DEFAULT) state for every device
that is present in the device model right before probe. This will
account for the lion's share of embedded silicon devcies.
A modification of the semantics for pinctrl_get() is also done:
previously if the pinctrl handle for a certain device was already
taken, the pinctrl core would return an error. Now, since the
core may have already default-grabbed the handle and set its
state to "default", if the handle was already taken, this will
be disregarded and the located, previously instanitated handle
will be returned to the caller.
This way all code in drivers explicitly requesting their pinctrl
handlers will still be functional, and drivers that want to
explicitly retrieve and switch their handles can still do that.
But if the desired functionality is just boilerplate of this
type in the probe() function:
struct pinctrl *p;
p = devm_pinctrl_get_select_default(&dev);
if (IS_ERR(p)) {
if (PTR_ERR(p) == -EPROBE_DEFER)
return -EPROBE_DEFER;
dev_warn(&dev, "no pinctrl handle\n");
}
The discussion began with the addition of such boilerplate
to the omap4 keypad driver:
http://marc.info/?l=linux-input&m=135091157719300&w=2
A previous approach using notifiers was discussed:
http://marc.info/?l=linux-kernel&m=135263661110528&w=2
This failed because it could not handle deferred probes.
This patch alone does not solve the entire dilemma faced:
whether code should be distributed into the drivers or
if it should be centralized to e.g. a PM domain. But it
solves the immediate issue of the addition of boilerplate
to a lot of drivers that just want to grab the default
state. As mentioned, they can later explicitly retrieve
the handle and set different states, and this could as
well be done by e.g. PM domains as it is only related
to a certain struct device * pointer.
ChangeLog v4->v5 (Stephen):
- Simplified the devicecore grab code.
- Deleted a piece of documentation recommending that pins
be mapped to a device rather than hogged.
ChangeLog v3->v4 (Linus):
- Drop overzealous NULL checks.
- Move kref initialization to pinctrl_create().
- Seeking Tested-by from Stephen Warren so we do not disturb
the Tegra platform.
- Seeking ACK on this from Greg (and others who like it) so I
can merge it through the pinctrl subsystem.
ChangeLog v2->v3 (Linus):
- Abstain from using IS_ERR_OR_NULL() in the driver core,
Russell recently sent a patch to remove it. Handle the
NULL case explicitly even though it's a bogus case.
- Make sure we handle probe deferral correctly in the device
core file. devm_kfree() the container on error so we don't
waste memory for devices without pinctrl handles.
- Introduce reference counting into the pinctrl core using
<linux/kref.h> so that we don't release pinctrl handles
that have been obtained for two or more places.
ChangeLog v1->v2 (Linus):
- Only store a pointer in the device struct, and only allocate
this if it's really used by the device.
Change-Id: Ib66cef0978b9d0e90eab57d75325e3051504b750
Cc: Felipe Balbi <balbi@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Mitch Bradley <wmb@firmworks.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Rickard Andersson <rickard.andersson@stericsson.com>
Cc: Russell King <linux@arm.linux.org.uk>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[swarren: fixed and simplified error-handling in pinctrl_bind_pins(), to
correctly handle deferred probe. Removed admonition from docs not to use
pinctrl hogs for devices]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: ab78029ecc347debbd737f06688d788bd9d60c1d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
pinctrl subsystem needs gpio chip base to prepare set of gpio
pin ranges, which a given pinctrl driver can handle. This is
important to handle pinctrl gpio request calls in order to
program a given pin properly for gpio operation.
As gpio base is allocated dynamically during gpiochip
registration, presently there exists no clean way to pass this
information to the pinctrl subsystem.
After few discussions from [1], it was concluded that may be
gpio controller reporting the pin range it supports, is a
better way than pinctrl subsystem directly registering it.
[1] http://comments.gmane.org/gmane.linux.ports.arm.kernel/184816
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
[Edited documentation a bit]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[minor conflict in pinctrl.txt]
Git-commit: f23f1516b6757c326cc638bed8c402c77e2a596e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Change-Id: Ieff451394290d77f8fcab23244eb3594773d03fe
This switches the way that pins are reserved for multiplexing:
We used to do this when the map was parsed, at the creation of
the settings inside the pinctrl handle, in pinmux_map_to_setting().
However this does not work for us, because we want to use the
same set of pins with different devices at different times: the
current code assumes that the pin groups in a pinmux state will
only be used with one single device, albeit different groups can
be active at different times. For example if a single I2C driver
block is used to drive two different busses located on two
pin groups A and B, then the pins for all possible states of a
function are reserved when fetching the pinctrl handle: the
I2C bus can choose either set A or set B by a mux state at
runtime, but all pins in both group A and B (the superset) are
effectively reserved for that I2C function and mapped to the
device. Another device can never get in and use the pins in
group A, even if the device/function is using group B at the
moment.
Instead: let use reserve the pins when the state is activated
and drop them when the state is disabled, i.e. when we move to
another state. This way different devices/functions can use the
same pins at different times.
We know that this is an odd way of doing things, but we really
need to switch e.g. an SD-card slot to become a tracing output
sink at runtime: we plug in a special "tracing card" then mux
the pins that used to be an SD slot around to the tracing
unit and push out tracing data there instead of SD-card
traffic.
As a side effect pinmux_free_setting() is unused but the stubs
are kept for future additions of code.
Change-Id: Idb468968d22c6fdcc949acb8fda998082b9b8f4d
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Loic Pallardy <loic.pallardy@st.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Jean Nicolas Graux <jean-nicolas.graux@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 1a78958dc212f3698fdc543857af80155cb30f7f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
These functions allow the driver core to automatically clean up any
allocations made by drivers, thus leading to simplified drivers.
Change-Id: Ib6037480dd4c51e43da155c401e4d64b0f8d56f3
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 6d4ca1fb467932773da7b808c52f3d7ef4461ba0
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
If drivers try to obtain pinctrl handles for a pin controller that
has not yet registered to the subsystem, we need to be able to
back out and retry with deferred probing. So let's return
-EPROBE_DEFER whenever this location fails. Also downgrade the
errors to info, maybe we will even set them to debug once the
deferred probing is commonplace.
Change-Id: I621368a66637485001f77c1a9d74c5198ba0c342
Cc: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: c05127c4e2c6e7d9949347a76fd05c337bcd5e84
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Most of the SoC drivers implement list_groups() and list_functions()
routines for pinctrl and pinmux. These routines continue returning
zero until the selector argument is greater than total count of
available groups or functions.
This patch replaces these list_*() routines with get_*_count()
routines, which returns the number of available selection for SoC
driver. pinctrl layer will use this value to check the range it can
choose.
This patch fixes all user drivers for this change. There are other
routines in user drivers, which have checks to check validity of
selector passed to them. It is also no more required and hence
removed.
Documentation updated as well.
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
[Folded in fix and fixed a minor merge artifact manually]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: d1e90e9e7467dbfe521b25ba79f520bf676ebc36
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Change-Id: Ib31455134ae94c874ba986b88028b0ebb2613d0a
Add support for KPDPWR_RESIN to QPNP PON module. This
is activated when both KPDPWR and RESIN lines asserted
simultaneously. It supports reset and the required
parameters such as s1 time, s2 time and s2 type
are parsed from DTS.
CRs-fixed: 473521
Change-Id: Ieb9b5757e771ac07eda209aafb687e2899189551
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Add DeviceTree support for accelerometer kxtj9.
The data is represented in device tree format and parsed
by the driver using of framework API.
Signed-off-by: Figo Wang <figow@codeaurora.org>
Change-Id: I029e2047a60bb01a70ff43848e37915836d8deae
Support to query stats pertaining to RBCPR (Rapid Bridge Core Power
Reduction) from RPM data memory. The RBCPR module on the RPM modifies
voltage levels for certain chip level voltage rails based on feedback from
different sensors. This change allows querying for the RBCPR stats
maintained on RPM's data memory.
Change-Id: Ia3bdf1ef39c4064b2c3d7406b219e95c18ced21d
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Add device tree entries to support bus bandwidth
for PRNG driver on MSM8974, MSM8226, MSM8610.
Change-Id: Ic93a7b6e4d42f839293946d10d532a56acc94ed1
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
Full charge capacity(FCC) of the battery changes as it ages.
Failing to update the FCC will lead to SOC errors. Add the
following changes to support FCC learning -
1. Add configurable parameters to
- enable/disable fcc learning
- minimum soc to start FCC learning
- minimum ocv (pc) to start FCC learning
- minimum cycles to update fcc vs temp. table
2. New FCC is calculated using the cc count-
FCC_NEW = (cc_end - cc_start) / (soc2 - soc1)
cc_end = CC count when charing ends
cc_start = CC count when charging starts
soc1, soc2 = starting and ending SOC_rbatt value
3. Use the BMS data registers (0xB4 to 0xBF) to backup
the generated FCC, temperature, charge cycles and
charge increase. These backed-up values are restored
during boot.
While at it, add the logic to readjust the FCC after a
new FCC is generated.
Change-Id: I604e4031061af2b94a90e2a3a9bc7b0b4f0144f3
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Allow setting ITC value provided from device tree. In case no value
provided from device tree, check the CI13XXX_ZERO_ITC flag, and
if set use the value of 0 as the ITC.
Change-Id: I9333124913b7ae737eabc8eb5d154d99ac184ee8
Signed-off-by: Amit Blay <ablay@codeaurora.org>
Voting for the entire clock path (using the bus-scaling driver)
requires information about the master endpoint number. A second
new field signals the driver if vote should follow the runtime-pm
state or the application processor power state. These values
are configured in the device tree. In addition, the device-tree
binding document is updated to reflect the new fields.
Change-Id: Ie97cfd209c77fbee01a0ea4f44fa1a34377af519
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
Currently, a single device tree property determines whether core
memory and peripheral memory should be collapsed along with the
core's logic. For greater flexibility, split this into two device
tree properties. The functionality that was previously part of
'qcom,retain-mems' is split into 'qcom,retain-mem' and
'qcom,retain-periph'.
Current users of 'qcom,retain-mems' are updated accordingly.
Change-Id: I5a77cab5cda5482aa22b9d19b77e4816b0324eca
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Add the device tree file for Himax WVGA DSI panel for msm8610 QRD.
update compatible parameter for 8x10
Change-Id: I34e5f6895b4aed08df3cda13fc3295283c7dd888
Signed-off-by: Shuo Yan <quic_shuoy@codeaurora.org>
Add support for blink entry. When blink entry is used,
switch to LPG mode if not already in LPG mode, and switch
back when blink is done.
Change-Id: Id32e50f8484628bbf2ecc15e13cafa0dfee84829
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Regulator will always be required, so use it by default.
Remove unnecessary device tree entry.
Change-Id: If9480e4d6d8b2290eca6f594048948a77ef42d08
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Do not error out if regulators aren't specified in the device tree
node for an IOMMU. This allows IOMMU drivers to be used in simulation
environment and for early bringup of hardware.
Change-Id: I9bb6c3faa7ba5aed482bdad6612197497f7a849d
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Add DeviceTree support for focaltech controller driver.
The data is represented in device tree format and parsed
by the driver using of framework apis.
Change-Id: Ibcdd8c3579f401ac0632d670e1b7c674aa67ba8d
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>