lkml.org 
[lkml]   [2019]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/4] ASoC: hdmi-codec: Add an op to set callback function for plug event
On Fri, Jul 5, 2019 at 12:26 PM Cheng-Yi Chiang <cychiang@chromium.org> wrote:
> diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h
> index 7fea496f1f34..26c02abb8eba 100644
> --- a/include/sound/hdmi-codec.h
> +++ b/include/sound/hdmi-codec.h
> @@ -47,6 +47,9 @@ struct hdmi_codec_params {
> int channels;
> };
>
> +typedef void (*hdmi_codec_plugged_cb)(struct platform_device *dev,
> + bool plugged);
> +
The callback prototype is "weird" by struct platform_device. Is it
possible to having snd_soc_component instead of platform_device?

> struct hdmi_codec_pdata;
> struct hdmi_codec_ops {
> /*
> @@ -88,6 +91,13 @@ struct hdmi_codec_ops {
> */
> int (*get_dai_id)(struct snd_soc_component *comment,
> struct device_node *endpoint);
> +
> + /*
> + * Hook callback function to handle connector plug event.
> + * Optional
> + */
> + int (*hook_plugged_cb)(struct device *dev, void *data,
> + hdmi_codec_plugged_cb fn);
> };
The first parameter dev could be removed. Not used.

\
 
 \ /
  Last update: 2019-07-05 09:09    [W:0.348 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site