[PATCH v2 0/4] media: mt9m111: media controller support and misc changes

2018-01-03 Thread Akinobu Mita
; property, suggested by Sakari Ailus Akinobu Mita (4): media: mt9m111: create subdevice device node media: mt9m111: add media controller support media: mt9m111: document missing required clocks property media: mt9m111: add V4L2_CID_TEST_PATTERN control .../devicetree/bindings/media/i2c/m

[PATCH v2 1/4] media: mt9m111: create subdevice device node

2018-01-03 Thread Akinobu Mita
Set the V4L2_SUBDEV_FL_HAS_DEVNODE flag for the subdevice so that the subdevice device node is created. Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * Changelog v2

Re: [PATCH -next v3 2/2] media: ov772x: use SCCB helpers

2018-07-10 Thread Akinobu Mita
2018年7月10日(火) 6:23 Sebastian Reichel : > > Hi, > > On Mon, Jul 09, 2018 at 06:14:43PM +0200, Wolfram Sang wrote: > > > static int ov772x_read(struct i2c_client *client, u8 addr) > > > { > > > - int ret; > > > - u8 val; > > > - > > > - ret = i2c_master_send(client, , 1); > > > - if (ret <

[PATCH -next v3 0/2] introduce SCCB helpers

2018-07-09 Thread Akinobu Mita
C source and Kconfig option. - Acquire i2c adapter lock while issuing two requests for sccb_read_byte Akinobu Mita (2): i2c: add SCCB helpers media: ov772x: use SCCB helpers drivers/media/i2c/ov772x.c | 20 +++- include/linux/i2c-sccb.h | 77

[PATCH -next v3 1/2] i2c: add SCCB helpers

2018-07-09 Thread Akinobu Mita
d repeated start. Using SCCB helpers hides the implementation detail. Cc: Peter Rosin Cc: Sebastian Reichel Cc: Wolfram Sang Cc: Jacopo Mondi Cc: Laurent Pinchart Cc: Hans Verkuil Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- include/linux/i2c-s

[PATCH -next v3 2/2] media: ov772x: use SCCB helpers

2018-07-09 Thread Akinobu Mita
Convert ov772x register access to use SCCB helpers. Cc: Peter Rosin Cc: Sebastian Reichel Cc: Wolfram Sang Cc: Jacopo Mondi Cc: Laurent Pinchart Cc: Hans Verkuil Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov772x.c | 20

[PATCH] media: ov5640: add missing output pixel format setting

2018-03-11 Thread Akinobu Mita
in the ov5640_restore_mode() that is called when the device is powered on. Cc: Steve Longerbeam <slongerb...@gmail.com> Cc: Hugues Fruchet <hugues.fruc...@st.com> Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita

Re: [PATCH] media: ov5640: add missing output pixel format setting

2018-03-13 Thread Akinobu Mita
2018-03-13 1:18 GMT+09:00 Hugues FRUCHET : > Hi Akinobu, > > Thanks for the patch, could you describe the test you made to reproduce > the issue that I can test on my side ? > > I'm using usually yavta or Gstreamer, but I don't know how to trig the > power on/off

Re: [PATCH 6/6] media: ov772x: support device tree probing

2018-04-10 Thread Akinobu Mita
2018-04-09 18:27 GMT+09:00 jacopo mondi <jac...@jmondi.org>: > Hi Akinobu, > > On Sun, Apr 08, 2018 at 12:48:10AM +0900, Akinobu Mita wrote: >> The ov772x driver currently only supports legacy platform data probe. >> This change enables device tree probing. >> >

Re: [PATCH 5/6] media: ov772x: add device tree binding

2018-04-10 Thread Akinobu Mita
2018-04-09 18:06 GMT+09:00 jacopo mondi <jac...@jmondi.org>: > Hi Akinobu, > > On Sun, Apr 08, 2018 at 12:48:09AM +0900, Akinobu Mita wrote: >> This adds a device tree binding documentation for OV7720/OV7725 sensor. > > Please use as patch subject > media: dt-bindings

Re: [PATCH 4/6] media: ov772x: add media controller support

2018-04-10 Thread Akinobu Mita
2018-04-09 17:32 GMT+09:00 jacopo mondi <jac...@jmondi.org>: > Hi Akinobu, > > On Sun, Apr 08, 2018 at 12:48:08AM +0900, Akinobu Mita wrote: >> Create a source pad and set the media controller type to the sensor. >> >> Cc: Jacopo Mondi <jacopo+rene...

Re: [PATCH 2/6] media: ov772x: add checks for register read errors

2018-04-10 Thread Akinobu Mita
2018-04-09 16:36 GMT+09:00 jacopo mondi <jac...@jmondi.org>: > Hi Akinobu, > > On Sun, Apr 08, 2018 at 12:48:06AM +0900, Akinobu Mita wrote: >> This change adds checks for register read errors and returns correct >> error code. >> > > I feel like error condi

Re: [PATCH 1/6] media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING

2018-04-10 Thread Akinobu Mita
sed on the example reference project. > On Sun, Apr 08, 2018 at 12:48:05AM +0900, Akinobu Mita wrote: >> The ov772x driver only works when the i2c controller have >> I2C_FUNC_PROTOCOL_MANGLING. However, many i2c controller drivers don't >> support it. >> >> The reason

[PATCH 6/6] media: ov772x: support device tree probing

2018-04-07 Thread Akinobu Mita
ene...@jmondi.org> Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Cc: Hans Verkuil <hans.verk...@cisco.com> Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com

[PATCH 1/6] media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING

2018-04-07 Thread Akinobu Mita
i Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- drivers/media/i2c/ov772x.c | 42 +- 1 file changed, 33 insertions(+), 9 deletions(-) diff

[PATCH 2/6] media: ov772x: add checks for register read errors

2018-04-07 Thread Akinobu Mita
m> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- drivers/media/i2c/ov772x.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c index 283ae2c

[PATCH 5/6] media: ov772x: add device tree binding

2018-04-07 Thread Akinobu Mita
ro Carvalho Chehab <mche...@s-opensource.com> Cc: Rob Herring <robh...@kernel.org> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- .../devicetree/bindings/media/i2c/ov772x.txt | 36 ++ MAINTAINERS| 1 + 2 fi

[PATCH 0/6] media: ov772x: support media controller, device tree probing, etc.

2018-04-07 Thread Akinobu Mita
This patchset includes support media controller, device tree probing and other miscellanuous changes for ov772x driver. Akinobu Mita (6): media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING media: ov772x: add checks for register read errors media: ov772x: create

[PATCH 3/6] media: ov772x: create subdevice device node

2018-04-07 Thread Akinobu Mita
ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- drivers/media/i2c/ov772x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c index c56f910..4b

[PATCH 4/6] media: ov772x: add media controller support

2018-04-07 Thread Akinobu Mita
rvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- drivers/media/i2c/ov772x.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c index 4bb81ff

Re: [PATCH v2 10/10] media: ov772x: avoid accessing registers under power saving mode

2018-04-17 Thread Akinobu Mita
> On Mon, Apr 16, 2018 at 11:51:51AM +0900, Akinobu Mita wrote: >> The set_fmt() in subdev pad ops, the s_ctrl() for subdev control handler, >> and the s_frame_interval() in subdev video ops could be called when the >> device is under power saving mode. These callbacks for

Re: [PATCH v2 10/10] media: ov772x: avoid accessing registers under power saving mode

2018-04-20 Thread Akinobu Mita
2018-04-18 21:55 GMT+09:00 jacopo mondi : >> @@ -898,8 +922,20 @@ static int ov772x_s_power(struct v4l2_subdev *sd, int >> on) >> /* If the power count is modified from 0 to != 0 or from != 0 to 0, >>* update the power state. >>*/ >> - if

[PATCH v2 04/10] media: ov772x: add media controller support

2018-04-15 Thread Akinobu Mita
rvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v2 - Move video_probe() before the entity initialization and remove the #ifdef around the media_entity_cleanup() drivers/media/i2c/ov772x.c | 16 +++- 1 file changed, 1

[PATCH v2 06/10] media: dt-bindings: ov772x: add device tree binding

2018-04-15 Thread Akinobu Mita
ro Carvalho Chehab <mche...@s-opensource.com> Cc: Rob Herring <robh...@kernel.org> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v2 - Add "dt-bindings:" in the subject - Add a brief description of the sensor - Update the GPIO names - Indicate the GPIO active

[PATCH v2 09/10] media: ov772x: reconstruct s_frame_interval()

2018-04-15 Thread Akinobu Mita
ent.pinch...@ideasonboard.com> Cc: Hans Verkuil <hans.verk...@cisco.com> Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v2 - New pat

[PATCH v2 02/10] media: ov772x: add checks for register read errors

2018-04-15 Thread Akinobu Mita
m> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v2 - Assign the ov772x_read() return value to pid and ver directly - Do the same for MIDH and MIDL drivers/media/i2c/ov772x.c | 20 ++-- 1 file changed, 14

[PATCH v2 01/10] media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING

2018-04-15 Thread Akinobu Mita
.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v2 - Replace the implementation of ov772x_read() instead of adding an alternative method drivers/media/i2c/ov772x.c | 19 ++- 1 file changed, 14

[PATCH v2 00/10] media: ov772x: support media controller, device tree probing, etc.

2018-04-15 Thread Akinobu Mita
r saving mode (New) Akinobu Mita (10): media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING media: ov772x: add checks for register read errors media: ov772x: create subdevice device node media: ov772x: add media controller support media: ov772x: use generic na

[PATCH v2 10/10] media: ov772x: avoid accessing registers under power saving mode

2018-04-15 Thread Akinobu Mita
i Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v2 - New patch drivers/media/i2c/ov772x.c | 77 +- 1 file changed, 62 insert

[PATCH v2 07/10] media: ov772x: support device tree probing

2018-04-15 Thread Akinobu Mita
ene...@jmondi.org> Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Cc: Hans Verkuil <hans.verk...@cisco.com> Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail

[PATCH v2 05/10] media: ov772x: use generic names for reset and powerdown gpios

2018-04-15 Thread Akinobu Mita
generic names. Cc: Jacopo Mondi <jacopo+rene...@jmondi.org> Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Cc: Hans Verkuil <hans.verk...@cisco.com> Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off

[PATCH v2 08/10] media: ov772x: handle nested s_power() calls

2018-04-15 Thread Akinobu Mita
-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v2 - New patch drivers/media/i2c/ov772x.c | 33 + 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c index 4245a46

[PATCH v2 03/10] media: ov772x: create subdevice device node

2018-04-15 Thread Akinobu Mita
ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v2 - No changes drivers/media/i2c/ov772x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov

Re: [PATCH v2 08/10] media: ov772x: handle nested s_power() calls

2018-04-19 Thread Akinobu Mita
2018-04-18 21:41 GMT+09:00 jacopo mondi <jac...@jmondi.org>: > Hi Akinobu, > > On Mon, Apr 16, 2018 at 11:51:49AM +0900, Akinobu Mita wrote: >> Depending on the v4l2 driver, calling s_power() could be nested. So the >> actual transitions between power saving mod

Re: [PATCH v3 01/11] media: dt-bindings: ov772x: add device tree binding

2018-04-23 Thread Akinobu Mita
2018-04-23 18:17 GMT+09:00 Laurent Pinchart <laurent.pinch...@ideasonboard.com>: > Hi Mita-san, > > On Sunday, 22 April 2018 18:56:07 EEST Akinobu Mita wrote: >> This adds a device tree binding documentation for OV7720/OV7725 sensor. >> >> Cc: Jacopo Mondi

Re: [PATCH v3 02/11] media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING

2018-04-23 Thread Akinobu Mita
2018-04-23 18:18 GMT+09:00 Laurent Pinchart <laurent.pinch...@ideasonboard.com>: > Hi Mita-san, > > On Sunday, 22 April 2018 18:56:08 EEST Akinobu Mita wrote: >> The ov772x driver only works when the i2c controller have >> I2C_FUNC_PROTOCOL_MANGLING. However, many i

[PATCH v3 03/11] media: ov772x: add checks for register read errors

2018-04-22 Thread Akinobu Mita
m> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Reviewed-by: Jacopo Mondi <jac...@jmondi.org> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v3 - Add a Reviewed-by: line drivers/media/i2c/ov772x.c | 20 ++-- 1 file changed, 14 insertions(+), 6 de

[PATCH v3 00/11] media: ov772x: support media controller, device tree probing, etc.

2018-04-22 Thread Akinobu Mita
e the GPIO active level - Add missing NULL checks for priv->info - Leave the check for the missing platform data if legacy platform data probe is used. - Handle nested s_power() calls (New) - Reconstruct s_frame_interval() (New) - Avoid accessing registers Akinobu Mita (11): media: dt-bin

[PATCH v3 01/11] media: dt-bindings: ov772x: add device tree binding

2018-04-22 Thread Akinobu Mita
ro Carvalho Chehab <mche...@s-opensource.com> Cc: Rob Herring <robh...@kernel.org> Reviewed-by: Rob Herring <r...@kernel.org> Reviewed-by: Jacopo Mondi <jac...@jmondi.org> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v3 - Add Reviewed-by: lines .

[PATCH v3 07/11] media: ov772x: handle nested s_power() calls

2018-04-22 Thread Akinobu Mita
-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v3 - Rename mutex name from power_lock to lock - Add warning for duplicated s_power call drivers/media/i2c/ov772x.c | 34 ++ 1 file changed, 30 insertions(+), 4 deletions(-) diff

[PATCH v3 06/11] media: ov772x: support device tree probing

2018-04-22 Thread Akinobu Mita
ene...@jmondi.org> Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Cc: Hans Verkuil <hans.verk...@cisco.com> Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Reviewed-by: Jacopo Mondi <jac...@jmondi.org> Si

[PATCH v3 11/11] media: ov772x: create subdevice device node

2018-04-22 Thread Akinobu Mita
ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v3 - No changes drivers/media/i2c/ov772x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov

[PATCH v3 04/11] media: ov772x: add media controller support

2018-04-22 Thread Akinobu Mita
rvalho Chehab <mche...@s-opensource.com> Reviewed-by: Jacopo Mondi <jac...@jmondi.org> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v3 - Add a Reviewed-by: line drivers/media/i2c/ov772x.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-)

[PATCH v3 09/11] media: ov772x: avoid accessing registers under power saving mode

2018-04-22 Thread Akinobu Mita
i Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v3 - Add newlines before labels - Remove __v4l2_ctrl_handler_setup in s_power() as it causes duplicated register settin

[PATCH v3 10/11] media: ov772x: make set_fmt() return -EBUSY while streaming

2018-04-22 Thread Akinobu Mita
nchart <laurent.pinch...@ideasonboard.com> Cc: Hans Verkuil <hans.verk...@cisco.com> Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v3 - New pat

[PATCH v3 08/11] media: ov772x: reconstruct s_frame_interval()

2018-04-22 Thread Akinobu Mita
ent.pinch...@ideasonboard.com> Cc: Hans Verkuil <hans.verk...@cisco.com> Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v3 - No chang

[PATCH v3 05/11] media: ov772x: use generic names for reset and powerdown gpios

2018-04-22 Thread Akinobu Mita
generic names. Cc: Jacopo Mondi <jacopo+rene...@jmondi.org> Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Cc: Hans Verkuil <hans.verk...@cisco.com> Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Rev

[PATCH v3 02/11] media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING

2018-04-22 Thread Akinobu Mita
.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- * v3 - Remove I2C_CLIENT_SCCB flag set as it isn't needed anymore drivers/media/i2c/ov772x.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletion

Re: [PATCH v3 01/11] media: dt-bindings: ov772x: add device tree binding

2018-04-25 Thread Akinobu Mita
2018-04-24 0:54 GMT+09:00 Akinobu Mita <akinobu.m...@gmail.com>: > 2018-04-23 18:17 GMT+09:00 Laurent Pinchart > <laurent.pinch...@ideasonboard.com>: >> Hi Mita-san, >> >> On Sunday, 22 April 2018 18:56:07 EEST Akinobu Mita wrote: >>> This adds a

[PATCH] media: ov5645: add missing of_node_put() in error path

2018-03-19 Thread Akinobu Mita
org> Cc: Sakari Ailus <sakari.ai...@linux.intel.com> Cc: Mauro Carvalho Chehab <mche...@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com> --- drivers/media/i2c/ov5645.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/medi

Re: [PATCH v2 1/6] media: video-i2c: avoid accessing released memory area when removing driver

2018-10-05 Thread Akinobu Mita
2018年10月5日(金) 18:36 Sakari Ailus : > > Hi Hans, > > On Mon, Oct 01, 2018 at 11:40:00AM +0200, Hans Verkuil wrote: > > On 09/23/2018 06:34 PM, Akinobu Mita wrote: > > > The video_i2c_data is allocated by kzalloc and released by the video > > > device's rel

Re: [PATCH v2 1/6] media: video-i2c: avoid accessing released memory area when removing driver

2018-10-08 Thread Akinobu Mita
2018年10月8日(月) 20:21 Hans Verkuil : > > On 10/05/2018 04:59 PM, Akinobu Mita wrote: > > 2018年10月5日(金) 18:36 Sakari Ailus : > >> > >> Hi Hans, > >> > >> On Mon, Oct 01, 2018 at 11:40:00AM +0200, Hans Verkuil wrote: > >>> On 09/23/

Re: [PATCH v3 6/6] media: video-i2c: support runtime PM

2018-10-17 Thread Akinobu Mita
2018年10月17日(水) 16:19 Sakari Ailus : > > On Wed, Oct 17, 2018 at 12:07:50AM +0900, Akinobu Mita wrote: > > 2018年10月16日(火) 0:31 Sakari Ailus : > > > > > > Hi Mita-san, > > > > > > On Sun, Oct 14, 2018 at 03:02:39AM +0900, Akinobu Mita wrote: > >

[PATCH v4 2/6] media: video-i2c: use i2c regmap

2018-10-20 Thread Akinobu Mita
Signed-off-by: Akinobu Mita --- * v4 - No changes from v3 drivers/media/i2c/video-i2c.c | 68 ++- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index f27d294..f23cb91 100644

[PATCH v4 6/6] media: video-i2c: support runtime PM

2018-10-20 Thread Akinobu Mita
: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Reviewed-by: Matt Ranostay Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita --- * v4 - Move set_power() call into release() callback drivers/media/i2c/video-i2c.c | 141 +- 1

[PATCH v4 4/6] media: vivid: use V4L2_FRACT_COMPARE

2018-10-20 Thread Akinobu Mita
Now the equivalent of FRACT_CMP() is added in v4l2 common internal API header. Cc: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita --- * v4 - No changes from v3 drivers/media/platform/vivid/vivid-vid-cap.c | 9

[PATCH v4 5/6] media: video-i2c: support changing frame interval

2018-10-20 Thread Akinobu Mita
Acked-by: Matt Ranostay Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita --- * v4 - No changes from v3 drivers/media/i2c/video-i2c.c | 78 --- 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c

[PATCH v4 0/6] media: video-i2c: support changing frame interval and runtime PM

2018-10-20 Thread Akinobu Mita
definisions Akinobu Mita (6): media: video-i2c: avoid accessing released memory area when removing driver media: video-i2c: use i2c regmap media: v4l2-common: add V4L2_FRACT_COMPARE media: vivid: use V4L2_FRACT_COMPARE media: video-i2c: support changing frame interval media: video-i2c

[PATCH v4 3/6] media: v4l2-common: add V4L2_FRACT_COMPARE

2018-10-20 Thread Akinobu Mita
Chehab Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita --- * v4 - No changes from v3 include/media/v4l2-common.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index cdc87ec..eafb8a3 100644 --- a/include/media/v4l2-common.h

[PATCH v4 1/6] media: video-i2c: avoid accessing released memory area when removing driver

2018-10-20 Thread Akinobu Mita
Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Reviewed-by: Matt Ranostay Signed-off-by: Akinobu Mita --- * v4 - Add Reviewed-by line drivers/media/i2c/video-i2c.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i

[PATCH v3 5/6] media: video-i2c: support changing frame interval

2018-10-13 Thread Akinobu Mita
Acked-by: Matt Ranostay Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita --- * v3 - Add Acked-by line drivers/media/i2c/video-i2c.c | 78 --- 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c

[PATCH v3 2/6] media: video-i2c: use i2c regmap

2018-10-13 Thread Akinobu Mita
Signed-off-by: Akinobu Mita --- * v3 - Use regmap_init_i2c() instead of devm_regmap_init_i2c() and call regmap_exit_i2c() in video device release() callback in order to avoid releasing regmap when the driver is unbound. - Add Acked-by lines drivers/media/i2c/video-i2c.c | 68

[PATCH v3 1/6] media: video-i2c: avoid accessing released memory area when removing driver

2018-10-13 Thread Akinobu Mita
Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- * v3 - Move the code causing use-after-free from video_i2c_remove() to the video device release() callback. - Remove Acked-by line as there are enough changes from previous version drivers/media/i2c/video-i2c.c | 11

[PATCH v3 3/6] media: v4l2-common: add V4L2_FRACT_COMPARE

2018-10-13 Thread Akinobu Mita
Chehab Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita --- * v3 - Add Acked-by line include/media/v4l2-common.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index cdc87ec..eafb8a3 100644 --- a/include/media/v4l2-common.h +++ b

[PATCH v3 6/6] media: video-i2c: support runtime PM

2018-10-13 Thread Akinobu Mita
: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Reviewed-by: Matt Ranostay Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita --- * v3 - Move chip->set_power() call to the video device release() callback. - Add Acked-by line drivers/media/i2c/video-i2c.c |

[PATCH v3 4/6] media: vivid: use V4L2_FRACT_COMPARE

2018-10-13 Thread Akinobu Mita
Now the equivalent of FRACT_CMP() is added in v4l2 common internal API header. Cc: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita --- * v3 - Add Acked-by line drivers/media/platform/vivid/vivid-vid-cap.c | 9

[PATCH v3 0/6] media: video-i2c: support changing frame interval and runtime PM

2018-10-13 Thread Akinobu Mita
() in v4l2 common internal API - Add V4L2_FRACT_COMPARE() macro in v4l2 common internal API - Use V4L2_FRACT_COMPARE() to find suitable frame interval instead of v4l2_find_closest_fract() - Add comment for register address definisions Akinobu Mita (6): media: video-i2c: avoid accessing released memory

Re: [PATCH v3 6/6] media: video-i2c: support runtime PM

2018-10-16 Thread Akinobu Mita
2018年10月16日(火) 0:31 Sakari Ailus : > > Hi Mita-san, > > On Sun, Oct 14, 2018 at 03:02:39AM +0900, Akinobu Mita wrote: > > AMG88xx has a register for setting operating mode. This adds support > > runtime PM by changing the operating mode. > > > > The instructi

Re: [PATCH v4 3/6] media: v4l2-common: add V4L2_FRACT_COMPARE

2018-10-28 Thread Akinobu Mita
2018年10月28日(日) 12:49 Matt Ranostay : > > On Sat, Oct 20, 2018 at 7:26 AM Akinobu Mita wrote: > > > > Add macro to compare two v4l2_fract values in v4l2 common internal API. > > The same macro FRACT_CMP() is used by vivid and bcm2835-camera. This just > > renames it

Re: [PATCH v4 5/6] media: video-i2c: support changing frame interval

2018-10-28 Thread Akinobu Mita
2018年10月28日(日) 12:39 Matt Ranostay : > > On Sat, Oct 20, 2018 at 7:26 AM Akinobu Mita wrote: > > > > AMG88xx has a register for setting frame rate 1 or 10 FPS. > > This adds support changing frame interval. > > > > Reference specifications: > > https:/

[PATCH] media: xilinx-video: fix bad of_node_put() on endpoint error

2018-11-04 Thread Akinobu Mita
node except for error exit paths. Otherwise we get "OF: ERROR: Bad of_node_put() on ..." messages. Fixes: d079f94c9046 ("media: platform: Switch to v4l2_async_notifier_add_subdev") Cc: Steve Longerbeam Cc: Hyun Kwon Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Signed-

Re: [PATCH 3/7] media: ov2640: add V4L2_CID_TEST_PATTERN control

2018-11-13 Thread Akinobu Mita
2018年11月13日(火) 19:37 Sakari Ailus : > > On Tue, Nov 13, 2018 at 01:00:50AM +0900, Akinobu Mita wrote: > > The ov2640 has the test pattern generator features. This makes use of > > it through V4L2_CID_TEST_PATTERN control. > > > > Cc: Sakari Ailus > > Cc: M

[PATCH 2/7] media: mt9m111: add V4L2_CID_COLORFX control

2018-11-12 Thread Akinobu Mita
The mt9m111 has special camera effects feature. This makes use of it through V4L2_CID_COLORFX control. Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/mt9m111.c | 37 - 1 file changed, 36 insertions(+), 1

[PATCH 3/7] media: ov2640: add V4L2_CID_TEST_PATTERN control

2018-11-12 Thread Akinobu Mita
The ov2640 has the test pattern generator features. This makes use of it through V4L2_CID_TEST_PATTERN control. Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff

[PATCH 7/7] media: ov772x: support log_status ioctl and event interface

2018-11-12 Thread Akinobu Mita
This adds log_status ioctl and event interface for ov772x's v4l2 controls. Cc: Jacopo Mondi Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov772x.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c

[PATCH 1/7] media: mt9m111: support log_status ioctl and event interface

2018-11-12 Thread Akinobu Mita
This adds log_status ioctl and event interface for mt9m111's v4l2 controls. Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/mt9m111.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/mt9m111.c b/drivers

[PATCH 0/7] media: i2c: small enhancements for camera sensor drivers

2018-11-12 Thread Akinobu Mita
This patchset addds relatively small enhancements (log_status ioctl, event interface, V4L2_CID_TEST_PATTERN control, and V4L2_CID_COLORFX control) for mt9m111, ov2640, ov5640, ov7670, and ov772x drivers. I have these devices so these patches are tested with real devices. Akinobu Mita (7

[PATCH 4/7] media: ov2640: support log_status ioctl and event interface

2018-11-12 Thread Akinobu Mita
This adds log_status ioctl and event interface for ov2640's v4l2 controls. Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media

[PATCH 5/7] media: ov5640: support log_status ioctl and event interface

2018-11-12 Thread Akinobu Mita
This adds log_status ioctl and event interface for ov5640's v4l2 controls. Cc: Steve Longerbeam Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov5640.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c

[PATCH 6/7] media: ov7670: support log_status ioctl and event interface

2018-11-12 Thread Akinobu Mita
This adds log_status ioctl and event interface for ov7670's v4l2 controls. Cc: Jonathan Corbet Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov7670.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c

Re: [PATCH v2 1/6] media: video-i2c: avoid accessing released memory area when removing driver

2018-10-02 Thread Akinobu Mita
2018年10月1日(月) 18:40 Hans Verkuil : > > On 09/23/2018 06:34 PM, Akinobu Mita wrote: > > The video_i2c_data is allocated by kzalloc and released by the video > > device's release callback. The release callback is called when > > video_unregister_device() is called, but i

Re: [PATCH v2 0/6] media: video-i2c: support changing frame interval and runtime PM

2018-10-01 Thread Akinobu Mita
2018年10月1日(月) 18:41 Hans Verkuil : > > On 09/23/2018 06:34 PM, Akinobu Mita wrote: > > This patchset adds support for changing frame interval and runtime PM for > > video-i2c driver. This also adds an helper macro to v4l2 common > > internal API that is used to to find a

Re: [RFC 1/1] v4l: samsung, ov9650: Rely on V4L2-set sub-device names

2018-08-31 Thread Akinobu Mita
old and might not see much use > in newer devices, so why bother? The naming convention musn't be copied to > newer drivers though. > > Any opinions? The change for the ov9650 driver looks OK to me. My media device setup script needs to be updated by this change, but it is not a big deal. Reviewed-by: Akinobu Mita

Re: [PATCH 1/5] media: video-i2c: avoid accessing released memory area when removing driver

2018-09-19 Thread Akinobu Mita
2018年9月19日(水) 19:35 Sakari Ailus : > > Hi Mita-san, > > On Tue, Sep 18, 2018 at 01:03:07AM +0900, Akinobu Mita wrote: > > The struct video_i2c_data is released when video_unregister_device() is > > called, but it will still be accessed after calling > > video_un

Re: [PATCH 3/5] media: v4l2-common: add v4l2_find_closest_fract()

2018-09-19 Thread Akinobu Mita
2018年9月19日(水) 20:18 Sakari Ailus : > > Hi Mita-san, > > On Tue, Sep 18, 2018 at 01:03:09AM +0900, Akinobu Mita wrote: > > Add a function to locate the closest element in a sorted v4l2_fract array. > > > > The implementation is based on find_closest() macro in linux

[PATCH v2 1/6] media: video-i2c: avoid accessing released memory area when removing driver

2018-09-23 Thread Akinobu Mita
y Signed-off-by: Akinobu Mita --- * v2 - Update commit log to clarify the use after free - Add Acked-by tag drivers/media/i2c/video-i2c.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index 06d29d8..b

[PATCH v2 0/6] media: video-i2c: support changing frame interval and runtime PM

2018-09-23 Thread Akinobu Mita
internal API - Use V4L2_FRACT_COMPARE() to find suitable frame interval instead of v4l2_find_closest_fract() - Add comment for register address definisions Akinobu Mita (6): media: video-i2c: avoid accessing released memory area when removing driver media: video-i2c: use i2c regmap

[PATCH v2 3/6] media: v4l2-common: add V4L2_FRACT_COMPARE

2018-09-23 Thread Akinobu Mita
Chehab Signed-off-by: Akinobu Mita --- * v2 - New patch include/media/v4l2-common.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index cdc87ec..eafb8a3 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h

[PATCH v2 6/6] media: video-i2c: support runtime PM

2018-09-23 Thread Akinobu Mita
: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Reviewed-by: Matt Ranostay Signed-off-by: Akinobu Mita --- * v2 - Add Reviewed-by tag - Add comment for register address definisions drivers/media/i2c/video-i2c.c | 142 +- 1 file

[PATCH v2 5/6] media: video-i2c: support changing frame interval

2018-09-23 Thread Akinobu Mita
Acked-by: Matt Ranostay Signed-off-by: Akinobu Mita --- * v2 - Add Acked-by tag - Add comment for frame rate register address definision - Use V4L2_FRACT_COMPARE() to find suitable frame interval drivers/media/i2c/video-i2c.c | 78 --- 1 file changed, 66

[PATCH v2 4/6] media: vivid: use V4L2_FRACT_COMPARE

2018-09-23 Thread Akinobu Mita
Now the equivalent of FRACT_CMP() is added in v4l2 common internal API header. Cc: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- * v2 - New patch drivers/media/platform/vivid/vivid-vid-cap.c | 9 +++-- 1 file changed, 3

[PATCH v2 2/6] media: video-i2c: use i2c regmap

2018-09-23 Thread Akinobu Mita
Use regmap for i2c register access. This simplifies register accesses and chooses suitable access commands based on the functionality that the adapter supports. Cc: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- * v2 - Add

[PATCH 1/3] media: ov2640: set default window and format code at probe time

2018-12-07 Thread Akinobu Mita
Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c index d8e91bc..a07e6f2 100644 --- a/drivers/media/i2c/ov2640.c +++ b/drivers/media/i2c/ov2640.c

[PATCH 3/3] media: ov2640: set all mbus format field when G_FMT and S_FMT ioctls

2018-12-07 Thread Akinobu Mita
This driver doesn't set all members of mbus format field when the VIDIOC_SUBDEV_{S,G}_FMT ioctls are called. This is detected by v4l2-compliance. Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 6 ++ 1 file changed, 6 insertions

[PATCH 2/3] media: ov2640: make VIDIOC_SUBDEV_G_FMT ioctl work with V4L2_SUBDEV_FORMAT_TRY

2018-12-07 Thread Akinobu Mita
The VIDIOC_SUBDEV_G_FMT ioctl for this driver doesn't recognize V4L2_SUBDEV_FORMAT_TRY and always works as if V4L2_SUBDEV_FORMAT_ACTIVE is specified. Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 27 +++ 1 file

[PATCH 0/3] media: ov2640: fix two problems

2018-12-07 Thread Akinobu Mita
This patch series contains two bugfixes and a preparatory change for ov2640 driver. Akinobu Mita (3): media: ov2640: set default window and format code at probe time media: ov2640: make VIDIOC_SUBDEV_G_FMT ioctl work with V4L2_SUBDEV_FORMAT_TRY media: ov2640: set all mbus format field

Re: [PATCH v3] media: video-i2c: check if chip struct has set_power function

2018-11-25 Thread Akinobu Mita
2018年11月25日(日) 7:03 Matt Ranostay : > > Not all future supported video chips will always have power management > support, and so it is important to check before calling set_power() is > defined. > > Cc: Sakari Ailus > Cc: Hans Verkuil > Cc: Mauro Carvalho Chehab > Cc:

[PATCH v5] media: video-i2c: support runtime PM

2018-11-22 Thread Akinobu Mita
: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Reviewed-by: Matt Ranostay Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita --- This is an update of "[PATCH v4 6/6] media: video-i2c: support runtime PM" in the patchset "[PATCH v4 0/6] media: vid

[PATCH] media: video-i2c: don't use msleep for 1ms - 20ms

2018-11-20 Thread Akinobu Mita
Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- This fixes "[PATCH v4 6/6] media: video-i2c: support runtime PM" in the patchset "[PATCH v4 0/6] media: video-i2c: support changing frame interval and runtime PM". drivers/media/

[PATCH 1/5] media: video-i2c: avoid accessing released memory area when removing driver

2018-09-17 Thread Akinobu Mita
river") Cc: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/video-i2c.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/v

<    1   2   3   >