Symbol: ts3a227e
sound/soc/codecs/ts3a227e.c
153
static void ts3a227e_jack_report(struct ts3a227e *ts3a227e)
sound/soc/codecs/ts3a227e.c
158
if (!ts3a227e->jack)
sound/soc/codecs/ts3a227e.c
161
if (ts3a227e->plugged)
sound/soc/codecs/ts3a227e.c
163
if (ts3a227e->mic_present)
sound/soc/codecs/ts3a227e.c
166
if (ts3a227e->buttons_held & (1 << i))
sound/soc/codecs/ts3a227e.c
169
snd_soc_jack_report(ts3a227e->jack, report, TS3A227E_JACK_MASK);
sound/soc/codecs/ts3a227e.c
172
static void ts3a227e_new_jack_state(struct ts3a227e *ts3a227e, unsigned acc_reg)
sound/soc/codecs/ts3a227e.c
179
ts3a227e->plugged = plugged;
sound/soc/codecs/ts3a227e.c
181
if (mic_present != ts3a227e->mic_present) {
sound/soc/codecs/ts3a227e.c
182
ts3a227e->mic_present = mic_present;
sound/soc/codecs/ts3a227e.c
183
ts3a227e->buttons_held = 0;
sound/soc/codecs/ts3a227e.c
186
regmap_update_bits(ts3a227e->regmap,
sound/soc/codecs/ts3a227e.c
195
struct ts3a227e *ts3a227e = (struct ts3a227e *)data;
sound/soc/codecs/ts3a227e.c
196
struct regmap *regmap = ts3a227e->regmap;
sound/soc/codecs/ts3a227e.c
198
struct device *dev = ts3a227e->dev;
sound/soc/codecs/ts3a227e.c
210
ts3a227e_new_jack_state(ts3a227e, acc_reg);
sound/soc/codecs/ts3a227e.c
222
ts3a227e->buttons_held |= (1 << i);
sound/soc/codecs/ts3a227e.c
224
ts3a227e->buttons_held &= ~(1 << i);
sound/soc/codecs/ts3a227e.c
227
ts3a227e_jack_report(ts3a227e);
sound/soc/codecs/ts3a227e.c
245
struct ts3a227e *ts3a227e = snd_soc_component_get_drvdata(component);
sound/soc/codecs/ts3a227e.c
252
ts3a227e->jack = jack;
sound/soc/codecs/ts3a227e.c
253
ts3a227e_jack_report(ts3a227e);
sound/soc/codecs/ts3a227e.c
293
static int ts3a227e_parse_device_property(struct ts3a227e *ts3a227e,
sound/soc/codecs/ts3a227e.c
329
regmap_update_bits(ts3a227e->regmap, TS3A227E_REG_SETTING_3,
sound/soc/codecs/ts3a227e.c
341
regmap_update_bits(ts3a227e->regmap, TS3A227E_REG_SETTING_1,
sound/soc/codecs/ts3a227e.c
352
struct ts3a227e *ts3a227e;
sound/soc/codecs/ts3a227e.c
357
ts3a227e = devm_kzalloc(&i2c->dev, sizeof(*ts3a227e), GFP_KERNEL);
sound/soc/codecs/ts3a227e.c
358
if (ts3a227e == NULL)
sound/soc/codecs/ts3a227e.c
361
i2c_set_clientdata(i2c, ts3a227e);
sound/soc/codecs/ts3a227e.c
362
ts3a227e->dev = dev;
sound/soc/codecs/ts3a227e.c
363
ts3a227e->irq = i2c->irq;
sound/soc/codecs/ts3a227e.c
365
ts3a227e->regmap = devm_regmap_init_i2c(i2c, &ts3a227e_regmap_config);
sound/soc/codecs/ts3a227e.c
366
if (IS_ERR(ts3a227e->regmap))
sound/soc/codecs/ts3a227e.c
367
return PTR_ERR(ts3a227e->regmap);
sound/soc/codecs/ts3a227e.c
369
ret = ts3a227e_parse_device_property(ts3a227e, dev);
sound/soc/codecs/ts3a227e.c
377
"TS3A227E", ts3a227e);
sound/soc/codecs/ts3a227e.c
389
regmap_update_bits(ts3a227e->regmap, TS3A227E_REG_INTERRUPT_DISABLE,
sound/soc/codecs/ts3a227e.c
394
regmap_read(ts3a227e->regmap, TS3A227E_REG_ACCESSORY_STATUS, &acc_reg);
sound/soc/codecs/ts3a227e.c
395
ts3a227e_new_jack_state(ts3a227e, acc_reg);
sound/soc/codecs/ts3a227e.c
396
ts3a227e_jack_report(ts3a227e);
sound/soc/codecs/ts3a227e.c
403
struct ts3a227e *ts3a227e = dev_get_drvdata(dev);
sound/soc/codecs/ts3a227e.c
405
dev_dbg(ts3a227e->dev, "suspend disable irq\n");
sound/soc/codecs/ts3a227e.c
406
disable_irq(ts3a227e->irq);
sound/soc/codecs/ts3a227e.c
413
struct ts3a227e *ts3a227e = dev_get_drvdata(dev);
sound/soc/codecs/ts3a227e.c
415
dev_dbg(ts3a227e->dev, "resume enable irq\n");
sound/soc/codecs/ts3a227e.c
416
enable_irq(ts3a227e->irq);