qpnp-smb2: Add software based glitch filter for OTG detection
When the USB_ID line is pulled low for a very short time there is a
possibility that the SW misses rising edge(removal) event. This may
lead to the state where charger is stuck in the boost-mode forever.
Fix this my adding a SW based glitch logic which checks for the
USB_ID after a SW debounce time and then notifies its presence/removal to
the USB driver.
CRs-Fixed: 2044958
Change-Id: I31974f7d68b435bbef329278cedbd726ada02e3f
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
diff --git a/Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb2.txt b/Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb2.txt
index 07ec82f..441d771 100644
--- a/Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb2.txt
+++ b/Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb2.txt
@@ -176,6 +176,12 @@
Definition: Specifies the maximum charger buck/boost switching frequency in
KHz. It overrides the max frequency defined for the charger.
+- qcom,otg-deglitch-time-ms
+ Usage: optional
+ Value type: <u32>
+ Definition: Specifies the deglitch interval for OTG detection.
+ If the value is not present, 50 msec is used as default.
+
=============================================
Second Level Nodes - SMB2 Charger Peripherals
=============================================