All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: tiwai@suse.de, intel-gfx@lists.freedesktop.org,
	alsa-devel@alsa-project.org, daniel@ffwll.ch,
	jani.nikula@linux.intel.com, libin.yang@intel.com
Cc: David Henningsson <david.henningsson@canonical.com>
Subject: [PATCH v2] drm/i915: Improve kernel-doc for i915_audio_component struct
Date: Mon, 12 Oct 2015 10:07:57 +0200	[thread overview]
Message-ID: <1444637277-17784-1-git-send-email-david.henningsson@canonical.com> (raw)

To make kernel-doc happy, the i915_audio_component_audio_ops struct
cannot be nested.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 Documentation/DocBook/drm.tmpl |  1 +
 include/drm/i915_component.h   | 92 ++++++++++++++++++++++++++++++------------
 2 files changed, 67 insertions(+), 26 deletions(-)

diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 9ddf8c6..f16e4e8 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -4051,6 +4051,7 @@ int num_ioctls;</synopsis>
 	<title>High Definition Audio</title>
 !Pdrivers/gpu/drm/i915/intel_audio.c High Definition Audio over HDMI and Display Port
 !Idrivers/gpu/drm/i915/intel_audio.c
+!Iinclude/drm/i915_component.h
       </sect2>
       <sect2>
 	<title>Panel Self Refresh PSR (PSR/SRD)</title>
diff --git a/include/drm/i915_component.h b/include/drm/i915_component.h
index 89dc7d6..76c10c8 100644
--- a/include/drm/i915_component.h
+++ b/include/drm/i915_component.h
@@ -30,38 +30,78 @@
  */
 #define MAX_PORTS 5
 
+/**
+ * struct i915_audio_component_ops - Ops implemented by i915 driver, called by hda driver
+ */
+struct i915_audio_component_ops {
+	/**
+	 * @owner: i915 module
+	 */
+	struct module *owner;
+	/**
+	 * @get_power: Request that power well is to be turned on
+	 */
+	void (*get_power)(struct device *);
+	/**
+	 * @put_power: Allow the power well to be turned off
+	 */
+	void (*put_power)(struct device *);
+	/**
+	 * @codec_wake_override: Force the audio codec to stay awake
+	 */
+	void (*codec_wake_override)(struct device *, bool enable);
+	/**
+	 * @get_cdclk_freq: Query the i915 driver about the current cdclk frequency
+	 */
+	int (*get_cdclk_freq)(struct device *);
+	/**
+	 * @sync_audio_rate: set n/cts based on the sample rate
+	 *
+	 * Called from audio driver. After audio driver sets the
+	 * sample rate, it will call this function to set n/cts
+	 */
+	int (*sync_audio_rate)(struct device *, int port, int rate);
+};
+
+/**
+ * struct i915_audio_component_audio_ops - Ops implemented by hda driver, called by i915 driver
+ */
+struct i915_audio_component_audio_ops {
+	/**
+	 * @audio_ptr: Pointer to be used in call to pin_eld_notify
+	 */
+	void *audio_ptr;
+	/**
+	 * @pin_eld_notify: Notify the HDA driver that pin sense and/or ELD information has changed
+	 *
+	 * Called when the i915 driver has set up audio pipeline or has just
+	 * begun to tear it down. This allows the HDA driver to update its
+	 * status accordingly (even when the HDA controller is in power save
+	 * mode).
+	 */
+	void (*pin_eld_notify)(void *audio_ptr, int port);
+};
+
+/**
+ * struct i915_audio_component - Used for direct communication between i915 and hda drivers
+ */
 struct i915_audio_component {
+	/**
+	 * @dev: i915 device, used as parameter for ops
+	 */
 	struct device *dev;
 	/**
 	 * @aud_sample_rate: the array of audio sample rate per port
 	 */
 	int aud_sample_rate[MAX_PORTS];
-
-	const struct i915_audio_component_ops {
-		struct module *owner;
-		void (*get_power)(struct device *);
-		void (*put_power)(struct device *);
-		void (*codec_wake_override)(struct device *, bool enable);
-		int (*get_cdclk_freq)(struct device *);
-		/**
-		 * @sync_audio_rate: set n/cts based on the sample rate
-		 *
-		 * Called from audio driver. After audio driver sets the
-		 * sample rate, it will call this function to set n/cts
-		 */
-		int (*sync_audio_rate)(struct device *, int port, int rate);
-	} *ops;
-
-	const struct i915_audio_component_audio_ops {
-		void *audio_ptr;
-		/**
-		 * Call from i915 driver, notifying the HDA driver that
-		 * pin sense and/or ELD information has changed.
-		 * @audio_ptr:		HDA driver object
-		 * @port:		Which port has changed (PORTA / PORTB / PORTC etc)
-		 */
-		void (*pin_eld_notify)(void *audio_ptr, int port);
-	} *audio_ops;
+	/**
+	 * @ops: Ops implemented by i915 driver, called by hda driver
+	 */
+	const struct i915_audio_component_ops *ops;
+	/**
+	 * @audio_ops: Ops implemented by hda driver, called by i915 driver
+	 */
+	const struct i915_audio_component_audio_ops *audio_ops;
 };
 
 #endif /* _I915_COMPONENT_H_ */
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2015-10-12  8:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12  8:07 David Henningsson [this message]
2015-10-12  8:17 ` [PATCH v2] drm/i915: Improve kernel-doc for i915_audio_component struct David Henningsson
2015-10-13  9:40   ` Takashi Iwai
2015-10-13 15:39     ` Daniel Vetter
2015-10-13 15:41       ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444637277-17784-1-git-send-email-david.henningsson@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=libin.yang@intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.