public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [git:media_tree/master] [media] Add device tree support to adp1653 flash driver
       [not found] <E1Yg11T-00074E-Hx@www.linuxtv.org>
@ 2015-04-09  6:25 ` Hans Verkuil
  2015-04-09  7:30   ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Verkuil @ 2015-04-09  6:25 UTC (permalink / raw)
  To: linux-media, Pavel Machek, Sakari Ailus

Hi Pawel,

This driver doesn't compile:

On 04/08/2015 10:46 PM, Mauro Carvalho Chehab wrote:
> This is an automatic generated email to let you know that the following patch were queued at the 
> http://git.linuxtv.org/cgit.cgi/media_tree.git tree:
> 
> Subject: [media] Add device tree support to adp1653 flash driver
> Author:  Pavel Machek <pavel@ucw.cz>
> Date:    Fri Mar 13 17:48:40 2015 -0300
> 
> Nokia N900 is switching to device tree, make sure we can use flash
> there, too.
> 
> Signed-off-by: Pavel Machek <pavel@ucw.cz>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> 
>  .../devicetree/bindings/media/i2c/adp1653.txt      |   37 ++++++++
>  drivers/media/i2c/adp1653.c                        |   90 ++++++++++++++++++--
>  2 files changed, 118 insertions(+), 9 deletions(-)
> 
> ---
> 
> http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=b6100f10bdc2019a65297d2597c388de2f7dd653
> 
> diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c
> index 873fe19..0341009 100644
> --- a/drivers/media/i2c/adp1653.c
> +++ b/drivers/media/i2c/adp1653.c
> @@ -306,9 +309,17 @@ adp1653_init_device(struct adp1653_flash *flash)
>  static int
>  __adp1653_set_power(struct adp1653_flash *flash, int on)
>  {
> -	int ret;
> +	int ret = 0;
> +
> +	if (flash->platform_data->power) {
> +		ret = flash->platform_data->power(&flash->subdev, on);
> +	} else {
> +		gpio_set_value(flash->platform_data->power_gpio, on);

The power_gpio field is not found in struct adp1653_platform_data.

Can you fix this?

I'm also getting this warning:

adp1653.c:433:6: warning: unused variable 'gpio' [-Wunused-variable]
  int gpio;
      ^

Please fix that as well.

Strange, this patch seems to have been merged without anyone compiling it first.

Regards,

	Hans

> +		if (on)
> +			/* Some delay is apparently required. */
> +			udelay(20);
> +	}
>  
> -	ret = flash->platform_data->power(&flash->subdev, on);
>  	if (ret < 0)
>  		return ret;
>  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [git:media_tree/master] [media] Add device tree support to adp1653 flash driver
  2015-04-09  6:25 ` [git:media_tree/master] [media] Add device tree support to adp1653 flash driver Hans Verkuil
@ 2015-04-09  7:30   ` Pavel Machek
  2015-04-09  7:34     ` Hans Verkuil
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2015-04-09  7:30 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, Sakari Ailus

Hi!

> Hi Pawel,

Me?

> This driver doesn't compile:
> 
> On 04/08/2015 10:46 PM, Mauro Carvalho Chehab wrote:
> > This is an automatic generated email to let you know that the following patch were queued at the 
> > http://git.linuxtv.org/cgit.cgi/media_tree.git tree:
> > 

> > --- a/drivers/media/i2c/adp1653.c
> > +++ b/drivers/media/i2c/adp1653.c
> > @@ -306,9 +309,17 @@ adp1653_init_device(struct adp1653_flash *flash)
> >  static int
> >  __adp1653_set_power(struct adp1653_flash *flash, int on)
> >  {
> > -	int ret;
> > +	int ret = 0;
> > +
> > +	if (flash->platform_data->power) {
> > +		ret = flash->platform_data->power(&flash->subdev, on);
> > +	} else {
> > +		gpio_set_value(flash->platform_data->power_gpio, on);
> 
> The power_gpio field is not found in struct adp1653_platform_data.

Yes, int power_gpio should be added into that struct.

> Can you fix this?
> 
> I'm also getting this warning:

Well, old version of patch was merged while new versions were getting
discussed / developed in another mail thread.

I guess best course of action is to drop this from Mauro's tree, as
conflicting patch exists in Sakari's tree...?

Thanks,
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [git:media_tree/master] [media] Add device tree support to adp1653 flash driver
  2015-04-09  7:30   ` Pavel Machek
@ 2015-04-09  7:34     ` Hans Verkuil
  2015-04-09  7:49       ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Verkuil @ 2015-04-09  7:34 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-media, Sakari Ailus, Mauro Carvalho Chehab

On 04/09/2015 09:30 AM, Pavel Machek wrote:
> Hi!
> 
>> Hi Pawel,
> 
> Me?

Oops, sorry. I meant Pavel. Apologies for misspelling your name.

> 
>> This driver doesn't compile:
>>
>> On 04/08/2015 10:46 PM, Mauro Carvalho Chehab wrote:
>>> This is an automatic generated email to let you know that the following patch were queued at the 
>>> http://git.linuxtv.org/cgit.cgi/media_tree.git tree:
>>>
> 
>>> --- a/drivers/media/i2c/adp1653.c
>>> +++ b/drivers/media/i2c/adp1653.c
>>> @@ -306,9 +309,17 @@ adp1653_init_device(struct adp1653_flash *flash)
>>>  static int
>>>  __adp1653_set_power(struct adp1653_flash *flash, int on)
>>>  {
>>> -	int ret;
>>> +	int ret = 0;
>>> +
>>> +	if (flash->platform_data->power) {
>>> +		ret = flash->platform_data->power(&flash->subdev, on);
>>> +	} else {
>>> +		gpio_set_value(flash->platform_data->power_gpio, on);
>>
>> The power_gpio field is not found in struct adp1653_platform_data.
> 
> Yes, int power_gpio should be added into that struct.
> 
>> Can you fix this?
>>
>> I'm also getting this warning:
> 
> Well, old version of patch was merged while new versions were getting
> discussed / developed in another mail thread.
> 
> I guess best course of action is to drop this from Mauro's tree, as
> conflicting patch exists in Sakari's tree...?

Sakari, do you agree? How did this patch manage to be merged? Was it not
marked Superseded?

Regards,

	Hans

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [git:media_tree/master] [media] Add device tree support to adp1653 flash driver
  2015-04-09  7:34     ` Hans Verkuil
@ 2015-04-09  7:49       ` Sakari Ailus
  0 siblings, 0 replies; 4+ messages in thread
From: Sakari Ailus @ 2015-04-09  7:49 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab; +Cc: Pavel Machek, linux-media

Hi,

On Thu, Apr 09, 2015 at 09:34:00AM +0200, Hans Verkuil wrote:
...
> >>> --- a/drivers/media/i2c/adp1653.c
> >>> +++ b/drivers/media/i2c/adp1653.c
> >>> @@ -306,9 +309,17 @@ adp1653_init_device(struct adp1653_flash *flash)
> >>>  static int
> >>>  __adp1653_set_power(struct adp1653_flash *flash, int on)
> >>>  {
> >>> -	int ret;
> >>> +	int ret = 0;
> >>> +
> >>> +	if (flash->platform_data->power) {
> >>> +		ret = flash->platform_data->power(&flash->subdev, on);
> >>> +	} else {
> >>> +		gpio_set_value(flash->platform_data->power_gpio, on);
> >>
> >> The power_gpio field is not found in struct adp1653_platform_data.
> > 
> > Yes, int power_gpio should be added into that struct.
> > 
> >> Can you fix this?
> >>
> >> I'm also getting this warning:
> > 
> > Well, old version of patch was merged while new versions were getting
> > discussed / developed in another mail thread.
> > 
> > I guess best course of action is to drop this from Mauro's tree, as
> > conflicting patch exists in Sakari's tree...?
> 
> Sakari, do you agree? How did this patch manage to be merged? Was it not
> marked Superseded?

I don't know why that was merged. The patch is an old version of the adp1653
DT support patch, which was agreed to split into two: DT binding
documentation and the driver changes. As Pavel said, the DT documentation
patch is in my tree.

Mauro, could you revert it, please?

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-09  7:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1Yg11T-00074E-Hx@www.linuxtv.org>
2015-04-09  6:25 ` [git:media_tree/master] [media] Add device tree support to adp1653 flash driver Hans Verkuil
2015-04-09  7:30   ` Pavel Machek
2015-04-09  7:34     ` Hans Verkuil
2015-04-09  7:49       ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox