Symbol: ts3a227e
sound/soc/codecs/ts3a227e.c
154
static void ts3a227e_jack_report(struct ts3a227e *ts3a227e)
sound/soc/codecs/ts3a227e.c
159
if (!ts3a227e->jack)
sound/soc/codecs/ts3a227e.c
162
if (ts3a227e->plugged)
sound/soc/codecs/ts3a227e.c
164
if (ts3a227e->mic_present)
sound/soc/codecs/ts3a227e.c
167
if (ts3a227e->buttons_held & (1 << i))
sound/soc/codecs/ts3a227e.c
170
snd_soc_jack_report(ts3a227e->jack, report, TS3A227E_JACK_MASK);
sound/soc/codecs/ts3a227e.c
173
static void ts3a227e_new_jack_state(struct ts3a227e *ts3a227e, unsigned acc_reg)
sound/soc/codecs/ts3a227e.c
180
ts3a227e->plugged = plugged;
sound/soc/codecs/ts3a227e.c
182
if (mic_present != ts3a227e->mic_present) {
sound/soc/codecs/ts3a227e.c
183
ts3a227e->mic_present = mic_present;
sound/soc/codecs/ts3a227e.c
184
ts3a227e->buttons_held = 0;
sound/soc/codecs/ts3a227e.c
187
regmap_update_bits(ts3a227e->regmap,
sound/soc/codecs/ts3a227e.c
196
struct ts3a227e *ts3a227e = (struct ts3a227e *)data;
sound/soc/codecs/ts3a227e.c
197
struct regmap *regmap = ts3a227e->regmap;
sound/soc/codecs/ts3a227e.c
199
struct device *dev = ts3a227e->dev;
sound/soc/codecs/ts3a227e.c
211
ts3a227e_new_jack_state(ts3a227e, acc_reg);
sound/soc/codecs/ts3a227e.c
223
ts3a227e->buttons_held |= (1 << i);
sound/soc/codecs/ts3a227e.c
225
ts3a227e->buttons_held &= ~(1 << i);
sound/soc/codecs/ts3a227e.c
228
ts3a227e_jack_report(ts3a227e);
sound/soc/codecs/ts3a227e.c
246
struct ts3a227e *ts3a227e = snd_soc_component_get_drvdata(component);
sound/soc/codecs/ts3a227e.c
253
ts3a227e->jack = jack;
sound/soc/codecs/ts3a227e.c
254
ts3a227e_jack_report(ts3a227e);
sound/soc/codecs/ts3a227e.c
294
static int ts3a227e_parse_device_property(struct ts3a227e *ts3a227e,
sound/soc/codecs/ts3a227e.c
330
regmap_update_bits(ts3a227e->regmap, TS3A227E_REG_SETTING_3,
sound/soc/codecs/ts3a227e.c
342
regmap_update_bits(ts3a227e->regmap, TS3A227E_REG_SETTING_1,
sound/soc/codecs/ts3a227e.c
353
struct ts3a227e *ts3a227e;
sound/soc/codecs/ts3a227e.c
358
ts3a227e = devm_kzalloc(&i2c->dev, sizeof(*ts3a227e), GFP_KERNEL);
sound/soc/codecs/ts3a227e.c
359
if (ts3a227e == NULL)
sound/soc/codecs/ts3a227e.c
362
i2c_set_clientdata(i2c, ts3a227e);
sound/soc/codecs/ts3a227e.c
363
ts3a227e->dev = dev;
sound/soc/codecs/ts3a227e.c
364
ts3a227e->irq = i2c->irq;
sound/soc/codecs/ts3a227e.c
366
ts3a227e->regmap = devm_regmap_init_i2c(i2c, &ts3a227e_regmap_config);
sound/soc/codecs/ts3a227e.c
367
if (IS_ERR(ts3a227e->regmap))
sound/soc/codecs/ts3a227e.c
368
return PTR_ERR(ts3a227e->regmap);
sound/soc/codecs/ts3a227e.c
370
ret = ts3a227e_parse_device_property(ts3a227e, dev);
sound/soc/codecs/ts3a227e.c
378
"TS3A227E", ts3a227e);
sound/soc/codecs/ts3a227e.c
390
regmap_update_bits(ts3a227e->regmap, TS3A227E_REG_INTERRUPT_DISABLE,
sound/soc/codecs/ts3a227e.c
395
regmap_read(ts3a227e->regmap, TS3A227E_REG_ACCESSORY_STATUS, &acc_reg);
sound/soc/codecs/ts3a227e.c
396
ts3a227e_new_jack_state(ts3a227e, acc_reg);
sound/soc/codecs/ts3a227e.c
397
ts3a227e_jack_report(ts3a227e);
sound/soc/codecs/ts3a227e.c
404
struct ts3a227e *ts3a227e = dev_get_drvdata(dev);
sound/soc/codecs/ts3a227e.c
406
dev_dbg(ts3a227e->dev, "suspend disable irq\n");
sound/soc/codecs/ts3a227e.c
407
disable_irq(ts3a227e->irq);
sound/soc/codecs/ts3a227e.c
414
struct ts3a227e *ts3a227e = dev_get_drvdata(dev);
sound/soc/codecs/ts3a227e.c
416
dev_dbg(ts3a227e->dev, "resume enable irq\n");
sound/soc/codecs/ts3a227e.c
417
enable_irq(ts3a227e->irq);