PM / sleep: Asynchronous threads for suspend_noirq
[linux/fpc-iii.git] / drivers / media / i2c / smiapp / smiapp-regs.h
blobeefc6c84d5fefca42b77dfd54f79c719e3f66f38
1 /*
2 * include/media/smiapp/smiapp-regs.h
4 * Generic driver for SMIA/SMIA++ compliant camera modules
6 * Copyright (C) 2011--2012 Nokia Corporation
7 * Contact: Sakari Ailus <sakari.ailus@iki.fi>
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.
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.
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
25 #ifndef SMIAPP_REGS_H
26 #define SMIAPP_REGS_H
28 #include <linux/i2c.h>
29 #include <linux/types.h>
31 /* Use upper 8 bits of the type field for flags */
32 #define SMIA_REG_FLAG_FLOAT (1 << 24)
34 #define SMIA_REG_8BIT 1
35 #define SMIA_REG_16BIT 2
36 #define SMIA_REG_32BIT 4
37 struct smia_reg {
38 u16 type;
39 u16 reg; /* 16-bit offset */
40 u32 val; /* 8/16/32-bit value */
43 struct smiapp_sensor;
45 int smiapp_read(struct smiapp_sensor *sensor, u32 reg, u32 *val);
46 int smiapp_read_8only(struct smiapp_sensor *sensor, u32 reg, u32 *val);
47 int smiapp_write(struct smiapp_sensor *sensor, u32 reg, u32 val);
49 #endif