Re: s3c-camif question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Emad,

(adding linux-media at Cc)

On 01/13/2014 10:43 PM, Emad Hosseini Moghadam wrote:
Dear Mr. Nawrocki,

I am writing a driver for an image sensor, using i2c-s3c2410 and
s3c-camif platforms,in order to initialize the registers of the image
sensor. My cpu is s3c2440 . I have some questions regarding s3c-camif,
if it is possible for you of course:

1. I think it is impossible to initialize the registers of my image
sensor by s3c-camif. Then, why s3c-camif needs the information of the
sensor in "struct s3c_camif_sensor_info"?

Basically the driver of an image sensor is supposed to take care of the
I2C registers details. It implements some v4l2_subdevice callbacks, of which
some can be called by the host interface driver (s3c-camif). You can do
some initialization for example in s_power() callback, or during a first
call to s_stream(). For an example see ov9650 driver [1].

s3c-camif registers an I2C client device for the sensor, so it needs an
information to which physical I2C bus the sensor is connected (i2c bus
adapter id) and what is an I2C slave address of the sensor.

The other members of struct s3c_camif_plat_data [2] include sensor master
clock frequency information - so s3c-camif driver sets clock frequency
appropriate for the sensor; polarization of signals like pixel clock, VSYNC,
HSYNC - in order to match configuration of the parallel video interface at
the sensor (transmitter) and the application processor SoC (receiver) side.

2. Would you please tell me how can I initialize the "struct
s3c_camif_sensor_info" or give a sample?

For your reference, a patch I used for mini2440 board and ov9650 sensor
can be found at [2].

I hope it helps, please ask if anything is not clear.

--
Regards,
Sylwester

[1] http://git.linuxtv.org/media_tree.git/blob/eab924d0e2bdfd53c902162b0b499b8464c1fb4a:/drivers/media/i2c/ov9650.c [2] http://git.linuxtv.org/snawrocki/media.git/commitdiff/48a72b878abdc9795da753981beff4a99ff80656
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux