Re: [PATCH v2 02/17] media: v4l2-common: get rid of v4l2_routing dead struct

2017-12-18 Thread Sean Young
On Mon, Dec 18, 2017 at 12:11:13PM -0200, Mauro Carvalho Chehab wrote:
> Em Fri, 13 Oct 2017 15:24:34 +0200
> Hans Verkuil  escreveu:
> 
> > > ---
> > >  include/media/v4l2-common.h | 14 +-
> > >  1 file changed, 5 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
> > > @@ -238,11 +239,6 @@ struct v4l2_priv_tun_config {
> > >  
> > >  #define VIDIOC_INT_RESET _IOW ('d', 102, u32)  
> 
> > 
> > Regarding this one: I *think* (long time ago) that the main reason for this
> > was to reset a locked up IR blaster. I wonder if this is still needed after
> > Sean's rework of this. Once that's all done and merged this would probably
> > merit another look to see if it can be removed.
> 
> Sean,
> 
> Could you please double-check if this is still required on RC?

The ioctl can also reset the digitizer in ivtv, I don't know anything
about that.

As far the IR receiver/blaster is concerned:

This ioctl does exactly as it says and it works. There are a few ways
that the zilog microcontroller can be crashed, but I don't know of any
that exist in the current code base.

I seem to recall that the microcontroller could get stuck due particular 
i2c states, which was fixed with patches to ivtv-i2c.c. That does not mean
there aren't any others though. 

What would be nicer if the ir driver got no response, it would reset it
automatically. I'm not sure how to wire up ir-kbd-i2c with the ir reset
function of ivtv and cx18 though.

Then again with no known use cases it seems superfluous. How about removing
the ioctl and then hooking up the IR driver to the reset, should it be
necessary?


Sean


Re: [PATCH v2 02/17] media: v4l2-common: get rid of v4l2_routing dead struct

2017-12-18 Thread Mauro Carvalho Chehab
Em Fri, 13 Oct 2017 15:24:34 +0200
Hans Verkuil  escreveu:

> > ---
> >  include/media/v4l2-common.h | 14 +-
> >  1 file changed, 5 insertions(+), 9 deletions(-)
> > 
> > diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
> > @@ -238,11 +239,6 @@ struct v4l2_priv_tun_config {
> >  
> >  #define VIDIOC_INT_RESET   _IOW ('d', 102, u32)  

> 
> Regarding this one: I *think* (long time ago) that the main reason for this
> was to reset a locked up IR blaster. I wonder if this is still needed after
> Sean's rework of this. Once that's all done and merged this would probably
> merit another look to see if it can be removed.

Sean,

Could you please double-check if this is still required on RC?


Thanks,
Mauro


Re: [PATCH v2 02/17] media: v4l2-common: get rid of v4l2_routing dead struct

2017-10-13 Thread Hans Verkuil
On 09/27/17 23:46, Mauro Carvalho Chehab wrote:
> This struct is not used anymore. Get rid of it and update
> the documentation about what should still be converted.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Hans Verkuil 

> ---
>  include/media/v4l2-common.h | 14 +-
>  1 file changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
> index aac8b7b6e691..7dbecbe3009c 100644
> --- a/include/media/v4l2-common.h
> +++ b/include/media/v4l2-common.h
> @@ -224,10 +224,11 @@ void v4l2_spi_subdev_init(struct v4l2_subdev *sd, 
> struct spi_device *spi,
>  
>  /* - 
> */
>  
> -/* Note: these remaining ioctls/structs should be removed as well, but they 
> are
> -   still used in tuner-simple.c (TUNER_SET_CONFIG), cx18/ivtv (RESET) and
> -   v4l2-int-device.h (v4l2_routing). To remove these ioctls some more cleanup
> -   is needed in those modules. */
> +/*
> + * FIXME: these remaining ioctls/structs should be removed as well, but they
> + * are still used in tuner-simple.c (TUNER_SET_CONFIG) and cx18/ivtv (RESET).
> + * To remove these ioctls some more cleanup is needed in those modules.
> + */
>  
>  /* s_config */
>  struct v4l2_priv_tun_config {
> @@ -238,11 +239,6 @@ struct v4l2_priv_tun_config {
>  
>  #define VIDIOC_INT_RESET _IOW ('d', 102, u32)

Regarding this one: I *think* (long time ago) that the main reason for this
was to reset a locked up IR blaster. I wonder if this is still needed after
Sean's rework of this. Once that's all done and merged this would probably
merit another look to see if it can be removed.

Regards,

Hans

>  
> -struct v4l2_routing {
> - u32 input;
> - u32 output;
> -};
> -
>  /* - 
> */
>  
>  /* Miscellaneous helper functions */
> 



Re: [PATCH v2 02/17] media: v4l2-common: get rid of v4l2_routing dead struct

2017-10-13 Thread Laurent Pinchart
Hi Mauro,

Thank you for the patch.

On Thursday, 28 September 2017 00:46:45 EEST Mauro Carvalho Chehab wrote:
> This struct is not used anymore. Get rid of it and update
> the documentation about what should still be converted.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Laurent Pinchart 

> ---
>  include/media/v4l2-common.h | 14 +-
>  1 file changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
> index aac8b7b6e691..7dbecbe3009c 100644
> --- a/include/media/v4l2-common.h
> +++ b/include/media/v4l2-common.h
> @@ -224,10 +224,11 @@ void v4l2_spi_subdev_init(struct v4l2_subdev *sd,
> struct spi_device *spi,
> 
>  /*
> -
> */
> 
> -/* Note: these remaining ioctls/structs should be removed as well, but they
> are -   still used in tuner-simple.c (TUNER_SET_CONFIG), cx18/ivtv (RESET)
> and -   v4l2-int-device.h (v4l2_routing). To remove these ioctls some more
> cleanup -   is needed in those modules. */
> +/*
> + * FIXME: these remaining ioctls/structs should be removed as well, but
> they + * are still used in tuner-simple.c (TUNER_SET_CONFIG) and cx18/ivtv
> (RESET). + * To remove these ioctls some more cleanup is needed in those
> modules. + */
> 
>  /* s_config */
>  struct v4l2_priv_tun_config {
> @@ -238,11 +239,6 @@ struct v4l2_priv_tun_config {
> 
>  #define VIDIOC_INT_RESET _IOW ('d', 102, u32)
> 
> -struct v4l2_routing {
> - u32 input;
> - u32 output;
> -};
> -
>  /*
> -
> */
> 
>  /* Miscellaneous helper functions */


-- 
Regards,

Laurent Pinchart