Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * linux/sound/wm5100.h -- Platform data for WM5100
0004  *
0005  * Copyright 2011 Wolfson Microelectronics. PLC.
0006  */
0007 
0008 #ifndef __LINUX_SND_WM5100_H
0009 #define __LINUX_SND_WM5100_H
0010 
0011 enum wm5100_in_mode {
0012     WM5100_IN_SE = 0,
0013     WM5100_IN_DIFF = 1,
0014     WM5100_IN_DMIC = 2,
0015 };
0016 
0017 enum wm5100_dmic_sup {
0018     WM5100_DMIC_SUP_MICVDD = 0,
0019     WM5100_DMIC_SUP_MICBIAS1 = 1,
0020     WM5100_DMIC_SUP_MICBIAS2 = 2,
0021     WM5100_DMIC_SUP_MICBIAS3 = 3,
0022 };
0023 
0024 enum wm5100_micdet_bias {
0025     WM5100_MICDET_MICBIAS1 = 0,
0026     WM5100_MICDET_MICBIAS2 = 1,
0027     WM5100_MICDET_MICBIAS3 = 2,
0028 };
0029 
0030 struct wm5100_jack_mode {
0031     enum wm5100_micdet_bias bias;
0032     int hp_pol;
0033     int micd_src;
0034 };
0035 
0036 #define WM5100_GPIO_SET 0x10000
0037 
0038 struct wm5100_pdata {
0039     int reset;      /** GPIO controlling /RESET, if any */
0040     int ldo_ena;    /** GPIO controlling LODENA, if any */
0041     int hp_pol;     /** GPIO controlling headset polarity, if any */
0042     int irq_flags;
0043     int gpio_base;
0044 
0045     struct wm5100_jack_mode jack_modes[2];
0046 
0047     /* Input pin mode selection */
0048     enum wm5100_in_mode in_mode[4];
0049 
0050     /* DMIC supply selection */
0051     enum wm5100_dmic_sup dmic_sup[4];
0052 
0053     int gpio_defaults[6];
0054 };
0055 
0056 #endif