Commit graph

9 commits

Author SHA1 Message Date
Krzysztof Kozlowski 1c07a4de5b ASoC: drivers: Drop owner assignment from i2c_driver
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 12:50:43 +01:00
Fang, Yang A c4a99a4b4f ASoC: ts3a227e: do not report jack status when there is i2c read err
After suspend -> resume the ts3a227e_interrupt sometimes comes before i2c
controller resume is called .regmap_read will return incorrect status
and report a wrong jack status.This patch will disable irq on suspend
and enable irq again on the resume to make sure interrupt is coming
after TI resumes. Also We should return if there is read err,the
interrupt will come again since it is level triggered and we are not yet
clear the interrupt.

In addtion,cht_bsw_max98090_ti machine driver registered additional
notifier base on jack event which will program the audio codec.there
will be codec timeout err if such event occurs prior to i2c controller
is resumed.

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08 18:40:08 +01:00
Fang, Yang A a650bb3422 ASoC: ts3a227e: use device property api
replace of_property_read_u32 with device_property_read_u32

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-02 18:17:27 +01:00
Mark Brown 801a5656da Merge remote-tracking branches 'asoc/topic/tdm-slot', 'asoc/topic/tegra', 'asoc/topic/tlv320aic3x', 'asoc/topic/ts3a227e' and 'asoc/topic/ts3a277e' into asoc-next 2015-02-04 20:57:21 +00:00
Lad, Prabhakar e7a0332f71 ASoC: ts3a227e: fix sparse warning
this patch fixes following sparse warning:
ts3a227e.c:222:5: warning: symbol 'ts3a227e_enable_jack_detect' was not declared. Should it be static?

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04 20:08:59 +00:00
Anatol Pomozov 39552d7ad1 ASoC: ts3a227e: Add dts property that allows to specify micbias voltage
The voltage controls key press threshold.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 18:32:14 +00:00
Anatol Pomozov ddf9ea21f5 ASoC: ts3a227e: Remap keys to match Android headset specification
ts3a227e datasheet says typical key resistance is
  key1 50 Ohm
  key2 135 Ohm
  key3 240 Ohm
  key4 470 Ohm

The android headset specification expect buttons impedance:
  A (MEDIA) 0-70 Ohm
  D (VOICECOMMAND) 110-180 Ohm
  B (VOLUMEUP) 210-290 Ohm
  C (VOLUMEDOWN) 360-680 Ohm

Thus key mapping should be
  key1 - MEDIA
  key2 - VOICECOMMAND
  key3 - VOLUMEUP
  key3 - VOLUMEDOWN

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 18:32:04 +00:00
Cheng-Yi Chiang 8e3e36e87c ASoC: ts3a227e: Check and report jack status at probe
ts3a227e does not trigger interrupt to report jack status when system
boots from warm reset because ts3a227e's power remains on during warm reset.
Read jack status at probe to get current jack status.
Note that if system boots from EC reset, then this issue will not
happen.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-05 15:29:51 +00:00
Dylan Reid 2880fc8779 ASoC: add TI ts3a227e headset chip driver
The TS3A227E is an autonomous audio accessory detection and
configuration switch that detects 3-pole or 4-pole audio accessories
and configures internal switches to route the signals accordingly.

This chip also has built-in support for the new button standard
described in the Android "Wired audio headset specification" v1.0.
These buttons will be reported on the jack as buttons 0-3 mapped to
KEY_MEDIA, KEY_VOLUMEUP, KEY_VOLUMEDOWN, and KEY_VOICE_COMMAND.

This will be added as an aux_dev and have the jack passed in from the
machine driver.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-14 10:46:41 +00:00