- cirrus,gpsw : Settings for the general purpose switches, set as per the
SWn_MODE bits in the GP Switch 1 register. If given must be 2 cells.
First cell is the value for the SW1_MODE
- Second cell is the value for the SW2_MODE (cs47l90, cs47l91)
+ Second cell is the value for the SW2_MODE (cs47l15, cs47l90, cs47l91)
- cirrus,micd-pol-gpios : GPIO specifier for the GPIO controlling the headset
polarity if one exists. One cell for each child node.
must be a multiple of 5 cells, each 5-cell group represents one
polarity configuration
first cell is the value of
- ACCDET_SRC register field (CS47L35, CS47L85, WM1840),
+ ACCDET_SRC register field (CS47L15, CS47L35, CS47L85, WM1840),
MICD_SENSE_SEL register field (all other codecs)
second cell is the accessory detection ground as per the MICD_GND_SEL
register field
fourth cell is the value of the micd-pol-gpio pin, a non-zero value
indicates this should be on
fifth cell is
- set to zero (cs47l35, cs47l85, wm1840)
+ set to zero (cs47l15, cs47l35, cs47l85, wm1840)
value of HPn_GND_SEL register field (all other codecs)
Example:
snd_soc_dapm_mutex_lock(madera->dapm);
switch (madera->type) {
+ case CS47L15:
case CS47L35:
case CS47L92:
case CS47L93:
unsigned int bias = info->micd_modes[info->micd_mode].bias;
switch (madera->type) {
+ case CS47L15:
+ switch (bias) {
+ case 0:
+ case 1:
+ case 2:
+ return "MICBIAS1";
+ default:
+ return "MICVDD";
+ }
+ break;
case CS47L35:
case CS47L85:
case WM1840:
unsigned int bias = info->micd_modes[info->micd_mode].bias;
switch (madera->type) {
+ case CS47L15:
+ switch (bias) {
+ case 0:
+ return "MICBIAS1A";
+ case 1:
+ return "MICBIAS1B";
+ case 2:
+ return "MICBIAS1C";
+ default:
+ return "MICVDD";
+ }
case CS47L35:
switch (bias) {
case 1:
info->micd_modes = madera_micd_default_modes;
info->num_micd_modes = ARRAY_SIZE(madera_micd_default_modes);
break;
+ case CS47L15:
+ info->hpdet_init_range = 1; /* range 0 not used on CS47L15 */
+ /* fall through to default case */
default:
info->hpdet_ranges = madera_hpdet_ranges;
info->num_hpdet_ranges = ARRAY_SIZE(madera_hpdet_ranges);
default:
break;
}
+ } else {
+ switch (madera->type) {
+ case CS47L15:
+ pdata->hpdet_ext_res_x100 += 3300;
+ break;
+ default:
+ break;
+ }
}
/* Skip any HPDET ranges less than the external resistance */