aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/smiapp/smiapp-regs.h
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2012-03-03 15:19:52 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 08:06:00 -0400
commitccfc97bdb5ae8b8edc55169ac6924e08449836ac (patch)
tree8e9215ce9211d2270e7f3598560b4cf96995aa9e /drivers/media/video/smiapp/smiapp-regs.h
parentcf1c5fae5f8a28d478b7177a2d83e42d25eab072 (diff)
[media] smiapp: Add driver
Add driver for SMIA++/SMIA image sensors. The driver exposes the sensor as three subdevs, pixel array, binner and scaler --- in case the device has a scaler. Currently it relies on the board code for external clock handling. There is no fast way out of this dependency before the ISP drivers (omap3isp) among others will be able to export that clock through the clock framework instead. Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/smiapp/smiapp-regs.h')
-rw-r--r--drivers/media/video/smiapp/smiapp-regs.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/media/video/smiapp/smiapp-regs.h b/drivers/media/video/smiapp/smiapp-regs.h
new file mode 100644
index 000000000000..58e8009d4aa5
--- /dev/null
+++ b/drivers/media/video/smiapp/smiapp-regs.h
@@ -0,0 +1,46 @@
1/*
2 * include/media/smiapp/smiapp-regs.h
3 *
4 * Generic driver for SMIA/SMIA++ compliant camera modules
5 *
6 * Copyright (C) 2011--2012 Nokia Corporation
7 * Contact: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * version 2 as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
25#ifndef SMIAPP_REGS_H
26#define SMIAPP_REGS_H
27
28#include <linux/i2c.h>
29#include <linux/types.h>
30
31/* Use upper 8 bits of the type field for flags */
32#define SMIA_REG_FLAG_FLOAT (1 << 24)
33
34#define SMIA_REG_8BIT 1
35#define SMIA_REG_16BIT 2
36#define SMIA_REG_32BIT 4
37struct smia_reg {
38 u16 type;
39 u16 reg; /* 16-bit offset */
40 u32 val; /* 8/16/32-bit value */
41};
42
43int smiapp_read(struct i2c_client *client, u32 reg, u32 *val);
44int smiapp_write(struct i2c_client *client, u32 reg, u32 val);
45
46#endif