diff mbox

[3/3] ir-kbd-i2c: Add support for Z8F0811/Hauppage IR transceivers

Message ID 1247863795.10066.36.camel@palomino.walls.org (mailing list archive)
State Accepted
Delegated to: Douglas Landgraf
Headers show

Commit Message

Andy Walls July 17, 2009, 8:49 p.m. UTC
This patch adds support for Zilog Z8F0811 IR transceiver chips on
CX2341[68] based boards to ir-kbd-i2c for both the old i2c binding model
and the new i2c binding model.

Regards,
Andy





--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jean Delvare July 19, 2009, 7:22 p.m. UTC | #1
Hi Andy,

On Fri, 17 Jul 2009 16:49:55 -0400, Andy Walls wrote:
> This patch adds support for Zilog Z8F0811 IR transceiver chips on
> CX2341[68] based boards to ir-kbd-i2c for both the old i2c binding model
> and the new i2c binding model.
> 
> Regards,
> Andy
> 
> diff -r d754a2d5a376 linux/drivers/media/video/ir-kbd-i2c.c
> --- a/linux/drivers/media/video/ir-kbd-i2c.c	Wed Jul 15 07:28:02 2009 -0300
> +++ b/linux/drivers/media/video/ir-kbd-i2c.c	Fri Jul 17 16:05:28 2009 -0400
> @@ -442,9 +442,11 @@
>  	case 0x47:
>  	case 0x71:
>  	case 0x2d:
> -		if (adap->id == I2C_HW_B_CX2388x) {
> +		if (adap->id == I2C_HW_B_CX2388x ||
> +		    adap->id == I2C_HW_B_CX2341X) {
>  			/* Handled by cx88-input */
> -			name        = "CX2388x remote";
> +			name = adap->id == I2C_HW_B_CX2341X ? "CX2341x remote"
> +							    : "CX2388x remote";
>  			ir_type     = IR_TYPE_RC5;
>  			ir->get_key = get_key_haup_xvr;
>  			if (hauppauge == 1) {
> @@ -697,7 +726,8 @@
>  static const struct i2c_device_id ir_kbd_id[] = {
>  	/* Generic entry for any IR receiver */
>  	{ "ir_video", 0 },
> -	/* IR device specific entries could be added here */
> +	/* IR device specific entries should be added here */
> +	{ "ir_rx_z8f0811_haup", 0 },
>  	{ }
>  };
>  

Yes, looks good.
diff mbox

Patch

diff -r d754a2d5a376 linux/drivers/media/video/ir-kbd-i2c.c
--- a/linux/drivers/media/video/ir-kbd-i2c.c	Wed Jul 15 07:28:02 2009 -0300
+++ b/linux/drivers/media/video/ir-kbd-i2c.c	Fri Jul 17 16:05:28 2009 -0400
@@ -442,9 +442,11 @@ 
 	case 0x47:
 	case 0x71:
 	case 0x2d:
-		if (adap->id == I2C_HW_B_CX2388x) {
+		if (adap->id == I2C_HW_B_CX2388x ||
+		    adap->id == I2C_HW_B_CX2341X) {
 			/* Handled by cx88-input */
-			name        = "CX2388x remote";
+			name = adap->id == I2C_HW_B_CX2341X ? "CX2341x remote"
+							    : "CX2388x remote";
 			ir_type     = IR_TYPE_RC5;
 			ir->get_key = get_key_haup_xvr;
 			if (hauppauge == 1) {
@@ -697,7 +726,8 @@ 
 static const struct i2c_device_id ir_kbd_id[] = {
 	/* Generic entry for any IR receiver */
 	{ "ir_video", 0 },
-	/* IR device specific entries could be added here */
+	/* IR device specific entries should be added here */
+	{ "ir_rx_z8f0811_haup", 0 },
 	{ }
 };