1*2b27bdccSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 28ecbabd9SMisael Lopez Cruz /* 38ecbabd9SMisael Lopez Cruz * ALSA SoC TWL6040 codec driver 48ecbabd9SMisael Lopez Cruz * 58ecbabd9SMisael Lopez Cruz * Author: Misael Lopez Cruz <x0052729@ti.com> 68ecbabd9SMisael Lopez Cruz */ 78ecbabd9SMisael Lopez Cruz 88ecbabd9SMisael Lopez Cruz #ifndef __TWL6040_H__ 98ecbabd9SMisael Lopez Cruz #define __TWL6040_H__ 108ecbabd9SMisael Lopez Cruz 11db4aabccSPeter Ujfalusi enum twl6040_trim { 12db4aabccSPeter Ujfalusi TWL6040_TRIM_TRIM1 = 0, 13db4aabccSPeter Ujfalusi TWL6040_TRIM_TRIM2, 14db4aabccSPeter Ujfalusi TWL6040_TRIM_TRIM3, 15db4aabccSPeter Ujfalusi TWL6040_TRIM_HSOTRIM, 16db4aabccSPeter Ujfalusi TWL6040_TRIM_HFOTRIM, 17db4aabccSPeter Ujfalusi TWL6040_TRIM_INVAL, 18db4aabccSPeter Ujfalusi }; 19db4aabccSPeter Ujfalusi 20db4aabccSPeter Ujfalusi #define TWL6040_HSF_TRIM_LEFT(x) (x & 0x0f) 21db4aabccSPeter Ujfalusi #define TWL6040_HSF_TRIM_RIGHT(x) ((x >> 4) & 0x0f) 22db4aabccSPeter Ujfalusi 237480389fSKuninori Morimoto int twl6040_get_dl1_gain(struct snd_soc_component *component); 247480389fSKuninori Morimoto void twl6040_hs_jack_detect(struct snd_soc_component *component, 25a2d2362eSJorge Eduardo Candelaria struct snd_soc_jack *jack, int report); 267480389fSKuninori Morimoto int twl6040_get_clk_id(struct snd_soc_component *component); 277480389fSKuninori Morimoto int twl6040_get_trim_value(struct snd_soc_component *component, enum twl6040_trim trim); 287480389fSKuninori Morimoto int twl6040_get_hs_step_size(struct snd_soc_component *component); 29a2d2362eSJorge Eduardo Candelaria 308ecbabd9SMisael Lopez Cruz #endif /* End of __TWL6040_H__ */ 31