Re: [RESEND PATCH] media: i2c: ov5640: Add pixel clock support

2018-04-24 Thread Loic Poulain
Hi Sakari,

>> Any comments on this change?
>
> https://patchwork.linuxtv.org/project/linux-media/list/?submitter=Maxime+Ripard&state=*&q=ov5640>
>
> There's also another set that adds PIXEL_CLOCK (as well as LINK_FREQ)
> support to the driver, that seems more complete than this patch but
> requires a rebase on Maxime's patches:
>
> https://patchwork.linuxtv.org/project/linux-media/list/?submitter=7218&state=*&q=ov5640>

Thanks, I've just see this patch series. Indeed, patch will need a
rework/rebase.

Regards,
Loic


Re: [RESEND PATCH] media: i2c: ov5640: Add pixel clock support

2018-04-24 Thread Sakari Ailus
On Tue, Apr 24, 2018 at 11:01:18AM +0200, Loic Poulain wrote:
> On 29 March 2018 at 16:55, Manivannan Sadhasivam
>  wrote:
> > Some of the camera subsystems like camss in Qualcommm MSM chipsets
> > require pixel clock support in camera sensor drivers. So, this commit
> > adds a default pixel clock rate of 96MHz to OV5640 camera sensor driver.
> >
> > According to the datasheet, 96MHz can be used as a pixel clock rate for
> > most of the modes.
> >
> > Signed-off-by: Manivannan Sadhasivam 
> 
> Tested-by: Loic Poulain 
> 
> It works for me on Dragonboard 410c + D3 camera mezzanine (ov5640) .
> 
> Any comments on this change?

https://patchwork.linuxtv.org/project/linux-media/list/?submitter=Maxime+Ripard&state=*&q=ov5640>

There's also another set that adds PIXEL_CLOCK (as well as LINK_FREQ)
support to the driver, that seems more complete than this patch but
requires a rebase on Maxime's patches:

https://patchwork.linuxtv.org/project/linux-media/list/?submitter=7218&state=*&q=ov5640>

-- 
Sakari Ailus
e-mail: sakari.ai...@iki.fi


Re: [RESEND PATCH] media: i2c: ov5640: Add pixel clock support

2018-04-24 Thread Loic Poulain
On 29 March 2018 at 16:55, Manivannan Sadhasivam
 wrote:
> Some of the camera subsystems like camss in Qualcommm MSM chipsets
> require pixel clock support in camera sensor drivers. So, this commit
> adds a default pixel clock rate of 96MHz to OV5640 camera sensor driver.
>
> According to the datasheet, 96MHz can be used as a pixel clock rate for
> most of the modes.
>
> Signed-off-by: Manivannan Sadhasivam 

Tested-by: Loic Poulain 

It works for me on Dragonboard 410c + D3 camera mezzanine (ov5640) .

Any comments on this change?

Regards,
Loic


[RESEND PATCH] media: i2c: ov5640: Add pixel clock support

2018-03-29 Thread Manivannan Sadhasivam
Some of the camera subsystems like camss in Qualcommm MSM chipsets
require pixel clock support in camera sensor drivers. So, this commit
adds a default pixel clock rate of 96MHz to OV5640 camera sensor driver.

According to the datasheet, 96MHz can be used as a pixel clock rate for
most of the modes.

Signed-off-by: Manivannan Sadhasivam 
---
 drivers/media/i2c/ov5640.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 39a2269..7152c84 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -162,6 +162,7 @@ struct ov5640_ctrls {
struct v4l2_ctrl *auto_gain;
struct v4l2_ctrl *gain;
};
+   struct v4l2_ctrl *pixel_clock;
struct v4l2_ctrl *brightness;
struct v4l2_ctrl *saturation;
struct v4l2_ctrl *contrast;
@@ -2009,6 +2010,9 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
ctrls->gain = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_GAIN,
0, 1023, 1, 0);
 
+   /* Pixel clock (default of 96MHz) */
+   ctrls->pixel_clock = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_PIXEL_RATE,
+   1, INT_MAX, 1, 9600);
ctrls->saturation = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_SATURATION,
  0, 255, 1, 64);
ctrls->hue = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_HUE,
-- 
2.7.4