Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: omap-abe-twl6040: Use "ti,jack-detection" DT property as boolean

Handle the jack detection inforamtion as bool from devicetree.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Peter Ujfalusi and committed by
Mark Brown
1c08e7e3 e650794a

+4 -4
+2 -2
Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt
··· 12 12 13 13 Optional properties: 14 14 - ti,dmic: phandle for the OMAP dmic node if the machine have it connected 15 - - ti,jack_detection: Need to be set to <1> if the board capable to detect jack 15 + - ti,jack_detection: Need to be present if the board capable to detect jack 16 16 insertion, removal. 17 17 18 18 Available audio endpoints for the audio-routing table: ··· 59 59 compatible = "ti,abe-twl6040"; 60 60 ti,model = "SDP4430"; 61 61 62 - ti,jack-detection = <1>; 62 + ti,jack-detection; 63 63 ti,mclk-freq = <38400000>; 64 64 65 65 ti,mcpdm = <&mcpdm>;
+2 -2
sound/soc/omap/omap-abe-twl6040.c
··· 331 331 num_links = 1; 332 332 } 333 333 334 - of_property_read_u32(node, "ti,jack-detection", 335 - &priv->jack_detection); 334 + priv->jack_detection = of_property_read_bool(node, 335 + "ti,jack-detection"); 336 336 of_property_read_u32(node, "ti,mclk-freq", 337 337 &priv->mclk_freq); 338 338 if (!priv->mclk_freq) {