Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * wm8962.h  --  WM8962 Soc Audio driver platform data
0004  */
0005 
0006 #ifndef _WM8962_PDATA_H
0007 #define _WM8962_PDATA_H
0008 
0009 #define WM8962_MAX_GPIO 6
0010 
0011 /* Use to set GPIO default values to zero */
0012 #define WM8962_GPIO_SET 0x10000
0013 
0014 #define WM8962_GPIO_FN_CLKOUT           0
0015 #define WM8962_GPIO_FN_LOGIC            1
0016 #define WM8962_GPIO_FN_SDOUT            2
0017 #define WM8962_GPIO_FN_IRQ              3
0018 #define WM8962_GPIO_FN_THERMAL          4
0019 #define WM8962_GPIO_FN_PLL2_LOCK        6
0020 #define WM8962_GPIO_FN_PLL3_LOCK        7
0021 #define WM8962_GPIO_FN_FLL_LOCK         9
0022 #define WM8962_GPIO_FN_DRC_ACT         10
0023 #define WM8962_GPIO_FN_WSEQ_DONE       11
0024 #define WM8962_GPIO_FN_ALC_NG_ACT      12
0025 #define WM8962_GPIO_FN_ALC_PEAK_LIMIT  13
0026 #define WM8962_GPIO_FN_ALC_SATURATION  14
0027 #define WM8962_GPIO_FN_ALC_LEVEL_THR   15
0028 #define WM8962_GPIO_FN_ALC_LEVEL_LOCK  16
0029 #define WM8962_GPIO_FN_FIFO_ERR        17
0030 #define WM8962_GPIO_FN_OPCLK           18
0031 #define WM8962_GPIO_FN_DMICCLK         19
0032 #define WM8962_GPIO_FN_DMICDAT         20
0033 #define WM8962_GPIO_FN_MICD            21
0034 #define WM8962_GPIO_FN_MICSCD          22
0035 
0036 struct wm8962_pdata {
0037     struct clk *mclk;
0038     int gpio_base;
0039     u32 gpio_init[WM8962_MAX_GPIO];
0040 
0041     /* Setup for microphone detection, raw value to be written to
0042      * R48(0x30) - only microphone related bits will be updated.
0043      * Detection may be enabled here for use with signals brought
0044      * out on the GPIOs. */
0045     u32 mic_cfg;
0046 
0047     bool irq_active_low;
0048 
0049     bool spk_mono;   /* Speaker outputs tied together as mono */
0050 
0051     /**
0052      * This flag should be set if one or both IN4 inputs is wired
0053      * in a DC measurement configuration.
0054      */
0055     bool in4_dc_measure;
0056 };
0057 
0058 #endif