[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+Px+wXtmf9dQQP7ywPLp7Qbbvqau=WnO3qhZ8+qmbJD1gjx+A@mail.gmail.com>
Date: Fri, 5 Jul 2019 15:08:37 +0800
From: Tzung-Bi Shih <tzungbi@...gle.com>
To: Cheng-Yi Chiang <cychiang@...omium.org>
Cc: linux-kernel@...r.kernel.org, Hans Verkuil <hverkuil@...all.nl>,
Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Takashi Iwai <tiwai@...e.com>,
Jaroslav Kysela <perex@...ex.cz>,
Russell King <rmk+kernel@...linux.org.uk>,
Andrzej Hajda <a.hajda@...sung.com>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Heiko Stuebner <heiko@...ech.de>, dianders@...omium.org,
dgreid@...omium.org, tzungbi@...omium.org,
ALSA development <alsa-devel@...a-project.org>,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org
Subject: Re: [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@...omium.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.
Powered by blists - more mailing lists