All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: "Frank Schäfer" <fschaefer.oss@googlemail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 4/6] em28xx: IR RC: get rid of function em28xx_get_key_terratec()
Date: Sat, 5 Jan 2013 00:41:07 -0200	[thread overview]
Message-ID: <20130105004107.49aa5158@redhat.com> (raw)
In-Reply-To: <1356649368-5426-5-git-send-email-fschaefer.oss@googlemail.com>

Em Fri, 28 Dec 2012 00:02:46 +0100
Frank Schäfer <fschaefer.oss@googlemail.com> escreveu:

> Module "ir-kbd-i2c" already provides this function as IR_KBD_GET_KEY_KNC1.

See my comment for patch 6/6.

Regards,
Mauro
> 
> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
> ---
>  drivers/media/usb/em28xx/em28xx-input.c |   30 +-----------------------------
>  1 Datei geändert, 1 Zeile hinzugefügt(+), 29 Zeilen entfernt(-)
> 
> diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
> index 631e252..62b6cb7 100644
> --- a/drivers/media/usb/em28xx/em28xx-input.c
> +++ b/drivers/media/usb/em28xx/em28xx-input.c
> @@ -85,34 +85,6 @@ struct em28xx_IR {
>   I2C IR based get keycodes - should be used with ir-kbd-i2c
>   **********************************************************/
>  
> -static int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
> -{
> -	unsigned char b;
> -
> -	/* poll IR chip */
> -	if (1 != i2c_master_recv(ir->c, &b, 1)) {
> -		i2cdprintk("read error\n");
> -		return -EIO;
> -	}
> -
> -	/* it seems that 0xFE indicates that a button is still hold
> -	   down, while 0xff indicates that no button is hold
> -	   down. 0xfe sequences are sometimes interrupted by 0xFF */
> -
> -	i2cdprintk("key %02x\n", b);
> -
> -	if (b == 0xff)
> -		return 0;
> -
> -	if (b == 0xfe)
> -		/* keep old data */
> -		return 1;
> -
> -	*ir_key = b;
> -	*ir_raw = b;
> -	return 1;
> -}
> -
>  static int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
>  {
>  	unsigned char buf[2];
> @@ -476,7 +448,7 @@ static int em28xx_register_i2c_ir(struct em28xx *dev, struct rc_dev *rc_dev)
>  	case EM2820_BOARD_TERRATEC_CINERGY_250:
>  		dev->init_data.name = "i2c IR (EM28XX Terratec)";
>  		dev->init_data.type = RC_BIT_OTHER;
> -		dev->init_data.get_key = em28xx_get_key_terratec;
> +		dev->init_data.internal_get_key_func = IR_KBD_GET_KEY_KNC1;
>  		break;
>  	case EM2820_BOARD_PINNACLE_USB_2:
>  		dev->init_data.name = "i2c IR (EM28XX Pinnacle PCTV)";


-- 

Cheers,
Mauro

  reply	other threads:[~2013-01-05  2:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27 23:02 [PATCH 0/6] em28xx: make remote controls of devices with external IR IC working again Frank Schäfer
2012-12-27 23:02 ` [PATCH 1/6] em28xx: simplify device state tracking Frank Schäfer
2012-12-27 23:02 ` [PATCH 2/6] em28xx: refactor the code in em28xx_usb_disconnect() Frank Schäfer
2013-01-02 19:40   ` Antti Palosaari
2013-01-02 21:18     ` Frank Schäfer
2012-12-27 23:02 ` [PATCH 3/6] em28xx: make remote controls of devices with external IR IC working again Frank Schäfer
2013-01-04 21:12   ` Mauro Carvalho Chehab
2013-01-05 12:58     ` Frank Schäfer
2013-01-05 13:26       ` Mauro Carvalho Chehab
2013-01-05 13:51         ` Frank Schäfer
2012-12-27 23:02 ` [PATCH 4/6] em28xx: IR RC: get rid of function em28xx_get_key_terratec() Frank Schäfer
2013-01-05  2:41   ` Mauro Carvalho Chehab [this message]
2012-12-27 23:02 ` [PATCH 5/6] em28xx: IR RC: move assignment of get_key functions from *_change_protocol() functions to em28xx_ir_init() Frank Schäfer
2012-12-27 23:02 ` [PATCH 6/6] ir-kbd-i2c: fix get_key_knc1() Frank Schäfer
2013-01-05  2:39   ` Mauro Carvalho Chehab
2013-01-05 13:32     ` Frank Schäfer
2013-01-05 15:25       ` Mauro Carvalho Chehab
2013-01-06 20:32         ` Frank Schäfer
2013-01-07 16:40           ` Mauro Carvalho Chehab
2013-01-08 17:39             ` Frank Schäfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130105004107.49aa5158@redhat.com \
    --to=mchehab@redhat.com \
    --cc=fschaefer.oss@googlemail.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.