Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: ES8326: Reducin powerconsumption and

Merge series from Zhang Yi <zhangyi@everest-semi.com>:

We changed the configuration related to hibernation.
and delete the REG_SUPPLY to cover mute issue.

+32 -9
+32 -9
sound/soc/codecs/es8326.c
··· 292 292 SND_SOC_DAPM_PGA("LHPMIX", ES8326_DAC2HPMIX, 7, 0, NULL, 0), 293 293 SND_SOC_DAPM_PGA("RHPMIX", ES8326_DAC2HPMIX, 3, 0, NULL, 0), 294 294 295 - SND_SOC_DAPM_REG(snd_soc_dapm_supply, "HPOR Supply", ES8326_HP_CAL, 296 - 4, 7, 0, 0), 297 - SND_SOC_DAPM_REG(snd_soc_dapm_supply, "HPOL Supply", ES8326_HP_CAL, 298 - 0, 7, 0, 0), 299 - 300 295 SND_SOC_DAPM_OUTPUT("HPOL"), 301 296 SND_SOC_DAPM_OUTPUT("HPOR"), 302 297 }; ··· 310 315 311 316 {"LHPMIX", NULL, "Left DAC"}, 312 317 {"RHPMIX", NULL, "Right DAC"}, 313 - 314 - {"HPOR", NULL, "HPOR Supply"}, 315 - {"HPOL", NULL, "HPOL Supply"}, 316 318 317 319 {"HPOL", NULL, "LHPMIX"}, 318 320 {"HPOR", NULL, "RHPMIX"}, ··· 1064 1072 es8326->calibrated = false; 1065 1073 regmap_write(es8326->regmap, ES8326_CLK_CTL, ES8326_CLK_OFF); 1066 1074 regcache_cache_only(es8326->regmap, true); 1067 - regcache_mark_dirty(es8326->regmap); 1068 1075 1069 1076 /* reset register value to default */ 1070 1077 regmap_write(es8326->regmap, ES8326_CSM_I2C_STA, 0x01); 1071 1078 usleep_range(1000, 3000); 1072 1079 regmap_write(es8326->regmap, ES8326_CSM_I2C_STA, 0x00); 1080 + 1081 + regcache_mark_dirty(es8326->regmap); 1073 1082 return 0; 1074 1083 } 1075 1084 ··· 1156 1163 1157 1164 static void es8326_remove(struct snd_soc_component *component) 1158 1165 { 1166 + struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component); 1167 + 1159 1168 es8326_disable_jack_detect(component); 1160 1169 es8326_set_bias_level(component, SND_SOC_BIAS_OFF); 1170 + regmap_write(es8326->regmap, ES8326_CSM_I2C_STA, 0x01); 1171 + usleep_range(1000, 3000); 1172 + regmap_write(es8326->regmap, ES8326_CSM_I2C_STA, 0x00); 1161 1173 } 1162 1174 1163 1175 static const struct snd_soc_component_driver soc_component_dev_es8326 = { ··· 1234 1236 &es8326_dai, 1); 1235 1237 } 1236 1238 1239 + 1240 + static void es8326_i2c_shutdown(struct i2c_client *i2c) 1241 + { 1242 + struct snd_soc_component *component; 1243 + struct es8326_priv *es8326; 1244 + 1245 + es8326 = i2c_get_clientdata(i2c); 1246 + component = es8326->component; 1247 + dev_dbg(component->dev, "Enter into %s\n", __func__); 1248 + cancel_delayed_work_sync(&es8326->jack_detect_work); 1249 + cancel_delayed_work_sync(&es8326->button_press_work); 1250 + 1251 + regmap_write(es8326->regmap, ES8326_CSM_I2C_STA, 0x01); 1252 + usleep_range(1000, 3000); 1253 + regmap_write(es8326->regmap, ES8326_CSM_I2C_STA, 0x00); 1254 + 1255 + } 1256 + 1257 + static void es8326_i2c_remove(struct i2c_client *i2c) 1258 + { 1259 + es8326_i2c_shutdown(i2c); 1260 + } 1261 + 1237 1262 static const struct i2c_device_id es8326_i2c_id[] = { 1238 1263 {"es8326", 0 }, 1239 1264 {} ··· 1286 1265 .of_match_table = of_match_ptr(es8326_of_match), 1287 1266 }, 1288 1267 .probe = es8326_i2c_probe, 1268 + .shutdown = es8326_i2c_shutdown, 1269 + .remove = es8326_i2c_remove, 1289 1270 .id_table = es8326_i2c_id, 1290 1271 }; 1291 1272 module_i2c_driver(es8326_i2c_driver);