1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct media_device</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="ch06s04.html" title="Media Controller devices"><link rel="prev" href="ch06s04.html" title="Media Controller devices"><link rel="next" href="API-struct-media-devnode.html" title="struct media_devnode"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct media_device</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch06s04.html">Prev</a> </td><th width="60%" align="center">Media Controller devices</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-media-devnode.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-media-device"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct media_device — 2 Media device 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct media_device { 5 struct device * dev; 6 struct media_devnode devnode; 7 char model[32]; 8 char serial[40]; 9 char bus_info[32]; 10 u32 hw_revision; 11 u32 driver_version; 12 u32 entity_id; 13 struct list_head entities; 14 spinlock_t lock; 15 struct mutex graph_mutex; 16 int (* link_notify) (struct media_link *link, u32 flags,unsigned int notification); 17}; </pre></div><div class="refsect1"><a name="id-1.8.5.2.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">dev</span></dt><dd><p> 18Parent device 19 </p></dd><dt><span class="term">devnode</span></dt><dd><p> 20Media device node 21 </p></dd><dt><span class="term">model[32]</span></dt><dd><p> 22Device model name 23 </p></dd><dt><span class="term">serial[40]</span></dt><dd><p> 24Device serial number (optional) 25 </p></dd><dt><span class="term">bus_info[32]</span></dt><dd><p> 26Unique and stable device location identifier 27 </p></dd><dt><span class="term">hw_revision</span></dt><dd><p> 28Hardware device revision 29 </p></dd><dt><span class="term">driver_version</span></dt><dd><p> 30Device driver version 31 </p></dd><dt><span class="term">entity_id</span></dt><dd><p> 32ID of the next entity to be registered 33 </p></dd><dt><span class="term">entities</span></dt><dd><p> 34List of registered entities 35 </p></dd><dt><span class="term">lock</span></dt><dd><p> 36Entities list lock 37 </p></dd><dt><span class="term">graph_mutex</span></dt><dd><p> 38Entities graph operation lock 39 </p></dd><dt><span class="term">link_notify</span></dt><dd><p> 40Link state change notification callback 41 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.8.5.2.6"></a><h2>Description</h2><p> 42 This structure represents an abstract high-level media device. It allows easy 43 access to entities and provides basic media device-level support. The 44 structure can be allocated directly or embedded in a larger structure. 45 </p><p> 46 47 The parent <em class="parameter"><code>dev</code></em> is a physical device. It must be set before registering the 48 media device. 49 </p><p> 50 51 <em class="parameter"><code>model</code></em> is a descriptive model name exported through sysfs. It doesn't have to 52 be unique. 53</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch06s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch06s04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-media-devnode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Media Controller devices </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct media_devnode</span></td></tr></table></div></body></html> 54