[alsa-devel] [PATCH 2/3] sound/soc/tegra: tegra_max98090: add 'nvidia, hd-no-invert' option

Jonathan Tinkham sctincman at gmail.com
Mon Feb 22 07:24:12 CET 2016


Add a device-tree property that does not invert the headphone
detect signal

Signed-off-by: Jonathan Tinkham <sctincman at gmail.com>
---
 sound/soc/tegra/tegra_max98090.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c
index 902da36..73beba6 100644
--- a/sound/soc/tegra/tegra_max98090.c
+++ b/sound/soc/tegra/tegra_max98090.c
@@ -238,6 +238,11 @@ static int tegra_max98090_probe(struct platform_device *pdev)
 	if (machine->gpio_hp_det == -EPROBE_DEFER)
 		return -EPROBE_DEFER;
 
+	if (of_property_read_bool(np, "nvidia,hd-no-invert"))
+		tegra_max98090_hp_jack_gpio.invert = 0;
+	else
+		tegra_max98090_hp_jack_gpio.invert = 1;
+
 	machine->gpio_mic_det =
 			of_get_named_gpio(np, "nvidia,mic-det-gpios", 0);
 	if (machine->gpio_mic_det == -EPROBE_DEFER)
-- 
2.7.1



More information about the Alsa-devel mailing list