From: Sakari Ailus <sakari.ailus@nokia.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] ARM: OMAP2: Camera: Modify sensor interface.
Date: Wed, 28 Feb 2007 17:59:15 +0200 [thread overview]
Message-ID: <11726783561918-git-send-email-sakari.ailus@nokia.com> (raw)
In-Reply-To: <11726783562842-git-send-email-sakari.ailus@nokia.com>
Clean up sensor interface.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
---
drivers/media/video/omap/sensor_if.h | 59 +++++++++++++++++++++++++--------
1 files changed, 44 insertions(+), 15 deletions(-)
diff --git a/drivers/media/video/omap/sensor_if.h b/drivers/media/video/omap/sensor_if.h
index 47bb716..cda2686 100644
--- a/drivers/media/video/omap/sensor_if.h
+++ b/drivers/media/video/omap/sensor_if.h
@@ -20,31 +20,60 @@
#define OMAP_SENSOR_NAME_LEN 31
+struct omap_camera_sensor;
+
+struct omap_camera {
+ void *priv;
+ /*
+ * Tell camera to reset the sensor, i.e. power down and up
+ * again.
+ */
+ int (*sensor_register)(struct omap_camera *oc,
+ struct omap_camera_sensor *os);
+ void (*sensor_unregister)(struct omap_camera *oc,
+ struct omap_camera_sensor *os);
+ void (*sensor_reset)(struct omap_camera *oc,
+ struct omap_camera_sensor *os);
+};
+
struct omap_camera_sensor {
unsigned int version;
char name[OMAP_SENSOR_NAME_LEN + 1];
- void *(*init)(struct v4l2_pix_format *);
- int (*cleanup)(void *);
+ struct module *module;
+ void *priv; /* sensor's private data */
- int (*power_on)(void *);
- int (*power_off)(void *);
+ int (*init)(struct omap_camera_sensor *os, struct v4l2_pix_format *pix,
+ struct omap_camera *oc);
+ int (*cleanup)(struct omap_camera_sensor *os);
- int (*enum_pixformat)(struct v4l2_fmtdesc *, void *);
- int (*try_format)(struct v4l2_pix_format *, void *);
+ int (*power_on)(struct omap_camera_sensor *os);
+ int (*power_off)(struct omap_camera_sensor *os);
- unsigned long (*calc_xclk)(struct v4l2_pix_format *,
- struct v4l2_fract *, void *);
+ int (*frame_check)(struct omap_camera_sensor *os,
+ struct v4l2_pix_format *pix, void *buf);
- int (*configure)(struct v4l2_pix_format *, unsigned long,
- struct v4l2_fract *, void *);
+ int (*enum_pixformat)(struct omap_camera_sensor *os,
+ struct v4l2_fmtdesc *fmtdesc);
+ int (*try_format)(struct omap_camera_sensor *os,
+ struct v4l2_pix_format *fmt);
- int (*query_control) (struct v4l2_queryctrl *, void *);
- int (*get_control)(struct v4l2_control *, void *);
- int (*set_control)(struct v4l2_control *, void *);
+ unsigned long (*calc_xclk)(struct omap_camera_sensor *os,
+ struct v4l2_pix_format *fmt,
+ struct v4l2_fract *fract);
-};
+ int (*configure)(struct omap_camera_sensor *os,
+ struct v4l2_pix_format *fmt, unsigned long,
+ struct v4l2_fract *fract);
-extern struct omap_camera_sensor camera_sensor_if;
+ int (*query_control) (struct omap_camera_sensor *os,
+ struct v4l2_queryctrl *ctrl);
+ int (*get_control)(struct omap_camera_sensor *os,
+ struct v4l2_control *ctrl);
+ int (*set_control)(struct omap_camera_sensor *os,
+ struct v4l2_control *ctrl);
+};
+
+extern struct omap_camera omap24xxcam_camera;
#endif
--
1.5.0.1
next prev parent reply other threads:[~2007-02-28 15:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-28 15:49 [PATCH] OMAP2 camera and TCM825x sensor drivers Sakari Ailus
2007-02-28 15:59 ` [PATCH] ARM: OMAP2: Camera: Add OMAP2 24xx camera driver Sakari Ailus
2007-02-28 15:59 ` [PATCH] ARM: OMAP2: Camera: Add a driver for TCM825x sensor Sakari Ailus
2007-02-28 15:59 ` Sakari Ailus [this message]
2007-02-28 15:59 ` [PATCH] ARM: OMAP2: Camera: Adapt to 2.6.20 Sakari Ailus
2007-03-01 5:28 ` Trilok Soni
2007-03-02 11:49 ` Sakari Ailus
2007-03-01 7:26 ` [PATCH] ARM: OMAP2: Camera: Add OMAP2 24xx camera driver Trilok Soni
2007-03-02 17:50 ` Sakari Ailus
2007-03-02 15:18 ` Syed Mohammed, Khasim
2007-03-05 9:25 ` Sakari Ailus
2007-03-05 10:26 ` Trilok Soni
2007-03-02 19:12 ` Syed Mohammed, Khasim
[not found] ` <b8bf37780702280821wb17104chf75b973b420895ef@mail.gmail.com>
[not found] ` <200703010848.32757.andre.rosa@indt.org.br>
2007-03-14 9:29 ` Fwd: " Sakari Ailus
2007-02-28 16:39 ` [PATCH] OMAP2 camera and TCM825x sensor drivers Syed Mohammed, Khasim
2007-03-01 5:48 ` Trilok Soni
2007-03-01 8:06 ` tony
2007-03-01 23:03 ` Syed Mohammed, Khasim
2007-03-02 4:39 ` sahlot arvind
2007-03-02 11:15 ` André Goddard Rosa
2007-03-07 12:08 ` Sakari Ailus
2007-03-02 9:42 ` Sakari Ailus
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=11726783561918-git-send-email-sakari.ailus@nokia.com \
--to=sakari.ailus@nokia.com \
--cc=linux-omap-open-source@linux.omap.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox