summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-03-04 15:35:53 +0100
committerMark Brown <broonie@kernel.org>2018-03-07 12:49:21 +0000
commite6eb0207597afa1cdd4914a17a727b101cc859ff (patch)
tree183dae6ce9083cbdc88b5015f5f0a78d7e4bf2ea /include/sound
parent583a9debd71e21a317b1fc7b293c22c49b33d9e4 (diff)
ASoC: rt5651: Allow specifying the OVCD scale-factor through a device-property
OVer-Current-Detection (OVCD) for the micbias current is used to detect if an inserted jack is a headset or headphones (mic shorted to ground). The threshold for at which current the OVCD triggers on the rt5651 is not only controlled by setting the absolute current limit, but also by setting a scale factor which applies to the limit. Testing has shown that we need to set both (depending on the board). This commit adds support for the sofar unused OVCD scale-factor register and adds support for specifying non-default values for it through the "realtek,over-current-scale-factor" device-property. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/rt5651.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sound/rt5651.h b/include/sound/rt5651.h
index 725b36c329d0..6403b862fb9a 100644
--- a/include/sound/rt5651.h
+++ b/include/sound/rt5651.h
@@ -22,4 +22,15 @@ enum rt5651_jd_src {
RT5651_JD2,
};
+/*
+ * Note these MUST match the values from the DT binding:
+ * Documentation/devicetree/bindings/sound/rt5651.txt
+ */
+enum rt5651_ovcd_sf {
+ RT5651_OVCD_SF_0P5,
+ RT5651_OVCD_SF_0P75,
+ RT5651_OVCD_SF_1P0,
+ RT5651_OVCD_SF_1P5,
+};
+
#endif