You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[media] media: Driver for Toshiba et8ek8 5MP sensor
Add driver for et8ek8 sensor, found in Nokia N900 main camera. Can be used for taking photos in 2.5MP resolution with fcam-dev. Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
ded9a92a62
commit
c5254e72b8
@@ -668,6 +668,7 @@ config VIDEO_S5K5BAF
|
||||
camera sensor with an embedded SoC image signal processor.
|
||||
|
||||
source "drivers/media/i2c/smiapp/Kconfig"
|
||||
source "drivers/media/i2c/et8ek8/Kconfig"
|
||||
|
||||
config VIDEO_S5C73M3
|
||||
tristate "Samsung S5C73M3 sensor support"
|
||||
|
||||
@@ -2,6 +2,7 @@ msp3400-objs := msp3400-driver.o msp3400-kthreads.o
|
||||
obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
|
||||
|
||||
obj-$(CONFIG_VIDEO_SMIAPP) += smiapp/
|
||||
obj-$(CONFIG_VIDEO_ET8EK8) += et8ek8/
|
||||
obj-$(CONFIG_VIDEO_CX25840) += cx25840/
|
||||
obj-$(CONFIG_VIDEO_M5MOLS) += m5mols/
|
||||
obj-y += soc_camera/
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
config VIDEO_ET8EK8
|
||||
tristate "ET8EK8 camera sensor support"
|
||||
depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
|
||||
---help---
|
||||
This is a driver for the Toshiba ET8EK8 5 MP camera sensor.
|
||||
It is used for example in Nokia N900 (RX-51).
|
||||
@@ -0,0 +1,2 @@
|
||||
et8ek8-objs += et8ek8_mode.o et8ek8_driver.o
|
||||
obj-$(CONFIG_VIDEO_ET8EK8) += et8ek8.o
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* et8ek8_reg.h
|
||||
*
|
||||
* Copyright (C) 2008 Nokia Corporation
|
||||
*
|
||||
* Contact: Sakari Ailus <sakari.ailus@iki.fi>
|
||||
* Tuukka Toivonen <tuukkat76@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef ET8EK8REGS_H
|
||||
#define ET8EK8REGS_H
|
||||
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <linux/v4l2-subdev.h>
|
||||
|
||||
struct v4l2_mbus_framefmt;
|
||||
struct v4l2_subdev_pad_mbus_code_enum;
|
||||
|
||||
struct et8ek8_mode {
|
||||
/* Physical sensor resolution and current image window */
|
||||
u16 sensor_width;
|
||||
u16 sensor_height;
|
||||
u16 sensor_window_origin_x;
|
||||
u16 sensor_window_origin_y;
|
||||
u16 sensor_window_width;
|
||||
u16 sensor_window_height;
|
||||
|
||||
/* Image data coming from sensor (after scaling) */
|
||||
u16 width;
|
||||
u16 height;
|
||||
u16 window_origin_x;
|
||||
u16 window_origin_y;
|
||||
u16 window_width;
|
||||
u16 window_height;
|
||||
|
||||
u32 pixel_clock; /* in Hz */
|
||||
u32 ext_clock; /* in Hz */
|
||||
struct v4l2_fract timeperframe;
|
||||
u32 max_exp; /* Maximum exposure value */
|
||||
u32 bus_format; /* MEDIA_BUS_FMT_ */
|
||||
u32 sensitivity; /* 16.16 fixed point */
|
||||
};
|
||||
|
||||
#define ET8EK8_REG_8BIT 1
|
||||
#define ET8EK8_REG_16BIT 2
|
||||
#define ET8EK8_REG_DELAY 100
|
||||
#define ET8EK8_REG_TERM 0xff
|
||||
struct et8ek8_reg {
|
||||
u16 type;
|
||||
u16 reg; /* 16-bit offset */
|
||||
u32 val; /* 8/16/32-bit value */
|
||||
};
|
||||
|
||||
/* Possible struct smia_reglist types. */
|
||||
#define ET8EK8_REGLIST_STANDBY 0
|
||||
#define ET8EK8_REGLIST_POWERON 1
|
||||
#define ET8EK8_REGLIST_RESUME 2
|
||||
#define ET8EK8_REGLIST_STREAMON 3
|
||||
#define ET8EK8_REGLIST_STREAMOFF 4
|
||||
#define ET8EK8_REGLIST_DISABLED 5
|
||||
|
||||
#define ET8EK8_REGLIST_MODE 10
|
||||
|
||||
#define ET8EK8_REGLIST_LSC_ENABLE 100
|
||||
#define ET8EK8_REGLIST_LSC_DISABLE 101
|
||||
#define ET8EK8_REGLIST_ANR_ENABLE 102
|
||||
#define ET8EK8_REGLIST_ANR_DISABLE 103
|
||||
|
||||
struct et8ek8_reglist {
|
||||
u32 type;
|
||||
struct et8ek8_mode mode;
|
||||
struct et8ek8_reg regs[];
|
||||
};
|
||||
|
||||
#define ET8EK8_MAX_LEN 32
|
||||
struct et8ek8_meta_reglist {
|
||||
char version[ET8EK8_MAX_LEN];
|
||||
union {
|
||||
struct et8ek8_reglist *ptr;
|
||||
} reglist[];
|
||||
};
|
||||
|
||||
extern struct et8ek8_meta_reglist meta_reglist;
|
||||
|
||||
#endif /* ET8EK8REGS */
|
||||
Reference in New Issue
Block a user