struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
regmap_write(rt5677->regmap, RT5677_RESET, 0x10ec);
- if (rt5677->pow_ldo2)
- gpiod_set_value_cansleep(rt5677->pow_ldo2, 0);
- if (rt5677->reset_pin)
- gpiod_set_value_cansleep(rt5677->reset_pin, 0);
+ gpiod_set_value_cansleep(rt5677->pow_ldo2, 0);
+ gpiod_set_value_cansleep(rt5677->reset_pin, 0);
return 0;
}
regcache_cache_only(rt5677->regmap, true);
regcache_mark_dirty(rt5677->regmap);
- if (rt5677->pow_ldo2)
- gpiod_set_value_cansleep(rt5677->pow_ldo2, 0);
- if (rt5677->reset_pin)
- gpiod_set_value_cansleep(rt5677->reset_pin, 0);
+ gpiod_set_value_cansleep(rt5677->pow_ldo2, 0);
+ gpiod_set_value_cansleep(rt5677->reset_pin, 0);
}
return 0;
struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
if (!rt5677->dsp_vad_en) {
- if (rt5677->pow_ldo2)
- gpiod_set_value_cansleep(rt5677->pow_ldo2, 1);
- if (rt5677->reset_pin)
- gpiod_set_value_cansleep(rt5677->reset_pin, 1);
+ gpiod_set_value_cansleep(rt5677->pow_ldo2, 1);
+ gpiod_set_value_cansleep(rt5677->reset_pin, 1);
if (rt5677->pow_ldo2 || rt5677->reset_pin)
msleep(10);