0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef STV06XX_SENSOR_H_
0018 #define STV06XX_SENSOR_H_
0019
0020 #include "stv06xx.h"
0021
0022 #define IS_1020(sd) ((sd)->sensor == &stv06xx_sensor_hdcs1020)
0023
0024 extern const struct stv06xx_sensor stv06xx_sensor_vv6410;
0025 extern const struct stv06xx_sensor stv06xx_sensor_hdcs1x00;
0026 extern const struct stv06xx_sensor stv06xx_sensor_hdcs1020;
0027 extern const struct stv06xx_sensor stv06xx_sensor_pb0100;
0028 extern const struct stv06xx_sensor stv06xx_sensor_st6422;
0029
0030 struct stv06xx_sensor {
0031
0032 char name[32];
0033
0034
0035 u8 i2c_addr;
0036
0037
0038 u8 i2c_flush;
0039
0040
0041 u8 i2c_len;
0042
0043
0044 int min_packet_size[4];
0045 int max_packet_size[4];
0046
0047
0048 int (*probe)(struct sd *sd);
0049
0050
0051 int (*init)(struct sd *sd);
0052
0053
0054 int (*init_controls)(struct sd *sd);
0055
0056
0057 int (*read_sensor)(struct sd *sd, const u8 address,
0058 u8 *i2c_data, const u8 len);
0059
0060
0061 int (*write_sensor)(struct sd *sd, const u8 address,
0062 u8 *i2c_data, const u8 len);
0063
0064
0065 int (*start)(struct sd *sd);
0066
0067
0068 int (*stop)(struct sd *sd);
0069
0070
0071 int (*dump)(struct sd *sd);
0072 };
0073
0074 #endif