mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
ASoC: es8316: setting gpio only when it's available
The spk_ctl_gpio may not available and no need to set, or else there will be error message. Change-Id: I54b1775c4d2bd695f7a5373149b14bc2501ce136 Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
@@ -103,7 +103,9 @@ static void es8316_enable_spk(struct es8316_priv *es8316, bool enable)
|
||||
bool level;
|
||||
|
||||
level = enable ? es8316->spk_active_level : !es8316->spk_active_level;
|
||||
gpio_set_value(es8316->spk_ctl_gpio, level);
|
||||
|
||||
if (INVALID_GPIO != es8316->spk_ctl_gpio)
|
||||
gpio_set_value(es8316->spk_ctl_gpio, level);
|
||||
}
|
||||
|
||||
static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -9600, 50, 1);
|
||||
|
||||
Reference in New Issue
Block a user