type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines | #define m5mo_writew(sd, g, b, v) m5mo_write(sd, 2, g, b, v) |
defines | #define m5mo_writel(sd, g, b, v) m5mo_write(sd, 4, g, b, v) |
defines |
#define CHECK_ERR(x) if ((x) < 0) { \ |
defines |
#define NELEMS(array) (sizeof(array) / sizeof(array[0])) |
functions | if defined(CONFIG_MACH_Q1_BD)
{ M5MO_PREVIEW_880_720, 880, 720, 0x2E } |
functions | int m5mo_read(struct v4l2_subdev *sd,
u8 len, u8 category, u8 byte, int *val)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct i2c_msg msg;
unsigned char data[5];
unsigned char recv_data[len + 1];
int i, err = 0;
if (!client->adapter)
return -ENODEV;
if (len != 0x01 && len != 0x02 && len != 0x0... |
functions | int m5mo_write(struct v4l2_subdev *sd,
u8 len, u8 category, u8 byte, int val)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct i2c_msg msg;
unsigned char data[len + 4];
int i, err;
if (!client->adapter)
return -ENODEV;
if (len != 0x01 && len != 0x02 && len != 0x04)
return -EINVAL;
msg.addr =... |
functions | else if (len == 0x02) {
data[4] = (val >> 8) & 0xFF;
data[5] = val & 0xFF;
} |
functions | int m5mo_mem_read(struct v4l2_subdev *sd, u16 len, u32 addr, u8 *val)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct i2c_msg msg;
unsigned char data[8];
unsigned char recv_data[len + 3];
int i, err = 0;
if (!client->adapter)
return -ENODEV;
if (len <= 0)
return -EINVAL;
msg.addr = client->... |
functions | int m5mo_mem_write(struct v4l2_subdev *sd, u8 cmd, u16 len, u32 addr, u8 *val)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct i2c_msg msg;
unsigned char data[len + 8];
int i, err = 0;
if (!client->adapter)
return -ENODEV;
msg.addr = client->addr;
msg.flags = 0;
msg.len = sizeof(data);
msg.bu... |
functions | irqreturn_t m5mo_isp_isr(int irq, void *dev_id)
{
struct v4l2_subdev *sd = (struct v4l2_subdev *)dev_id;
struct m5mo_state *state = to_state(sd);
cam_dbg("**************** interrupt ****************\n");
state->isp.issued = 1;
wake_up_interruptible(&state->isp.wait);
return IRQ_HANDLED;
} |
functions | u32 m5mo_wait_interrupt(struct v4l2_subdev *sd,
unsigned int timeout)
{
struct m5mo_state *state = to_state(sd);
cam_trace("E\n");
if (wait_event_interruptible_timeout(state->isp.wait,
state->isp.issued == 1,
msecs_to_jiffies(timeout)) == 0) {
cam_err("timeout\n");
return 0;
} |
functions | int m5mo_set_mode(struct v4l2_subdev *sd, u32 mode)
{
int i, err;
u32 old_mode, val;
cam_trace("E\n");
err = m5mo_readb(sd, M5MO_CATEGORY_SYS, M5MO_SYS_MODE, &old_mode);
if (err < 0)
return err;
if (old_mode == mode) {
#ifndef PRODUCT_SHIP
cam_dbg("%#x -> %#x\n", old_mode, mode);
#endif
return old_m... |
functions | endif
switch (old_mode) {
case M5MO_SYSINIT_MODE:
cam_warn("sensor is initializing\n");
err = -EBUSY;
break;
case M5MO_PARMSET_MODE:
if (mode == M5MO_STILLCAP_MODE) {
err = m5mo_writeb(sd, M5MO_CATEGORY_SYS,
M5MO_SYS_MODE, M5MO_MONITOR_MODE);
if (err < 0)
break;
for (i = M5MO_I2C_VERIFY; i... |
functions | int m5mo_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
{
int i;
for (i = 0; i < ARRAY_SIZE(m5mo_ctrls); i++) {
if (qc->id == m5mo_ctrls[i].id) {
qc->maximum = m5mo_ctrls[i].maximum;
qc->minimum = m5mo_ctrls[i].minimum;
qc->step = m5mo_ctrls[i].step;
qc->default_value = m5mo_ctrls[i].defa... |
functions | int m5mo_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
{
struct m5mo_state *state = to_state(sd);
int err = 0;
switch (ctrl->id) {
case V4L2_CID_CAMERA_AUTO_FOCUS_RESULT:
m5mo_get_af_result(sd, ctrl);
break;
case V4L2_CID_CAM_JPEG_MEMSIZE:
ctrl->value = M5MO_JPEG_MAXSIZE +
M5MO_THUMB_MAXSIZE... |
functions | int m5mo_set_antibanding(struct v4l2_subdev *sd,
struct v4l2_control *ctrl)
{
struct v4l2_queryctrl qc = {0,} |
functions | int m5mo_set_af_softlanding(struct v4l2_subdev *sd)
{
struct m5mo_state *state = to_state(sd);
u32 status = 0;
int i, err = 0;
cam_trace("E\n");
if (unlikely(state->isp.bad_fw)) {
cam_err("\"Unknown\" state, please update F/W");
return -ENOSYS;
} |
functions | int m5mo_dump_fw(struct v4l2_subdev *sd)
{
struct file *fp;
mm_segment_t old_fs;
u8 *buf, val;
u32 addr, unit, count, intram_unit = 0x1000;
int i, j, err;
old_fs = get_fs();
set_fs(KERNEL_DS);
fp = filp_open(M5MO_FW_DUMP_PATH,
O_WRONLY|O_CREAT|O_TRUNC, S_IRUGO|S_IWUGO|S_IXUSR);
if (IS_ERR(fp)) {
cam_err(... |
functions | int m5mo_get_sensor_fw_version(struct v4l2_subdev *sd,
char *buf)
{
u8 val;
int err;
/* set pin */
val = 0x7E;
err = m5mo_mem_write(sd, 0x04, sizeof(val), 0x50000308, &val);
CHECK_ERR(err);
err = m5mo_mem_read(sd, M5MO_FW_VER_LEN,
M5MO_FLASH_BASE_ADDR + M5MO_FW_VER_FILE_CUR, buf);
cam_dbg("%s\n", buf);
r... |
functions | int m5mo_get_phone_fw_version(struct v4l2_subdev *sd, char *buf)
{
struct device *dev = sd->v4l2_dev->dev;
u8 sensor_ver[M5MO_FW_VER_LEN] = {0, } |
functions | else if (sensor_ver[0] == 'O' && sensor_ver[1] == 'O') {
err = request_firmware(&fw, M5MOOO_FW_PATH, dev);
#endif
#if defined(CONFIG_MACH_U1_KOR_LGT)
} |
functions | else if (sensor_ver[0] == 'S' && sensor_ver[1] == 'B') {
err = request_firmware(&fw, M5MOSB_FW_PATH, dev);
#endif
} |
functions | int m5mo_check_fw(struct v4l2_subdev *sd)
{
struct m5mo_state *state = to_state(sd);
u8 sensor_ver[M5MO_FW_VER_LEN] = "FAILED Fujitsu M5MOLS";
u8 phone_ver[M5MO_FW_VER_LEN] = "FAILED Fujitsu M5MOLS";
int af_cal_h = 0, af_cal_l = 0;
int rg_cal_h = 0, rg_cal_l = 0;
int bg_cal_h = 0, bg_cal_l = 0;
int update_count ... |
functions | int m5mo_set_sensor_mode(struct v4l2_subdev *sd, int val)
{
struct m5mo_state *state = to_state(sd);
int err;
cam_dbg("E, value %d\n", val);
err = m5mo_set_mode(sd, M5MO_PARMSET_MODE);
CHECK_ERR(err);
err = m5mo_writeb(sd, M5MO_CATEGORY_PARM,
M5MO_PARM_HDMOVIE, val == SENSOR_MOVIE ? 0x01 : 0x00);
CHECK_ERR(e... |
functions | int m5mo_set_flash(struct v4l2_subdev *sd, int val, int force)
{
struct m5mo_state *state = to_state(sd);
int light, flash;
int err;
cam_dbg("E, value %d\n", val);
if (!force)
state->flash_mode = val;
/* movie flash mode should be set when recording is started */
if (state->sensor_mode == SENSOR_MOVIE && !st... |
functions | int m5mo_set_iso(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
{
struct m5mo_state *state = to_state(sd);
struct v4l2_queryctrl qc = {0,} |
functions | int m5mo_set_metering(struct v4l2_subdev *sd, int val)
{
int err;
cam_dbg("E, value %d\n", val);
retry:
switch (val) {
case METERING_CENTER:
err = m5mo_writeb(sd, M5MO_CATEGORY_AE, M5MO_AE_MODE, 0x03);
CHECK_ERR(err);
break;
case METERING_SPOT:
err = m5mo_writeb(sd, M5MO_CATEGORY_AE, M5MO_AE_MODE, 0x06);
... |
functions | int m5mo_set_exposure(struct v4l2_subdev *sd,
struct v4l2_control *ctrl)
{
struct v4l2_queryctrl qc = {0,} |
functions | int m5mo_set_whitebalance(struct v4l2_subdev *sd, int val)
{
int err;
cam_dbg("E, value %d\n", val);
retry:
switch (val) {
case WHITE_BALANCE_AUTO:
err = m5mo_writeb(sd, M5MO_CATEGORY_WB,
M5MO_WB_AWB_MODE, 0x01);
CHECK_ERR(err);
err = m5mo_writeb(sd, M5MO_CATEGORY_WB,
M5MO_WB_AWB_MANUAL, 0x01);
CHECK... |
functions | int m5mo_set_sharpness(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
{
struct v4l2_queryctrl qc = {0,} |
functions | int m5mo_set_saturation(struct v4l2_subdev *sd,
struct v4l2_control *ctrl)
{
struct v4l2_queryctrl qc = {0,} |
functions | int m5mo_set_scene_mode(struct v4l2_subdev *sd, int val)
{
struct m5mo_state *state = to_state(sd);
struct v4l2_control ctrl;
int evp, sharpness, saturation;
int err;
cam_dbg("E, value %d\n", val);
sharpness = SHARPNESS_DEFAULT;
saturation = CONTRAST_DEFAULT;
retry:
switch (val) {
case SCENE_MODE_NONE:
evp... |
functions | int m5mo_set_effect_color(struct v4l2_subdev *sd, int val)
{
u32 int_factor;
int on, old_mode, cb, cr;
int err;
err = m5mo_readb(sd, M5MO_CATEGORY_PARM, M5MO_PARM_EFFECT, &on);
CHECK_ERR(err);
if (on) {
old_mode = m5mo_set_mode(sd, M5MO_PARMSET_MODE);
CHECK_ERR(old_mode);
err = m5mo_writeb(sd, M5MO_CATEGO... |
functions | int m5mo_set_effect_gamma(struct v4l2_subdev *sd, s32 val)
{
u32 int_factor;
int on, effect, old_mode;
int err;
err = m5mo_readb(sd, M5MO_CATEGORY_MON, M5MO_MON_COLOR_EFFECT, &on);
CHECK_ERR(err);
if (on) {
err = m5mo_writeb(sd, M5MO_CATEGORY_MON,
M5MO_MON_COLOR_EFFECT, 0);
CHECK_ERR(err);
} |
functions | int m5mo_set_effect(struct v4l2_subdev *sd, int val)
{
int err;
cam_dbg("E, value %d\n", val);
retry:
switch (val) {
case IMAGE_EFFECT_NONE:
case IMAGE_EFFECT_BNW:
case IMAGE_EFFECT_SEPIA:
err = m5mo_set_effect_color(sd, val);
CHECK_ERR(err);
break;
case IMAGE_EFFECT_AQUA:
case IMAGE_EFFECT_NEGATIVE:
... |
functions | int m5mo_set_wdr(struct v4l2_subdev *sd, int val)
{
int contrast, wdr, err;
cam_dbg("%s\n", val ? "on" : "off");
contrast = (val == 1 ? 0x09 : 0x05);
wdr = (val == 1 ? 0x01 : 0x00);
err = m5mo_writeb(sd, M5MO_CATEGORY_MON,
M5MO_MON_TONE_CTRL, contrast);
CHECK_ERR(err);
err = m5mo_writeb(sd, M5MO_CATEGORY_... |
functions | int m5mo_set_antishake(struct v4l2_subdev *sd, int val)
{
struct m5mo_state *state = to_state(sd);
int ahs, err;
if (state->scene_mode != SCENE_MODE_NONE) {
cam_warn("Should not be set with scene mode");
return 0;
} |
functions | int m5mo_set_face_beauty(struct v4l2_subdev *sd, int val)
{
struct m5mo_state *state = to_state(sd);
int err;
cam_dbg("%s\n", val ? "on" : "off");
err = m5mo_writeb(sd, M5MO_CATEGORY_CAPPARM,
M5MO_CAPPARM_AFB_CAP_EN, val ? 0x01 : 0x00);
CHECK_ERR(err);
state->face_beauty = val;
cam_trace("X\n");
return 0;... |
functions | int m5mo_set_lock(struct v4l2_subdev *sd, int val)
{
struct m5mo_state *state = to_state(sd);
int err;
cam_trace("%s\n", val ? "on" : "off");
err = m5mo_writeb(sd, M5MO_CATEGORY_AE, M5MO_AE_LOCK, val);
CHECK_ERR(err);
err = m5mo_writeb(sd, M5MO_CATEGORY_WB, M5MO_AWB_LOCK, val);
CHECK_ERR(err);
state->focus.l... |
functions | int m5mo_get_af_result(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
{
struct m5mo_state *state = to_state(sd);
int status, err;
err = m5mo_readb(sd, M5MO_CATEGORY_LENS,
M5MO_LENS_AF_STATUS, &status);
state->focus.status = status;
ctrl->value = status;
return ctrl->value;
} |
functions | int m5mo_set_af(struct v4l2_subdev *sd, int val)
{
struct m5mo_state *state = to_state(sd);
int i, status, err;
cam_info("%s, mode %#x\n", val ? "start" : "stop", state->focus.mode);
state->focus.start = val;
if (state->focus.mode != FOCUS_MODE_CONTINOUS) {
err = m5mo_writeb(sd, M5MO_CATEGORY_LENS,
M5MO_LE... |
functions | int m5mo_set_af_mode(struct v4l2_subdev *sd, int val)
{
struct m5mo_state *state = to_state(sd);
#ifndef CONFIG_MACH_S2PLUS
struct regulator *movie = regulator_get(NULL, "led_movie");
#endif
u32 cancel, mode, status = 0;
int i, err;
cancel = val & FOCUS_MODE_DEFAULT;
val &= 0xFF;
retry:
switch (val) {
case FO... |
functions | endif
if (val == FOCUS_MODE_FACEDETECT) {
/* enable face detection */
err = m5mo_writeb(sd, M5MO_CATEGORY_FD, M5MO_FD_CTL, 0x11);
CHECK_ERR(err);
msleep(10);
} |
functions | else if (state->focus.mode == FOCUS_MODE_FACEDETECT) {
/* disable face detection */
err = m5mo_writeb(sd, M5MO_CATEGORY_FD, M5MO_FD_CTL, 0x00);
CHECK_ERR(err);
} |
functions | int m5mo_set_af_mode_select(struct v4l2_subdev *sd)
{
struct m5mo_state *state = to_state(sd);
u32 mode_select = 0;
int err;
cam_dbg("E, ui_mode = %d\n", state->focus.ui_mode);
cam_dbg("E, mode = %d\n", state->focus.mode);
if (state->focus.mode != FOCUS_MODE_TOUCH) {
switch (state->focus.ui_mode) {
case FOC... |
functions | int m5mo_set_touch_auto_focus(struct v4l2_subdev *sd, int val)
{
struct m5mo_state *state = to_state(sd);
int err = 0;
cam_info("%s\n", val ? "start" : "stop");
state->focus.touch = val;
if (val) {
err = m5mo_set_af_mode(sd, FOCUS_MODE_TOUCH);
if (err < 0) {
cam_err("m5mo_set_af_mode failed\n");
return... |
functions | int m5mo_set_zoom(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
{
struct m5mo_state *state = to_state(sd);
struct v4l2_queryctrl qc = {0,} |
functions | int m5mo_set_jpeg_quality(struct v4l2_subdev *sd,
struct v4l2_control *ctrl)
{
struct v4l2_queryctrl qc = {0,} |
functions | int m5mo_get_exif(struct v4l2_subdev *sd)
{
struct m5mo_state *state = to_state(sd);
/* standard values */
u16 iso_std_values[] = { 10, 12, 16, 20, 25, 32, 40, 50, 64, 80,
100, 125, 160, 200, 250, 320, 400, 500, 640, 800,
1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000} |
functions | int m5mo_start_capture(struct v4l2_subdev *sd, int val)
{
struct m5mo_state *state = to_state(sd);
int err, int_factor;
cam_trace("E\n");
if (!(state->isp.int_factor & M5MO_INT_CAPTURE)) {
int_factor = m5mo_wait_interrupt(sd,
state->face_beauty ? M5MO_ISP_AFB_TIMEOUT : M5MO_ISP_TIMEOUT);
if (!(int_factor & ... |
functions | int m5mo_set_hdr(struct v4l2_subdev *sd, int val)
{
u32 int_factor;
int err;
cam_trace("E\n");
err = m5mo_writeb(sd, M5MO_CATEGORY_CAPCTRL, M5MO_CAPCTRL_FRM_SEL, val + 1);
CHECK_ERR(err);
int_factor = m5mo_wait_interrupt(sd, M5MO_ISP_TIMEOUT);
if (!(int_factor & M5MO_INT_CAPTURE)) {
cam_warn("M5MO_INT_CAPT... |
functions | int m5mo_set_aeawblock(struct v4l2_subdev *sd, int val)
{
int err;
cam_err("%d\n", val);
switch (val) {
case AE_UNLOCK_AWB_UNLOCK:
err = m5mo_writeb(sd, M5MO_CATEGORY_AE, M5MO_AE_LOCK, 0);
CHECK_ERR(err);
err = m5mo_writeb(sd, M5MO_CATEGORY_WB, M5MO_AWB_LOCK, 0);
CHECK_ERR(err);
break;
case AE_LOCK_AWB... |
functions | int m5mo_check_dataline(struct v4l2_subdev *sd, int val)
{
int err = 0;
cam_dbg("E, value %d\n", val);
err = m5mo_writeb(sd, M5MO_CATEGORY_TEST,
M5MO_TEST_OUTPUT_YCO_TEST_DATA, val ? 0x01 : 0x00);
CHECK_ERR(err);
cam_trace("X\n");
return 0;
} |
functions | int m5mo_check_esd(struct v4l2_subdev *sd)
{
s32 val = 0;
int err = 0;
/* check ISP */
err = m5mo_readb(sd, M5MO_CATEGORY_TEST, M5MO_TEST_ISP_PROCESS, &val);
CHECK_ERR(err);
cam_dbg("progress %#x\n", val);
if (val != 0x80) {
goto esd_occur;
} |
functions | int m5mo_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
{
struct m5mo_state *state = to_state(sd);
int err = 0;
printk(KERN_INFO "id %d, value %d\n",
ctrl->id - V4L2_CID_PRIVATE_BASE, ctrl->value);
if (unlikely(state->isp.bad_fw && ctrl->id != V4L2_CID_CAM_UPDATE_FW)) {
cam_err("\"Unknown\" state, ... |
functions | else if (state->preview->index == M5MO_PREVIEW_WVGA) {
if (state->exif.unique_id[0] == 'T')
state->focus.pos_y -= 2;
else
state->focus.pos_y += 60;
} |
functions | int m5mo_g_ext_ctrl(struct v4l2_subdev *sd, struct v4l2_ext_control *ctrl)
{
struct m5mo_state *state = to_state(sd);
int err = 0;
switch (ctrl->id) {
case V4L2_CID_CAM_SENSOR_FW_VER:
strcpy(ctrl->string, state->exif.unique_id);
break;
default:
cam_err("no such control id %d\n", ctrl->id - V4L2_CID_CAMERA_... |
functions | int m5mo_g_ext_ctrls(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls)
{
struct v4l2_ext_control *ctrl = ctrls->controls;
int i, err = 0;
for (i = 0; i < ctrls->count; i++, ctrl++) {
err = m5mo_g_ext_ctrl(sd, ctrl);
if (err) {
ctrls->error_idx = i;
break;
} |
functions | int m5mo_check_manufacturer_id(struct v4l2_subdev *sd)
{
int i, err;
u8 id;
u32 addr[] = {0x1000AAAA, 0x10005554, 0x1000AAAA} |
functions | int m5mo_program_fw(struct v4l2_subdev *sd,
u8 *buf, u32 addr, u32 unit, u32 count, u8 id)
{
u32 val;
u32 intram_unit = SZ_4K;
int i, j, retries, err = 0;
int erase = 0x01;
if (unit == SZ_64K && id != 0x01)
erase = 0x04;
for (i = 0; i < unit*count; i += unit) {
/* Set Flash ROM memory address */
err = m5m... |
functions | int m5mo_load_fw(struct v4l2_subdev *sd)
{
struct device *dev = sd->v4l2_dev->dev;
const struct firmware *fw = NULL;
u8 sensor_ver[M5MO_FW_VER_LEN] = {0, } |
functions | else if (sensor_ver[0] == 'O' && sensor_ver[1] == 'O') {
err = request_firmware(&fw, M5MOOO_FW_PATH, dev);
#endif
#if defined(CONFIG_MACH_U1_KOR_LGT)
} |
functions | else if (sensor_ver[0] == 'S' && sensor_ver[1] == 'B') {
err = request_firmware(&fw, M5MOSB_FW_PATH, dev);
#endif
} |
functions | int m5mo_set_frmsize(struct v4l2_subdev *sd)
{
struct m5mo_state *state = to_state(sd);
struct v4l2_control ctrl;
int err;
cam_trace("E\n");
if (state->format_mode == V4L2_PIX_FMT_MODE_PREVIEW) {
err = m5mo_set_mode(sd, M5MO_PARMSET_MODE);
CHECK_ERR(err);
err = m5mo_writeb(sd, M5MO_CATEGORY_PARM,
M5MO_P... |
functions | int m5mo_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *ffmt)
{
struct m5mo_state *state = to_state(sd);
const struct m5mo_frmsizeenum **frmsize;
u32 width = ffmt->width;
u32 height = ffmt->height;
u32 old_index;
int i, num_entries;
cam_trace("E\n");
if (unlikely(state->isp.bad_fw)) {
cam_err("\"U... |
functions | int m5mo_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *a)
{
struct m5mo_state *state = to_state(sd);
a->parm.capture.timeperframe.numerator = 1;
a->parm.capture.timeperframe.denominator = state->fps;
return 0;
} |
functions | int m5mo_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *a)
{
struct m5mo_state *state = to_state(sd);
int err;
u32 fps = a->parm.capture.timeperframe.denominator /
a->parm.capture.timeperframe.numerator;
if (unlikely(state->isp.bad_fw)) {
cam_err("\"Unknown\" state, please update F/W");
return -E... |
functions | int m5mo_enum_framesizes(struct v4l2_subdev *sd,
struct v4l2_frmsizeenum *fsize)
{
struct m5mo_state *state = to_state(sd);
/*
* The camera interface should read this value, this is the resolution
* at which the sensor would provide framedata to the camera i/f
* In case of image capture,
* this returns the defa... |
functions | int m5mo_s_stream_preview(struct v4l2_subdev *sd, int enable)
{
struct m5mo_state *state = to_state(sd);
u32 old_mode, int_factor;
int err;
if (enable) {
if (state->vt_mode) {
err = m5mo_writeb(sd, M5MO_CATEGORY_AE, M5MO_AE_EP_MODE_MON, 0x11);
CHECK_ERR(err);
} |
functions | int m5mo_s_stream_capture(struct v4l2_subdev *sd, int enable)
{
u32 int_factor;
int err;
if (enable) {
err = m5mo_set_mode(sd, M5MO_STILLCAP_MODE);
if (err <= 0) {
cam_err("failed to set mode\n");
return err;
} |
functions | int m5mo_s_stream_hdr(struct v4l2_subdev *sd, int enable)
{
struct m5mo_state *state = to_state(sd);
int int_en, int_factor, i, err;
err = m5mo_writeb(sd, M5MO_CATEGORY_CAPCTRL,
M5MO_CAPCTRL_CAP_MODE, enable ? 0x06 : 0x00);
CHECK_ERR(err);
err = m5mo_writeb(sd, M5MO_CATEGORY_CAPPARM,
M5MO_CAPPARM_YUVOUT_MAIN... |
functions | int m5mo_s_stream(struct v4l2_subdev *sd, int enable)
{
struct m5mo_state *state = to_state(sd);
int err;
cam_trace("E\n");
if (unlikely(state->isp.bad_fw)) {
cam_err("\"Unknown\" state, please update F/W");
return -ENOSYS;
} |
functions | int m5mo_check_version(struct v4l2_subdev *sd)
{
struct m5mo_state *state = to_state(sd);
int i, val;
for (i = 0; i < 6; i++) {
m5mo_readb(sd, M5MO_CATEGORY_SYS, M5MO_SYS_USER_VER, &val);
state->exif.unique_id[i] = (char)val;
} |
functions | int m5mo_init_param(struct v4l2_subdev *sd)
{
int err;
cam_trace("E\n");
err = m5mo_writeb(sd, M5MO_CATEGORY_SYS, M5MO_SYS_INT_EN,
M5MO_INT_MODE | M5MO_INT_CAPTURE | M5MO_INT_SOUND);
CHECK_ERR(err);
err = m5mo_writeb(sd, M5MO_CATEGORY_PARM, M5MO_PARM_OUT_SEL, 0x02);
CHECK_ERR(err);
/* Capture */
err = m5mo... |
functions | int m5mo_init(struct v4l2_subdev *sd, u32 val)
{
struct m5mo_state *state = to_state(sd);
u32 int_factor;
int err;
/* Default state values */
state->preview = NULL;
state->capture = NULL;
state->format_mode = V4L2_PIX_FMT_MODE_PREVIEW;
state->sensor_mode = SENSOR_CAMERA;
state->flash_mode = FLASH_MODE_OFF;
... |
functions | ssize_t m5mo_camera_type_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct m5mo_state *state = dev_get_drvdata(dev);
char type[25];
if (state->exif.unique_id[1] == 'B') {
strcpy(type, "SONY_IMX105PQ_M5MOLS");
} |
functions | else if (state->exif.unique_id[1] == 'C') {
strcpy(type, "SLSI_S5K3H2YX_M5MOLS");
} |
functions | ssize_t m5mo_camera_fw_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct m5mo_state *state = dev_get_drvdata(dev);
return sprintf(buf, "%s\n", state->fw_version);
} |
functions | __devinit m5mo_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct m5mo_state *state;
struct v4l2_subdev *sd;
const struct m5mo_platform_data *pdata = client->dev.platform_data;
int err = 0;
state = kzalloc(sizeof(struct m5mo_state), GFP_KERNEL);
if (state == NULL)
return -ENOMEM;
... |
functions | __devexit m5mo_remove(struct i2c_client *client)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct m5mo_state *state = to_state(sd);
if (m5mo_set_af_softlanding(sd) < 0)
cam_err("failed to set soft landing\n");
device_remove_file(state->m5mo_dev, &dev_attr_rear_camtype);
device_remove_file(state->m... |
functions | __init m5mo_mod_init(void)
{
#ifdef CONFIG_MACH_S2PLUS
if (!m5mo_dev) {
m5mo_dev =
device_create(camera_class, NULL, 0, NULL, "rear");
if (IS_ERR(m5mo_dev)) {
cam_err("failed to create device m5mo_dev!\n");
return 0;
} |
functions | __exit m5mo_mod_exit(void)
{
i2c_del_driver(&m5mo_i2c_driver);
if (camera_class)
class_destroy(camera_class);
} |
includes |
#include <sys/types.h> |
includes | #include <err.h> |
includes | #include <fcntl.h> |
includes | #include <stdio.h> |
includes | #include <stdlib.h> |
includes | #include <string.h> |
includes | #include <unistd.h> |
includes | #include <stdint.h> |
defines |
#define VMAJOR 2 |
defines | #define VMINOR 0 |
defines | #define VDELTA 15 |
defines | #define RAW_DUMP |
defines |
#define MP_SIG 0x5f504d5f /* _MP_ */ |
defines | #define EXTENDED_PROCESSING_READY |
defines | #define OEM_PROCESSING_READY_NOT |
defines |
#define ARRAY_SIZE(_x) (sizeof(_x) / sizeof(_x[0])) |
defines | #define SEP_LINE \ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.