Commit 195784b8 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (11253): saa7134: fix RTD Embedded Technologies VFG7350 support.

This card has the saa6752hs on 7-bit address 0x21 instead of 0x20. Add
support in the card definition struct to select which address to use and
update the definitions accordingly.
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e7ddcd98
...@@ -273,6 +273,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -273,6 +273,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET, .radio_type = UNSET,
.tuner_addr = ADDR_UNSET, .tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET,
.empress_addr = 0x20,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
...@@ -409,6 +410,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -409,6 +410,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET, .radio_type = UNSET,
.tuner_addr = ADDR_UNSET, .tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET,
.empress_addr = 0x20,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.gpiomask = 0x820000, .gpiomask = 0x820000,
.inputs = {{ .inputs = {{
...@@ -819,6 +821,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -819,6 +821,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET, .radio_type = UNSET,
.tuner_addr = ADDR_UNSET, .tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET,
.empress_addr = 0x20,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
.vmux = 4, .vmux = 4,
...@@ -978,6 +981,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -978,6 +981,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET, .radio_type = UNSET,
.tuner_addr = ADDR_UNSET, .tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET,
.empress_addr = 0x20,
.inputs = {{ .inputs = {{
.name = name_comp1, .name = name_comp1,
.vmux = 1, .vmux = 1,
...@@ -2365,6 +2369,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -2365,6 +2369,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET, .radio_type = UNSET,
.tuner_addr = ADDR_UNSET, .tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET,
.empress_addr = 0x21,
.inputs = {{ .inputs = {{
.name = "Composite 0", .name = "Composite 0",
.vmux = 0, .vmux = 0,
...@@ -4133,6 +4138,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -4133,6 +4138,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET, .radio_type = UNSET,
.tuner_addr = ADDR_UNSET, .tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET,
.empress_addr = 0x20,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = { { .inputs = { {
.name = name_tv, .name = name_tv,
...@@ -4169,6 +4175,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -4169,6 +4175,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET, .radio_type = UNSET,
.tuner_addr = ADDR_UNSET, .tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET,
.empress_addr = 0x20,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = { { .inputs = { {
.name = name_tv, .name = name_tv,
...@@ -4206,6 +4213,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -4206,6 +4213,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET, .radio_type = UNSET,
.tuner_addr = ADDR_UNSET, .tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET,
.empress_addr = 0x20,
.tda9887_conf = TDA9887_PRESENT, .tda9887_conf = TDA9887_PRESENT,
.inputs = { { .inputs = { {
.name = name_tv, .name = name_tv,
......
...@@ -982,8 +982,9 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, ...@@ -982,8 +982,9 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
/* load i2c helpers */ /* load i2c helpers */
if (card_is_empress(dev)) { if (card_is_empress(dev)) {
struct v4l2_subdev *sd = struct v4l2_subdev *sd =
v4l2_i2c_new_subdev(&dev->i2c_adap, "saa6752hs", v4l2_i2c_new_subdev(&dev->i2c_adap,
"saa6752hs", 0x20); "saa6752hs", "saa6752hs",
saa7134_boards[dev->board].empress_addr);
if (sd) if (sd)
sd->grp_id = GRP_EMPRESS; sd->grp_id = GRP_EMPRESS;
......
...@@ -416,8 +416,7 @@ static int empress_g_chip_ident(struct file *file, void *fh, ...@@ -416,8 +416,7 @@ static int empress_g_chip_ident(struct file *file, void *fh,
if (chip->match.type == V4L2_CHIP_MATCH_I2C_DRIVER && if (chip->match.type == V4L2_CHIP_MATCH_I2C_DRIVER &&
!strcmp(chip->match.name, "saa6752hs")) !strcmp(chip->match.name, "saa6752hs"))
return saa_call_empress(dev, core, g_chip_ident, chip); return saa_call_empress(dev, core, g_chip_ident, chip);
if (chip->match.type == V4L2_CHIP_MATCH_I2C_ADDR && if (chip->match.type == V4L2_CHIP_MATCH_I2C_ADDR)
chip->match.addr == 0x20)
return saa_call_empress(dev, core, g_chip_ident, chip); return saa_call_empress(dev, core, g_chip_ident, chip);
return -EINVAL; return -EINVAL;
} }
......
...@@ -332,6 +332,7 @@ struct saa7134_board { ...@@ -332,6 +332,7 @@ struct saa7134_board {
unsigned int radio_type; unsigned int radio_type;
unsigned char tuner_addr; unsigned char tuner_addr;
unsigned char radio_addr; unsigned char radio_addr;
unsigned char empress_addr;
unsigned int tda9887_conf; unsigned int tda9887_conf;
unsigned int tuner_config; unsigned int tuner_config;
......
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