ts3a227e 147 sound/soc/codecs/ts3a227e.c static void ts3a227e_jack_report(struct ts3a227e *ts3a227e) ts3a227e 152 sound/soc/codecs/ts3a227e.c if (!ts3a227e->jack) ts3a227e 155 sound/soc/codecs/ts3a227e.c if (ts3a227e->plugged) ts3a227e 157 sound/soc/codecs/ts3a227e.c if (ts3a227e->mic_present) ts3a227e 160 sound/soc/codecs/ts3a227e.c if (ts3a227e->buttons_held & (1 << i)) ts3a227e 163 sound/soc/codecs/ts3a227e.c snd_soc_jack_report(ts3a227e->jack, report, TS3A227E_JACK_MASK); ts3a227e 166 sound/soc/codecs/ts3a227e.c static void ts3a227e_new_jack_state(struct ts3a227e *ts3a227e, unsigned acc_reg) ts3a227e 173 sound/soc/codecs/ts3a227e.c ts3a227e->plugged = plugged; ts3a227e 175 sound/soc/codecs/ts3a227e.c if (mic_present != ts3a227e->mic_present) { ts3a227e 176 sound/soc/codecs/ts3a227e.c ts3a227e->mic_present = mic_present; ts3a227e 177 sound/soc/codecs/ts3a227e.c ts3a227e->buttons_held = 0; ts3a227e 180 sound/soc/codecs/ts3a227e.c regmap_update_bits(ts3a227e->regmap, ts3a227e 189 sound/soc/codecs/ts3a227e.c struct ts3a227e *ts3a227e = (struct ts3a227e *)data; ts3a227e 190 sound/soc/codecs/ts3a227e.c struct regmap *regmap = ts3a227e->regmap; ts3a227e 192 sound/soc/codecs/ts3a227e.c struct device *dev = ts3a227e->dev; ts3a227e 204 sound/soc/codecs/ts3a227e.c ts3a227e_new_jack_state(ts3a227e, acc_reg); ts3a227e 216 sound/soc/codecs/ts3a227e.c ts3a227e->buttons_held |= (1 << i); ts3a227e 218 sound/soc/codecs/ts3a227e.c ts3a227e->buttons_held &= ~(1 << i); ts3a227e 221 sound/soc/codecs/ts3a227e.c ts3a227e_jack_report(ts3a227e); ts3a227e 239 sound/soc/codecs/ts3a227e.c struct ts3a227e *ts3a227e = snd_soc_component_get_drvdata(component); ts3a227e 246 sound/soc/codecs/ts3a227e.c ts3a227e->jack = jack; ts3a227e 247 sound/soc/codecs/ts3a227e.c ts3a227e_jack_report(ts3a227e); ts3a227e 269 sound/soc/codecs/ts3a227e.c static int ts3a227e_parse_device_property(struct ts3a227e *ts3a227e, ts3a227e 277 sound/soc/codecs/ts3a227e.c regmap_update_bits(ts3a227e->regmap, TS3A227E_REG_SETTING_3, ts3a227e 288 sound/soc/codecs/ts3a227e.c struct ts3a227e *ts3a227e; ts3a227e 293 sound/soc/codecs/ts3a227e.c ts3a227e = devm_kzalloc(&i2c->dev, sizeof(*ts3a227e), GFP_KERNEL); ts3a227e 294 sound/soc/codecs/ts3a227e.c if (ts3a227e == NULL) ts3a227e 297 sound/soc/codecs/ts3a227e.c i2c_set_clientdata(i2c, ts3a227e); ts3a227e 298 sound/soc/codecs/ts3a227e.c ts3a227e->dev = dev; ts3a227e 299 sound/soc/codecs/ts3a227e.c ts3a227e->irq = i2c->irq; ts3a227e 301 sound/soc/codecs/ts3a227e.c ts3a227e->regmap = devm_regmap_init_i2c(i2c, &ts3a227e_regmap_config); ts3a227e 302 sound/soc/codecs/ts3a227e.c if (IS_ERR(ts3a227e->regmap)) ts3a227e 303 sound/soc/codecs/ts3a227e.c return PTR_ERR(ts3a227e->regmap); ts3a227e 305 sound/soc/codecs/ts3a227e.c ret = ts3a227e_parse_device_property(ts3a227e, dev); ts3a227e 313 sound/soc/codecs/ts3a227e.c "TS3A227E", ts3a227e); ts3a227e 325 sound/soc/codecs/ts3a227e.c regmap_update_bits(ts3a227e->regmap, TS3A227E_REG_INTERRUPT_DISABLE, ts3a227e 330 sound/soc/codecs/ts3a227e.c regmap_read(ts3a227e->regmap, TS3A227E_REG_ACCESSORY_STATUS, &acc_reg); ts3a227e 331 sound/soc/codecs/ts3a227e.c ts3a227e_new_jack_state(ts3a227e, acc_reg); ts3a227e 332 sound/soc/codecs/ts3a227e.c ts3a227e_jack_report(ts3a227e); ts3a227e 340 sound/soc/codecs/ts3a227e.c struct ts3a227e *ts3a227e = dev_get_drvdata(dev); ts3a227e 342 sound/soc/codecs/ts3a227e.c dev_dbg(ts3a227e->dev, "suspend disable irq\n"); ts3a227e 343 sound/soc/codecs/ts3a227e.c disable_irq(ts3a227e->irq); ts3a227e 350 sound/soc/codecs/ts3a227e.c struct ts3a227e *ts3a227e = dev_get_drvdata(dev); ts3a227e 352 sound/soc/codecs/ts3a227e.c dev_dbg(ts3a227e->dev, "resume enable irq\n"); ts3a227e 353 sound/soc/codecs/ts3a227e.c enable_irq(ts3a227e->irq);