Re: [PATCH 1/3] ASoC: jack: Add a jack detect callback via codec

From: Xing Zheng
Date: Mon Apr 18 2016 - 05:44:11 EST

Hi Mark,

On 2016å04æ18æ 17:22, Mark Brown wrote:
On Mon, Apr 18, 2016 at 04:17:30PM +0800, Xing Zheng wrote:
This patch add a callback when a codec have the jack detect feature.
+void snd_soc_jack_codec_detect(struct snd_soc_codec *codec,
+ struct snd_soc_jack *jack)
+ if (codec&& codec->driver&& codec->driver->detect_jack)
+ codec->driver->detect_jack(codec, jack);
I've no idea what this is supposed to do sorry, you need a much better
changelog and probably also a restructuring of the code. This says it
is adding a callback but it doesn't do that, it adds an export of a
function that calls an operation in a driver with no explanation.
Yes, sorry to forgot to add description for this API.

The patch_1/3 add an export of a function that calls the _detect_jack_ function
when a codec supports jack detection and fill the _detect_jack_ function in the
struct snd_soc_codec_driver.

I will clean up the commit message.


- Xing Zheng