Commit Graph

4 Commits

Author SHA1 Message Date
Michael Bohan 606f8023fe gpio: qpnp-pin: Make source select property name consistent
Code fragments and comments currently make reference to 'select'
instead of the documented name 'sec-select'. Change this to be
consistent with respect to each other for clarity.

Since we're modifying this anyways, let's pick a more sensible
name. To be consistent with the scheme used by the 'vin-sel'
property, let's change the source select property to 'src-sel'.
This requires modifying the code and updating all existing Device
Tree entries currently using this property.

Change-Id: Ib152340337a72dc744801e8a42ed4ea152565d0d
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2013-09-04 15:32:24 -07:00
Michael Bohan f29f2a36f3 gpio: qpnp-pin: Add support for MPP devices
Add mpp support to the qpnp-pin driver. MPP support allows for
additional devices to be specified in the Device Tree topology.
This support is implemented in the same driver as the GPIO
support since the address map is very close between them.
The addition of this support does not change the existing gpio
support.

Default MPP configuration can be specified in the Device Tree
using the three new bindings for mpp. Any attribute not specified
in the Device Tree will assume its default configuration.

It's also possible to configure an MPP at runtime using the
existing qpnp_pin_config() API. If a given configuration feature
is not supported by the underlying hardware pin, then that
particular request is silently dropped with no error. This allows
for gpio users to continue specifying only a subset of the full
qpnp_pin_cfg structure.

Change-Id: I2b72768647de2a371edfa05c52fc1ed776c215c0
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2013-09-04 14:57:33 -07:00
Michael Bohan ac98fa6fbb gpio: qpnp-gpio: Issue lookups based on device name
qpnp-gpio manages gpio_chip queries based on the slave
ID. This has a limitation in that it restricts the number of
gpio_chips per slave ID to one. However, some PMICs have both MPP
and GPIO on the same slave, and thus the slave ID is not a
meaningful unit to search for.

Instead, make use of the 'label' binding to give the
primary dev-container node a name. This name will serve as the
gpio_chip label, which can be used in lookups.

Change-Id: Ic20caeb4622d73449a983992275446c733ddd89a
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2013-09-04 14:57:32 -07:00
Michael Bohan 794c5cab52 gpio: qpnp-gpio: Rename driver to qpnp-pin
Since QPNP PMICs also include support for MPP, and since we
intend to support MPPs in the same code base, it's not
appropriate to limit this the scope of this driver to 'gpio'.
Change the driver name to 'pin' since it more accurately
describes the potential for this driver.

Also update the Device Tree include files for the name changes.
Remove a superflous 'gpio-pin' definition in the msmcopper
specific include file, since such configuration shall never
change. This binding should be defined in the PMIC specific
include only.

Change-Id: Id1d6407039908e3cf44dfc19af71f0cdc7aff8e6
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2013-09-04 14:57:31 -07:00