Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * linux/sound/wm8996.h -- Platform data for WM8996
0004  *
0005  * Copyright 2011 Wolfson Microelectronics. PLC.
0006  */
0007 
0008 #ifndef __LINUX_SND_WM8996_H
0009 #define __LINUX_SND_WM8996_H
0010 
0011 enum wm8996_inmode {
0012     WM8996_DIFFERRENTIAL_1 = 0,   /* IN1xP - IN1xN */
0013     WM8996_INVERTING = 1,         /* IN1xN */
0014     WM8996_NON_INVERTING = 2,     /* IN1xP */
0015     WM8996_DIFFERENTIAL_2 = 3,    /* IN2xP - IN2xP */
0016 };
0017 
0018 /**
0019  * ReTune Mobile configurations are specified with a label, sample
0020  * rate and set of values to write (the enable bits will be ignored).
0021  *
0022  * Configurations are expected to be generated using the ReTune Mobile
0023  * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/
0024  */
0025 struct wm8996_retune_mobile_config {
0026     const char *name;
0027     int rate;
0028     u16 regs[20];
0029 };
0030 
0031 #define WM8996_SET_DEFAULT 0x10000
0032 
0033 struct wm8996_pdata {
0034     int irq_flags;  /** Set IRQ trigger flags; default active low */
0035 
0036     int ldo_ena;  /** GPIO for LDO1; -1 for none */
0037 
0038     int micdet_def;  /** Default MICDET_SRC/HP1FB_SRC/MICD_BIAS */
0039 
0040     enum wm8996_inmode inl_mode;
0041     enum wm8996_inmode inr_mode;
0042 
0043     u32 spkmute_seq;  /** Value for register 0x802 */
0044 
0045     int gpio_base;
0046     u32 gpio_default[5];
0047 
0048     int num_retune_mobile_cfgs;
0049     struct wm8996_retune_mobile_config *retune_mobile_cfgs;
0050 };
0051 
0052 #endif