Commit 7bc8a0de authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

media: rc: probe zilog transmitter when zilog receiver is found

Both Hauppauge WinTV 44981 (bt878) and the HVR 1110 (saa7134) have a Zilog
Z8F0811. The transmitter was not probed. Receive and transmit tested on
both cards.
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent f9d94a10
...@@ -739,6 +739,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -739,6 +739,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
struct rc_dev *rc = NULL; struct rc_dev *rc = NULL;
struct i2c_adapter *adap = client->adapter; struct i2c_adapter *adap = client->adapter;
unsigned short addr = client->addr; unsigned short addr = client->addr;
bool probe_tx = (id->driver_data & FLAG_TX) != 0;
int err; int err;
if ((id->driver_data & FLAG_HDPVR) && !enable_hdpvr) { if ((id->driver_data & FLAG_HDPVR) && !enable_hdpvr) {
...@@ -800,6 +801,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -800,6 +801,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
rc_proto = RC_PROTO_BIT_RC5 | RC_PROTO_BIT_RC6_MCE | rc_proto = RC_PROTO_BIT_RC5 | RC_PROTO_BIT_RC6_MCE |
RC_PROTO_BIT_RC6_6A_32; RC_PROTO_BIT_RC6_6A_32;
ir_codes = RC_MAP_HAUPPAUGE; ir_codes = RC_MAP_HAUPPAUGE;
probe_tx = true;
break; break;
} }
...@@ -892,7 +894,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -892,7 +894,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
INIT_DELAYED_WORK(&ir->work, ir_work); INIT_DELAYED_WORK(&ir->work, ir_work);
if (id->driver_data & FLAG_TX) { if (probe_tx) {
ir->tx_c = i2c_new_dummy(client->adapter, 0x70); ir->tx_c = i2c_new_dummy(client->adapter, 0x70);
if (!ir->tx_c) { if (!ir->tx_c) {
dev_err(&client->dev, "failed to setup tx i2c address"); dev_err(&client->dev, "failed to setup tx i2c address");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment