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

Commit 28b7a0ed authored by Shantanu Jain's avatar Shantanu Jain Committed by Gerrit - the friendly Code Review server
Browse files

input: synaptics: release pinctrl resources on probe failure



devm_pinctrl_get() does not release the ownership of mux function
of pins in the associated pin-group whenever a failure occurs in
driver probe routine. i.e struct pin_desc's mux_owner field is
still marked as being in use after a failure occurs in probe.
As a result of this, if another driver tries to acquire the
ownership of same pin, it gets an error while applying that
setting. To fix this, explicitly release the mux function
ownership of the the pin, by adding a new pin-group in pinctrl
DT and a new pinctrl state in touch device's DT node. This new
pin-group does not have a function setting (qcom,pin-func property).
This new state is explicitly activated during a probe failure
and driver remove routine to release the mux function ownership.

The patch also reorganizes the pinctrl related code in driver.

This patch is propagated from msm-3.10 kernel
(commit: b95a03e9fde42bade1d8042ae6adf461bb7df849
input: synaptics: release pinctrl resources on probe failure)

Change-Id: I6726aa2fb5cca47012d72713ce0c13737e472a3e
Signed-off-by: default avatarShantanu Jain <shjain@codeaurora.org>
parent 37e98e10
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