2013-05-15 11:57:53

by Lad, Prabhakar

[permalink] [raw]
Subject: [PATCH 0/6] media: i2c: ths7303 feature enhancement and cleanup

From: Lad, Prabhakar <[email protected]>

This patch series enables the ths7303 driver for asynchronous probing, OF
support with some cleanup patches.

Lad, Prabhakar (6):
media: i2c: ths7303: remove init_enable option from pdata
ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata
media: i2c: ths7303: remove unnecessary function ths7303_setup()
media: i2c: ths7303: make the pdata as a constant pointer
media: i2c: ths7303: add support for asynchronous probing
media: i2c: ths7303: add OF support

.../devicetree/bindings/media/i2c/ths73x3.txt | 50 +++++++++++++
arch/arm/mach-davinci/board-dm365-evm.c | 1 -
drivers/media/i2c/ths7303.c | 78 ++++++++++++-------
include/media/ths7303.h | 2 -
4 files changed, 99 insertions(+), 32 deletions(-)
create mode 100644 Documentation/devicetree/bindings/media/i2c/ths73x3.txt

--
1.7.4.1


2013-05-15 11:58:30

by Lad, Prabhakar

[permalink] [raw]
Subject: [PATCH 1/6] media: i2c: ths7303: remove init_enable option from pdata

From: Lad, Prabhakar <[email protected]>

This patch removes init_enable option from pdata, the init_enable
was intended that the device should start streaming video immediately
but ideally the bridge drivers should call s_stream explicitly for such
devices to start video.

Signed-off-by: Lad, Prabhakar <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Sakari Ailus <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/media/i2c/ths7303.c | 4 +---
include/media/ths7303.h | 2 --
2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
index 65853ee..8cddcd0 100644
--- a/drivers/media/i2c/ths7303.c
+++ b/drivers/media/i2c/ths7303.c
@@ -356,9 +356,7 @@ static int ths7303_setup(struct v4l2_subdev *sd)
int ret;
u8 mask;

- state->stream_on = pdata->init_enable;
-
- mask = state->stream_on ? 0xff : 0xf8;
+ mask = 0xf8;

ret = ths7303_write(sd, THS7303_CHANNEL_1, pdata->ch_1 & mask);
if (ret)
diff --git a/include/media/ths7303.h b/include/media/ths7303.h
index 980ec51..a7b4929 100644
--- a/include/media/ths7303.h
+++ b/include/media/ths7303.h
@@ -30,13 +30,11 @@
* @ch_1: Bias value for channel one.
* @ch_2: Bias value for channel two.
* @ch_3: Bias value for channel three.
- * @init_enable: initalize on init.
*/
struct ths7303_platform_data {
u8 ch_1;
u8 ch_2;
u8 ch_3;
- u8 init_enable;
};

#endif
--
1.7.4.1

2013-05-15 12:00:41

by Lad, Prabhakar

[permalink] [raw]
Subject: [PATCH 2/6] ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata

From: Lad, Prabhakar <[email protected]>

remove init_enable from ths7303 pdata as it is no longer exists.

Signed-off-by: Lad, Prabhakar <[email protected]>
Cc: Sekhar Nori <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Sakari Ailus <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
arch/arm/mach-davinci/board-dm365-evm.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index 2a66743..4e02ae7 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -510,7 +510,6 @@ struct ths7303_platform_data ths7303_pdata = {
.ch_1 = 3,
.ch_2 = 3,
.ch_3 = 3,
- .init_enable = 1,
};

static struct amp_config_info vpbe_amp = {
--
1.7.4.1

2013-05-15 12:01:19

by Lad, Prabhakar

[permalink] [raw]
Subject: [PATCH 3/6] media: i2c: ths7303: remove unnecessary function ths7303_setup()

From: Lad, Prabhakar <[email protected]>

the ths7303_setup() was doing the same thing as ths7303_setval()
except that ths7303_setval() sets it to some particular mode.
This patch removes ths7303_setup() function and calls ths7303_setval()
in the probe setting the device to 480I_576I filter mode in the probe.

Signed-off-by: Lad, Prabhakar <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Sakari Ailus <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/media/i2c/ths7303.c | 31 ++++---------------------------
1 files changed, 4 insertions(+), 27 deletions(-)

diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
index 8cddcd0..af06187c 100644
--- a/drivers/media/i2c/ths7303.c
+++ b/drivers/media/i2c/ths7303.c
@@ -349,30 +349,6 @@ static const struct v4l2_subdev_ops ths7303_ops = {
.video = &ths7303_video_ops,
};

-static int ths7303_setup(struct v4l2_subdev *sd)
-{
- struct ths7303_state *state = to_state(sd);
- struct ths7303_platform_data *pdata = &state->pdata;
- int ret;
- u8 mask;
-
- mask = 0xf8;
-
- ret = ths7303_write(sd, THS7303_CHANNEL_1, pdata->ch_1 & mask);
- if (ret)
- return ret;
-
- ret = ths7303_write(sd, THS7303_CHANNEL_2, pdata->ch_2 & mask);
- if (ret)
- return ret;
-
- ret = ths7303_write(sd, THS7303_CHANNEL_3, pdata->ch_3 & mask);
- if (ret)
- return ret;
-
- return 0;
-}
-
static int ths7303_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
@@ -402,9 +378,10 @@ static int ths7303_probe(struct i2c_client *client,
/* store the driver data to differntiate the chip */
state->driver_data = (int)id->driver_data;

- if (ths7303_setup(sd) < 0) {
- v4l_err(client, "init failed\n");
- return -EIO;
+ /* set to default 480I_576I filter mode */
+ if (ths7303_setval(sd, THS7303_FILTER_MODE_480I_576I) < 0) {
+ v4l_err(client, "Setting to 480I_576I filter mode failed!\n");
+ return -EINVAL;
}

return 0;
--
1.7.4.1

2013-05-15 12:01:56

by Lad, Prabhakar

[permalink] [raw]
Subject: [PATCH 4/6] media: i2c: ths7303: make the pdata as a constant pointer

From: Lad, Prabhakar <[email protected]>

generally the pdata needs to be a constant pointer in the device
state structure. This patch makes the pdata as a constant pointer
and alongside returns -EINVAL when pdata is NULL.

Signed-off-by: Lad, Prabhakar <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Sakari Ailus <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/media/i2c/ths7303.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
index af06187c..b954195 100644
--- a/drivers/media/i2c/ths7303.c
+++ b/drivers/media/i2c/ths7303.c
@@ -35,7 +35,7 @@

struct ths7303_state {
struct v4l2_subdev sd;
- struct ths7303_platform_data pdata;
+ const struct ths7303_platform_data *pdata;
struct v4l2_bt_timings bt;
int std_id;
int stream_on;
@@ -89,7 +89,7 @@ int ths7303_setval(struct v4l2_subdev *sd, enum ths7303_filter_mode mode)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct ths7303_state *state = to_state(sd);
- struct ths7303_platform_data *pdata = &state->pdata;
+ const struct ths7303_platform_data *pdata = state->pdata;
u8 val, sel = 0;
int err, disable = 0;

@@ -356,6 +356,11 @@ static int ths7303_probe(struct i2c_client *client,
struct ths7303_state *state;
struct v4l2_subdev *sd;

+ if (pdata == NULL) {
+ dev_err(&client->dev, "No platform data\n");
+ return -EINVAL;
+ }
+
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
return -ENODEV;

@@ -367,11 +372,7 @@ static int ths7303_probe(struct i2c_client *client,
if (!state)
return -ENOMEM;

- if (!pdata)
- v4l_warn(client, "No platform data, using default data!\n");
- else
- state->pdata = *pdata;
-
+ state->pdata = pdata;
sd = &state->sd;
v4l2_i2c_subdev_init(sd, client, &ths7303_ops);

--
1.7.4.1

2013-05-15 12:02:39

by Lad, Prabhakar

[permalink] [raw]
Subject: [PATCH 5/6] media: i2c: ths7303: add support for asynchronous probing

From: Lad, Prabhakar <[email protected]>

Both synchronous and asynchronous ths7303 subdevice probing is supported by
this patch.

Signed-off-by: Lad, Prabhakar <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Sakari Ailus <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/media/i2c/ths7303.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
index b954195..4f772a2 100644
--- a/drivers/media/i2c/ths7303.c
+++ b/drivers/media/i2c/ths7303.c
@@ -26,6 +26,7 @@
#include <linux/slab.h>

#include <media/ths7303.h>
+#include <media/v4l2-async.h>
#include <media/v4l2-chip-ident.h>
#include <media/v4l2-device.h>

@@ -355,6 +356,7 @@ static int ths7303_probe(struct i2c_client *client,
struct ths7303_platform_data *pdata = client->dev.platform_data;
struct ths7303_state *state;
struct v4l2_subdev *sd;
+ int ret;

if (pdata == NULL) {
dev_err(&client->dev, "No platform data\n");
@@ -385,13 +387,20 @@ static int ths7303_probe(struct i2c_client *client,
return -EINVAL;
}

+ state->sd.dev = &client->dev;
+ ret = v4l2_async_register_subdev(&state->sd);
+ if (ret)
+ return ret;
+
return 0;
}

static int ths7303_remove(struct i2c_client *client)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
+ struct ths7303_state *ths7303 = to_state(sd);

+ v4l2_async_unregister_subdev(&ths7303->sd);
v4l2_device_unregister_subdev(sd);

return 0;
--
1.7.4.1

2013-05-15 12:03:31

by Lad, Prabhakar

[permalink] [raw]
Subject: [PATCH 6/6] media: i2c: ths7303: add OF support

From: Lad, Prabhakar <[email protected]>

add OF support for the ths7303 driver.

Signed-off-by: Lad, Prabhakar <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Sakari Ailus <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Rob Landley <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
.../devicetree/bindings/media/i2c/ths73x3.txt | 50 ++++++++++++++++++++
drivers/media/i2c/ths7303.c | 37 ++++++++++++++-
2 files changed, 86 insertions(+), 1 deletions(-)
create mode 100644 Documentation/devicetree/bindings/media/i2c/ths73x3.txt

diff --git a/Documentation/devicetree/bindings/media/i2c/ths73x3.txt b/Documentation/devicetree/bindings/media/i2c/ths73x3.txt
new file mode 100644
index 0000000..62f63e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/ths73x3.txt
@@ -0,0 +1,50 @@
+* Texas Instruments THS7303/THS7353 video amplifier
+
+The THS7303/THS7353 device is a low power 3-channel integrated video buffer
+which can be configured individually via i2c for all the functions which makes
+it flexible for any application. It incorporates a selectable fifth-order
+Butterworth filter to eliminate data converter images.
+
+Required Properties :
+- compatible : value should be either one among the following
+ (a) "ti,ths7303" for ths7303 video amplifier.
+ (b) "ti,ths7353" for ths7353 video amplifier.
+
+- ti,ths73x3-ch1-bias: Bias value for channel 1.
+
+- ti,ths73x3-ch2-bias: Bias value for channel 2.
+
+- ti,ths73x3-ch3-bias: Bias value for channel 3.
+
+Bias values for channel-1/2/3 can be following (values default to zero):-
+ - 0: Disable Channel - Conserves Power
+ - 1: Channel On - Mute Function - No Output
+ - 2: Channel On - DC Bias Select
+ - 3: Channel On - DC Bias + 250 mV Offset Select
+ - 4: Channel On - AC Bias Select
+ - 5: Channel On - Sync Tip Clam with low bias
+ - 6: Channel On - Sync Tip Clam with mid bias
+ - 7: Channel On - Sync Tip Clam with high bias
+
+For further reading of port node refer Documentation/devicetree/bindings/media/
+video-interfaces.txt.
+
+Example:
+
+ i2c0@1c22000 {
+ ...
+ ...
+ ths7303@2c {
+ compatible = "ti,ths7303";
+ reg = <0x2c>;
+
+ port {
+ ths7303_1: endpoint {
+ ti,ths73x3-ch1-bias = <3>;
+ ti,ths73x3-ch2-bias = <3>;
+ ti,ths73x3-ch3-bias = <3>;
+ };
+ };
+ };
+ ...
+ };
diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
index 4f772a2..a648313 100644
--- a/drivers/media/i2c/ths7303.c
+++ b/drivers/media/i2c/ths7303.c
@@ -29,6 +29,7 @@
#include <media/v4l2-async.h>
#include <media/v4l2-chip-ident.h>
#include <media/v4l2-device.h>
+#include <media/v4l2-of.h>

#define THS7303_CHANNEL_1 1
#define THS7303_CHANNEL_2 2
@@ -350,10 +351,34 @@ static const struct v4l2_subdev_ops ths7303_ops = {
.video = &ths7303_video_ops,
};

+static struct ths7303_platform_data *
+ths7303_get_pdata(struct i2c_client *client)
+{
+ struct ths7303_platform_data *pdata;
+ struct device_node *endpoint;
+
+ if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node)
+ return client->dev.platform_data;
+
+ endpoint = v4l2_of_get_next_endpoint(client->dev.of_node, NULL);
+ if (!endpoint)
+ return NULL;
+
+ pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
+ if (!pdata)
+ return NULL;
+
+ of_property_read_u8(endpoint, "ti,ths73x3-ch1-bias", &pdata->ch_1);
+ of_property_read_u8(endpoint, "ti,ths73x3-ch2-bias", &pdata->ch_2);
+ of_property_read_u8(endpoint, "ti,ths73x3-ch3-bias", &pdata->ch_3);
+
+ return pdata;
+}
+
static int ths7303_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- struct ths7303_platform_data *pdata = client->dev.platform_data;
+ struct ths7303_platform_data *pdata = ths7303_get_pdata(client);
struct ths7303_state *state;
struct v4l2_subdev *sd;
int ret;
@@ -414,8 +439,18 @@ static const struct i2c_device_id ths7303_id[] = {

MODULE_DEVICE_TABLE(i2c, ths7303_id);

+#if IS_ENABLED(CONFIG_OF)
+static const struct of_device_id ths73x3_of_match[] = {
+ { .compatible = "ti,ths7303", },
+ { .compatible = "ti,ths7353", },
+ { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, ths73x3_of_match);
+#endif
+
static struct i2c_driver ths7303_driver = {
.driver = {
+ .of_match_table = of_match_ptr(ths73x3_of_match),
.owner = THIS_MODULE,
.name = "ths73x3",
},
--
1.7.4.1

2013-05-15 12:04:51

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata

Hi Prabhakar,

Thank you for the patch.

On Wednesday 15 May 2013 17:27:18 Lad Prabhakar wrote:
> From: Lad, Prabhakar <[email protected]>
>
> remove init_enable from ths7303 pdata as it is no longer exists.

You should move this before 1/6, otherwise you will break bisection.

> Signed-off-by: Lad, Prabhakar <[email protected]>
> Cc: Sekhar Nori <[email protected]>
> Cc: Hans Verkuil <[email protected]>
> Cc: Laurent Pinchart <[email protected]>
> Cc: Mauro Carvalho Chehab <[email protected]>
> Cc: Guennadi Liakhovetski <[email protected]>
> Cc: Sylwester Nawrocki <[email protected]>
> Cc: Sakari Ailus <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> ---
> arch/arm/mach-davinci/board-dm365-evm.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-dm365-evm.c
> b/arch/arm/mach-davinci/board-dm365-evm.c index 2a66743..4e02ae7 100644
> --- a/arch/arm/mach-davinci/board-dm365-evm.c
> +++ b/arch/arm/mach-davinci/board-dm365-evm.c
> @@ -510,7 +510,6 @@ struct ths7303_platform_data ths7303_pdata = {
> .ch_1 = 3,
> .ch_2 = 3,
> .ch_3 = 3,
> - .init_enable = 1,
> };
>
> static struct amp_config_info vpbe_amp = {
--
Regards,

Laurent Pinchart

2013-05-15 12:12:14

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata

Hi Laurent,

Thanks for the review.

On Wed, May 15, 2013 at 5:35 PM, Laurent Pinchart
<[email protected]> wrote:
> Hi Prabhakar,
>
> Thank you for the patch.
>
> On Wednesday 15 May 2013 17:27:18 Lad Prabhakar wrote:
>> From: Lad, Prabhakar <[email protected]>
>>
>> remove init_enable from ths7303 pdata as it is no longer exists.
>
> You should move this before 1/6, otherwise you will break bisection.
>
OK I'll fix it in next version.

Regards,
--Prabhakar Lad

2013-05-16 11:48:26

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata

Hi Laurent,

On Wed, May 15, 2013 at 5:41 PM, Prabhakar Lad
<[email protected]> wrote:
> Hi Laurent,
>
> Thanks for the review.
>
> On Wed, May 15, 2013 at 5:35 PM, Laurent Pinchart
> <[email protected]> wrote:
>> Hi Prabhakar,
>>
>> Thank you for the patch.
>>
>> On Wednesday 15 May 2013 17:27:18 Lad Prabhakar wrote:
>>> From: Lad, Prabhakar <[email protected]>
>>>
>>> remove init_enable from ths7303 pdata as it is no longer exists.
>>
>> You should move this before 1/6, otherwise you will break bisection.
>>
How about I just reshuffles while issuing a pull rather than resending
the whole series ?

Regards,
--Prabhakar Lad

2013-05-16 11:53:50

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata

Hi Prabhakar,

On Thursday 16 May 2013 17:18:00 Prabhakar Lad wrote:
> On Wed, May 15, 2013 at 5:41 PM, Prabhakar Lad wrote:
> > On Wed, May 15, 2013 at 5:35 PM, Laurent Pinchart wrote:
> >> On Wednesday 15 May 2013 17:27:18 Lad Prabhakar wrote:
> >>> From: Lad, Prabhakar <[email protected]>
> >>>
> >>> remove init_enable from ths7303 pdata as it is no longer exists.
> >>
> >> You should move this before 1/6, otherwise you will break bisection.
>
> How about I just reshuffles while issuing a pull rather than resending
> the whole series ?

As long as you don't forget to do so, sure :-)

--
Regards,

Laurent Pinchart

2013-05-16 22:38:15

by Sakari Ailus

[permalink] [raw]
Subject: Re: [PATCH 1/6] media: i2c: ths7303: remove init_enable option from pdata

Hi Prabhakar,

Thanks for the patch!

On Wed, May 15, 2013 at 05:27:17PM +0530, Lad Prabhakar wrote:
> diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
> index 65853ee..8cddcd0 100644
> --- a/drivers/media/i2c/ths7303.c
> +++ b/drivers/media/i2c/ths7303.c
> @@ -356,9 +356,7 @@ static int ths7303_setup(struct v4l2_subdev *sd)
> int ret;
> u8 mask;
>
> - state->stream_on = pdata->init_enable;
> -
> - mask = state->stream_on ? 0xff : 0xf8;
> + mask = 0xf8;

You can assign mask in declaration. It'd be nice to have a human-readable
name for the mask, too.

--
Kind regards,

Sakari Ailus
e-mail: [email protected] XMPP: [email protected]

2013-05-17 04:57:01

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 1/6] media: i2c: ths7303: remove init_enable option from pdata

Hi Sakari,

Thanks for the review.

On Fri, May 17, 2013 at 4:07 AM, Sakari Ailus <[email protected]> wrote:
> Hi Prabhakar,
>
> Thanks for the patch!
>
> On Wed, May 15, 2013 at 05:27:17PM +0530, Lad Prabhakar wrote:
>> diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
>> index 65853ee..8cddcd0 100644
>> --- a/drivers/media/i2c/ths7303.c
>> +++ b/drivers/media/i2c/ths7303.c
>> @@ -356,9 +356,7 @@ static int ths7303_setup(struct v4l2_subdev *sd)
>> int ret;
>> u8 mask;
>>
>> - state->stream_on = pdata->init_enable;
>> -
>> - mask = state->stream_on ? 0xff : 0xf8;
>> + mask = 0xf8;
>
> You can assign mask in declaration. It'd be nice to have a human-readable
> name for the mask, too.
>
This function gets removed in the preceding patch of this series.

Regards,
--Prabhakar Lad

2013-05-23 08:52:03

by Hans Verkuil

[permalink] [raw]
Subject: Re: [PATCH 0/6] media: i2c: ths7303 feature enhancement and cleanup

On Wed 15 May 2013 13:57:16 Lad Prabhakar wrote:
> From: Lad, Prabhakar <[email protected]>
>
> This patch series enables the ths7303 driver for asynchronous probing, OF
> support with some cleanup patches.
>
> Lad, Prabhakar (6):
> media: i2c: ths7303: remove init_enable option from pdata
> ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata
> media: i2c: ths7303: remove unnecessary function ths7303_setup()
> media: i2c: ths7303: make the pdata as a constant pointer
> media: i2c: ths7303: add support for asynchronous probing
> media: i2c: ths7303: add OF support

Can you post this again in the right order (swapping the first two patches)
and preferably with an ack from the mach-davinci maintainer?

Once I have that I can take in the first four patches and I can take the
final two patches once the async support is merged.

Regards,

Hans

2013-05-23 09:07:49

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 0/6] media: i2c: ths7303 feature enhancement and cleanup

Hi Hans,

On Thu, May 23, 2013 at 2:21 PM, Hans Verkuil <[email protected]> wrote:
> On Wed 15 May 2013 13:57:16 Lad Prabhakar wrote:
>> From: Lad, Prabhakar <[email protected]>
>>
>> This patch series enables the ths7303 driver for asynchronous probing, OF
>> support with some cleanup patches.
>>
>> Lad, Prabhakar (6):
>> media: i2c: ths7303: remove init_enable option from pdata
>> ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata
>> media: i2c: ths7303: remove unnecessary function ths7303_setup()
>> media: i2c: ths7303: make the pdata as a constant pointer
>> media: i2c: ths7303: add support for asynchronous probing
>> media: i2c: ths7303: add OF support
>
> Can you post this again in the right order (swapping the first two patches)
> and preferably with an ack from the mach-davinci maintainer?
>
> Once I have that I can take in the first four patches and I can take the
> final two patches once the async support is merged.
>
Ok I'll do it today.

Regards,
--Prabhakar Lad

2013-05-23 09:10:46

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata

Hi Sekhar,

On Wed, May 15, 2013 at 5:27 PM, Lad Prabhakar
<[email protected]> wrote:
> From: Lad, Prabhakar <[email protected]>
>
> remove init_enable from ths7303 pdata as it is no longer exists.
>
Can you please ack this patch, as this patch is intended to go via media tree.

Regards,
--Prabhakar Lad