Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 91b213c7 authored by Michael Bohan's avatar Michael Bohan Committed by Stephen Boyd
Browse files

gpio: qpnp-pin: Don't fail pin config for no hardware support



There are two types of failures given a config parameter and a
requested value. The first type occurs due to a requested
configuration not being supported by the harware. The second case
happens when there is ample hardware support, but the
configuration value requested is out of spec.

Change the behavior so that a failure due to a lack of hardware
support does *not* trigger an error in either the probe of
default pin configuration, or the qpnp_pin_config() API.

The main motivation here is so that the pin configuration can be
extended to support mpp in addition to gpio. Users should be able
to only specify parameters for configuration items they care
about. For example, it would not be reasonable for a gpio pin to
receive configuration specification for mpp parameters. Given
that there's only one data structure in this scenario, this
cannot allow the config request to fail.

This change also has the added benefit of restructuring the code
so that there is no duplicated checks for the same error
conditions in the driver.

Change-Id: I88776b304b25cf4bb0a49ff305b398209aaade2a
Signed-off-by: default avatarMichael Bohan <mbohan@codeaurora.org>
parent ac98fa6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment