input: focaltech: 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.
Change-Id: I16a97fefc64dd171deb800b481aa74a797c9ad55
Signed-off-by:
Shantanu Jain <shjain@codeaurora.org>
Loading
Please register or sign in to comment