2 * Driver for ADAU1361/ADAU1461/ADAU1761/ADAU1961/ADAU1381/ADAU1781 codecs
4 * Copyright 2011-2014 Analog Devices Inc.
5 * Author: Lars-Peter Clausen <lars@metafoo.de>
7 * Licensed under the GPL-2 or later.
10 #ifndef __LINUX_PLATFORM_DATA_ADAU17X1_H__
11 #define __LINUX_PLATFORM_DATA_ADAU17X1_H__
14 * enum adau17x1_micbias_voltage - Microphone bias voltage
15 * @ADAU17X1_MICBIAS_0_90_AVDD: 0.9 * AVDD
16 * @ADAU17X1_MICBIAS_0_65_AVDD: 0.65 * AVDD
18 enum adau17x1_micbias_voltage
{
19 ADAU17X1_MICBIAS_0_90_AVDD
= 0,
20 ADAU17X1_MICBIAS_0_65_AVDD
= 1,
24 * enum adau1761_digmic_jackdet_pin_mode - Configuration of the JACKDET/MICIN pin
25 * @ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE: Disable the pin
26 * @ADAU1761_DIGMIC_JACKDET_PIN_MODE_DIGMIC: Configure the pin for usage as
27 * digital microphone input.
28 * @ADAU1761_DIGMIC_JACKDET_PIN_MODE_JACKDETECT: Configure the pin for jack
29 * insertion detection.
31 enum adau1761_digmic_jackdet_pin_mode
{
32 ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE
,
33 ADAU1761_DIGMIC_JACKDET_PIN_MODE_DIGMIC
,
34 ADAU1761_DIGMIC_JACKDET_PIN_MODE_JACKDETECT
,
38 * adau1761_jackdetect_debounce_time - Jack insertion detection debounce time
39 * @ADAU1761_JACKDETECT_DEBOUNCE_5MS: 5 milliseconds
40 * @ADAU1761_JACKDETECT_DEBOUNCE_10MS: 10 milliseconds
41 * @ADAU1761_JACKDETECT_DEBOUNCE_20MS: 20 milliseconds
42 * @ADAU1761_JACKDETECT_DEBOUNCE_40MS: 40 milliseconds
44 enum adau1761_jackdetect_debounce_time
{
45 ADAU1761_JACKDETECT_DEBOUNCE_5MS
= 0,
46 ADAU1761_JACKDETECT_DEBOUNCE_10MS
= 1,
47 ADAU1761_JACKDETECT_DEBOUNCE_20MS
= 2,
48 ADAU1761_JACKDETECT_DEBOUNCE_40MS
= 3,
52 * enum adau1761_output_mode - Output mode configuration
53 * @ADAU1761_OUTPUT_MODE_HEADPHONE: Headphone output
54 * @ADAU1761_OUTPUT_MODE_HEADPHONE_CAPLESS: Capless headphone output
55 * @ADAU1761_OUTPUT_MODE_LINE: Line output
57 enum adau1761_output_mode
{
58 ADAU1761_OUTPUT_MODE_HEADPHONE
,
59 ADAU1761_OUTPUT_MODE_HEADPHONE_CAPLESS
,
60 ADAU1761_OUTPUT_MODE_LINE
,
64 * struct adau1761_platform_data - ADAU1761 Codec driver platform data
65 * @input_differential: If true the input pins will be configured in
67 * @lineout_mode: Output mode for the LOUT/ROUT pins
68 * @headphone_mode: Output mode for the LHP/RHP pins
69 * @digmic_jackdetect_pin_mode: JACKDET/MICIN pin configuration
70 * @jackdetect_debounce_time: Jack insertion detection debounce time.
71 * Note: This value will only be used, if the JACKDET/MICIN pin is configured
72 * for jack insertion detection.
73 * @jackdetect_active_low: If true the jack insertion detection is active low.
74 * Othwise it will be active high.
75 * @micbias_voltage: Microphone voltage bias
77 struct adau1761_platform_data
{
78 bool input_differential
;
79 enum adau1761_output_mode lineout_mode
;
80 enum adau1761_output_mode headphone_mode
;
82 enum adau1761_digmic_jackdet_pin_mode digmic_jackdetect_pin_mode
;
84 enum adau1761_jackdetect_debounce_time jackdetect_debounce_time
;
85 bool jackdetect_active_low
;
87 enum adau17x1_micbias_voltage micbias_voltage
;
91 * struct adau1781_platform_data - ADAU1781 Codec driver platform data
92 * @left_input_differential: If true configure the left input as
94 * @right_input_differential: If true configure the right input as differntial
96 * @use_dmic: If true configure the MIC pins as digital microphone pins instead
97 * of analog microphone pins.
98 * @micbias_voltage: Microphone voltage bias
100 struct adau1781_platform_data
{
101 bool left_input_differential
;
102 bool right_input_differential
;
106 enum adau17x1_micbias_voltage micbias_voltage
;