1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct v4l2_subdev_core_ops</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="mediadev.html#id-1.8.2" title="Video2Linux devices"><link rel="prev" href="API-struct-v4l2-of-link.html" title="struct v4l2_of_link"><link rel="next" href="API-struct-v4l2-subdev-tuner-ops.html" title="struct v4l2_subdev_tuner_ops"></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 v4l2_subdev_core_ops</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-v4l2-of-link.html">Prev</a> </td><th width="60%" align="center">Video2Linux devices</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-v4l2-subdev-tuner-ops.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-v4l2-subdev-core-ops"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct v4l2_subdev_core_ops — 
2  Define core ops callbacks for subdevs
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct v4l2_subdev_core_ops {
5  int (* log_status) (struct v4l2_subdev *sd);
6  int (* s_io_pin_config) (struct v4l2_subdev *sd, size_t n,struct v4l2_subdev_io_pin_config *pincfg);
7  int (* init) (struct v4l2_subdev *sd, u32 val);
8  int (* load_fw) (struct v4l2_subdev *sd);
9  int (* reset) (struct v4l2_subdev *sd, u32 val);
10  int (* s_gpio) (struct v4l2_subdev *sd, u32 val);
11  int (* queryctrl) (struct v4l2_subdev *sd, struct v4l2_queryctrl *qc);
12  int (* g_ctrl) (struct v4l2_subdev *sd, struct v4l2_control *ctrl);
13  int (* s_ctrl) (struct v4l2_subdev *sd, struct v4l2_control *ctrl);
14  int (* g_ext_ctrls) (struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls);
15  int (* s_ext_ctrls) (struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls);
16  int (* try_ext_ctrls) (struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls);
17  int (* querymenu) (struct v4l2_subdev *sd, struct v4l2_querymenu *qm);
18  long (* ioctl) (struct v4l2_subdev *sd, unsigned int cmd, void *arg);
19#ifdef CONFIG_COMPAT
20  long (* compat_ioctl32) (struct v4l2_subdev *sd, unsigned int cmd,unsigned long arg);
21#endif
22#ifdef CONFIG_VIDEO_ADV_DEBUG
23  int (* g_register) (struct v4l2_subdev *sd, struct v4l2_dbg_register *reg);
24  int (* s_register) (struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg);
25#endif
26  int (* s_power) (struct v4l2_subdev *sd, int on);
27  int (* interrupt_service_routine) (struct v4l2_subdev *sd,u32 status, bool *handled);
28  int (* subscribe_event) (struct v4l2_subdev *sd, struct v4l2_fh *fh,struct v4l2_event_subscription *sub);
29  int (* unsubscribe_event) (struct v4l2_subdev *sd, struct v4l2_fh *fh,struct v4l2_event_subscription *sub);
30};  </pre></div><div class="refsect1"><a name="id-1.8.2.79.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">log_status</span></dt><dd><p>
31callback for VIDIOC_LOG_STATUS ioctl handler code.
32      </p></dd><dt><span class="term">s_io_pin_config</span></dt><dd><p>
33configure one or more chip I/O pins for chips that
34multiplex different internal signal pads out to IO pins.  This function
35takes a pointer to an array of 'n' pin configuration entries, one for
36each pin being configured.  This function could be called at times
37other than just subdevice initialization.
38      </p></dd><dt><span class="term">init</span></dt><dd><p>
39initialize the sensor registers to some sort of reasonable default
40values. Do not use for new drivers and should be removed in existing
41drivers.
42      </p></dd><dt><span class="term">load_fw</span></dt><dd><p>
43load firmware.
44      </p></dd><dt><span class="term">reset</span></dt><dd><p>
45generic reset command. The argument selects which subsystems to
46reset. Passing 0 will always reset the whole chip. Do not use for new
47drivers without discussing this first on the linux-media mailinglist.
48There should be no reason normally to reset a device.
49      </p></dd><dt><span class="term">s_gpio</span></dt><dd><p>
50set GPIO pins. Very simple right now, might need to be extended with
51a direction argument if needed.
52      </p></dd><dt><span class="term">queryctrl</span></dt><dd><p>
53callback for VIDIOC_QUERYCTL ioctl handler code.
54      </p></dd><dt><span class="term">g_ctrl</span></dt><dd><p>
55callback for VIDIOC_G_CTRL ioctl handler code.
56      </p></dd><dt><span class="term">s_ctrl</span></dt><dd><p>
57callback for VIDIOC_S_CTRL ioctl handler code.
58      </p></dd><dt><span class="term">g_ext_ctrls</span></dt><dd><p>
59callback for VIDIOC_G_EXT_CTRLS ioctl handler code.
60      </p></dd><dt><span class="term">s_ext_ctrls</span></dt><dd><p>
61callback for VIDIOC_S_EXT_CTRLS ioctl handler code.
62      </p></dd><dt><span class="term">try_ext_ctrls</span></dt><dd><p>
63callback for VIDIOC_TRY_EXT_CTRLS ioctl handler code.
64      </p></dd><dt><span class="term">querymenu</span></dt><dd><p>
65callback for VIDIOC_QUERYMENU ioctl handler code.
66      </p></dd><dt><span class="term">ioctl</span></dt><dd><p>
67called at the end of <code class="function">ioctl</code> syscall handler at the V4L2 core.
68used to provide support for private ioctls used on the driver.
69      </p></dd><dt><span class="term">compat_ioctl32</span></dt><dd><p>
70called when a 32 bits application uses a 64 bits Kernel,
71in order to fix data passed from/to userspace.
72      </p></dd><dt><span class="term">g_register</span></dt><dd><p>
73callback for VIDIOC_G_REGISTER ioctl handler code.
74      </p></dd><dt><span class="term">s_register</span></dt><dd><p>
75callback for VIDIOC_G_REGISTER ioctl handler code.
76      </p></dd><dt><span class="term">s_power</span></dt><dd><p>
77puts subdevice in power saving mode (on == 0) or normal operation
78mode (on == 1).
79      </p></dd><dt><span class="term">interrupt_service_routine</span></dt><dd><p>
80Called by the bridge chip's interrupt service
81handler, when an interrupt status has be raised due to this subdev,
82so that this subdev can handle the details.  It may schedule work to be
83performed later.  It must not sleep.  *Called from an IRQ context*.
84      </p></dd><dt><span class="term">subscribe_event</span></dt><dd><p>
85used by the drivers to request the control framework that
86for it to be warned when the value of a control changes.
87      </p></dd><dt><span class="term">unsubscribe_event</span></dt><dd><p>
88remove event subscription from the control framework.
89      </p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-v4l2-of-link.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mediadev.html#id-1.8.2">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-v4l2-subdev-tuner-ops.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct v4l2_of_link</span> </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 v4l2_subdev_tuner_ops</span></td></tr></table></div></body></html>
90