Skip to contentSkip to conversation

drm/i915: Improve kernel-doc for i915_audio_component struct

PATCH Superseded David Henningsson 3 participants 4 messages Sep 3, 2015 – Sep 4, 2015

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Improve kernel-doc for i915_audio_component struct

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

---

Note that I didn't do the same un-nesting for i915_audio_component_ops. This is to make it easier to merge the pending sync_audio_rate patch set.

It applies on top of my just sent patches so should probably be taken through Takashi's tree.

 Documentation/DocBook/drm.tmpl |  1 +
 include/drm/i915_component.h   | 33 +++++++++++++++++++++++----------
 2 files changed, 24 insertions(+), 10 deletions(-)
Documentation/DocBook/drm.tmpl +1 -0
index 2fb9a54..7554679 100644
@@ -4048,6 +4048,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>
include/drm/i915_component.h +23 -10
index b2d56dd..89d6362 100644
@@ -24,6 +24,28 @@
 #ifndef _I915_COMPONENT_H_
 #define _I915_COMPONENT_H_
 
+/**
+ * struct i915_audio_component_audio_ops - i915 directly calling hda driver
+ *
+ * @audio_ptr: Pointer to pass when calling pin_eld_notify.
+ * @pin_eld_notify: Called from i915 driver, notifying the HDA driver that
+ * pin sense and/or ELD information has changed.
+ *
+ * These functions are implemented by hda driver and called by the i915
+ * driver.
+ */
+struct i915_audio_component_audio_ops {
+	void *audio_ptr;
+	void (*pin_eld_notify)(void *audio_ptr, int port);
+};
+
+/**
+ * struct i915_audio_component - Used for direct communication between i915 and hda drivers
+ *
+ * @dev: i915 device, used as parameter for ops
+ * @ops: Ops implemented by i915 driver, called by hda driver
+ * @audio_ops: Ops implemented by hda driver, called by i915 driver
+ */
 struct i915_audio_component {
 	struct device *dev;
 
@@ -35,16 +57,7 @@ struct i915_audio_component {
 		int (*get_cdclk_freq)(struct device *);
 	} *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;
+	const struct i915_audio_component_audio_ops *audio_ops;
 };
 
 #endif /* _I915_COMPONENT_H_ */
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 33 lines · David Henningsson

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

---

Note that I didn't do the same un-nesting for i915_audio_component_ops. This is to make it easier to merge the pending sync_audio_rate patch set.

It applies on top of my just sent patches so should probably be taken through Takashi's tree.

 Documentation/DocBook/drm.tmpl |  1 +
 include/drm/i915_component.h   | 33 +++++++++++++++++++++++----------
 2 files changed, 24 insertions(+), 10 deletions(-)
Documentation/DocBook/drm.tmpl +1 -0
index 2fb9a54..7554679 100644
@@ -4048,6 +4048,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>
include/drm/i915_component.h +0 -0
index b2d56dd..89d6362 100644

include/drm/i915_component.h line 32

Quoted 9 lines
include/drm/i915_component.h +6 -0
@@ -24,6 +24,28 @@
 #ifndef _I915_COMPONENT_H_
 #define _I915_COMPONENT_H_
 
+/**
+ * struct i915_audio_component_audio_ops - i915 directly calling hda driver
+ *
+ * @audio_ptr: Pointer to pass when calling pin_eld_notify.
+ * @pin_eld_notify: Called from i915 driver, notifying the HDA driver that
+ * pin sense and/or ELD information has changed.

I think we should have a bit more detail here where exactly this gets called. Also please use the new inline style for struct members.

/**
* struct foo - foo
*
* High level description.
*/

struct foo {
	/**
	 * @bar:
	 *
	 * Longer text for bar.
	 */
	int bar;
};

Also does your patch build correctly with make htmldocs? Iirc for the old style you used continuation lines for @bar: need to be indented ... -Daniel

Quoted 40 lines
include/drm/i915_component.h +17 -10
+ *
+ * These functions are implemented by hda driver and called by the i915
+ * driver.
+ */
+struct i915_audio_component_audio_ops {
+	void *audio_ptr;
+	void (*pin_eld_notify)(void *audio_ptr, int port);
+};
+
+/**
+ * struct i915_audio_component - Used for direct communication between i915 and hda drivers
+ *
+ * @dev: i915 device, used as parameter for ops
+ * @ops: Ops implemented by i915 driver, called by hda driver
+ * @audio_ops: Ops implemented by hda driver, called by i915 driver
+ */
 struct i915_audio_component {
 	struct device *dev;
 
@@ -35,16 +57,7 @@ struct i915_audio_component {
 		int (*get_cdclk_freq)(struct device *);
 	} *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;
+	const struct i915_audio_component_audio_ops *audio_ops;
 };
 
 #endif /* _I915_COMPONENT_H_ */
Signature · 1 line
1.9.1
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 1 line · Daniel Vetter

Also please use the new inline style for struct members.

I tried that, but I couldn't get it to work. This was with Takashi's for-next tree, do I need to apply some docbook special patches on top of that to get the new functionality?

Signature · 6 lines
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 9 lines · David Henningsson
Quoted 1 line · Daniel Vetter

Also please use the new inline style for struct members.

I tried that, but I couldn't get it to work. This was with Takashi's for-next tree, do I need to apply some docbook special patches on top of that to get the new functionality?

I think you need to pull your changes onto the latest Linus tree. The new docbook stuff was merged for 4.3, IIRC.

Takashi
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx