Currently, hpdet_init_range is only written to the hardware in
madera_hpdet_stop and madera_hpdet_restart. Neither of these will be
called before the first headphone detect meaning that the first
headphone detect will start at the wrong range.
Change-Id: I174f20c8da3a11d3bd3a6cac124746e182858c2e
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
goto err_input;
}
+ regmap_update_bits(madera->regmap, MADERA_HEADPHONE_DETECT_1,
+ MADERA_HP_IMPEDANCE_RANGE_MASK,
+ info->hpdet_init_range <<
+ MADERA_HP_IMPEDANCE_RANGE_SHIFT);
+
ret = madera_request_irq(madera, MADERA_IRQ_MICDET1,
"MICDET", madera_micdet, info);
if (ret) {