Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363807
b: refs/heads/master
c: 8c7e862
h: refs/heads/master
i:
  363805: 31e8fd4
  363803: c55b10c
  363799: 5e85a5d
  363791: 1109746
  363775: 369bfe9
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Mar 29, 2013
1 parent 7977811 commit cb7974b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 226f4ab6e37c255196a61a3bc85fe95821bbd777
refs/heads/master: 8c7e862700285be2bfdca215012eb62cc28e9a48
2 changes: 0 additions & 2 deletions trunk/drivers/staging/iio/adc/ad799x.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ struct ad799x_state;
* struct ad799x_chip_info - chip specifc information
* @channel: channel specification
* @num_channels: number of channels
* @int_vref_mv: the internal reference voltage
* @monitor_mode: whether the chip supports monitor interrupts
* @default_config: device default configuration
* @event_attrs: pointer to the monitor event attribute group
Expand All @@ -96,7 +95,6 @@ struct ad799x_state;
struct ad799x_chip_info {
struct iio_chan_spec channel[9];
int num_channels;
u16 int_vref_mv;
u16 default_config;
const struct iio_info *info;
};
Expand Down
16 changes: 4 additions & 12 deletions trunk/drivers/staging/iio/adc/ad799x_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
},
.num_channels = 5,
.int_vref_mv = 4096,
.info = &ad7991_info,
},
[ad7995] = {
Expand Down Expand Up @@ -538,7 +537,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
},
.num_channels = 5,
.int_vref_mv = 1024,
.info = &ad7991_info,
},
[ad7999] = {
Expand Down Expand Up @@ -578,7 +576,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
},
.num_channels = 5,
.int_vref_mv = 1024,
.info = &ad7991_info,
},
[ad7992] = {
Expand All @@ -604,7 +601,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[2] = IIO_CHAN_SOFT_TIMESTAMP(2),
},
.num_channels = 3,
.int_vref_mv = 4096,
.default_config = AD7998_ALERT_EN,
.info = &ad7992_info,
},
Expand Down Expand Up @@ -649,7 +645,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
},
.num_channels = 5,
.int_vref_mv = 1024,
.default_config = AD7998_ALERT_EN,
.info = &ad7993_4_7_8_info,
},
Expand Down Expand Up @@ -694,7 +689,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
},
.num_channels = 5,
.int_vref_mv = 4096,
.default_config = AD7998_ALERT_EN,
.info = &ad7993_4_7_8_info,
},
Expand Down Expand Up @@ -771,7 +765,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[8] = IIO_CHAN_SOFT_TIMESTAMP(8),
},
.num_channels = 9,
.int_vref_mv = 1024,
.default_config = AD7998_ALERT_EN,
.info = &ad7993_4_7_8_info,
},
Expand Down Expand Up @@ -848,7 +841,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[8] = IIO_CHAN_SOFT_TIMESTAMP(8),
},
.num_channels = 9,
.int_vref_mv = 4096,
.default_config = AD7998_ALERT_EN,
.info = &ad7993_4_7_8_info,
},
Expand All @@ -875,10 +867,10 @@ static int ad799x_probe(struct i2c_client *client,

/* TODO: Add pdata options for filtering and bit delay */

if (pdata)
st->int_vref_mv = pdata->vref_mv;
else
st->int_vref_mv = st->chip_info->int_vref_mv;
if (!pdata)
return -EINVAL;

st->int_vref_mv = pdata->vref_mv;

st->reg = regulator_get(&client->dev, "vcc");
if (!IS_ERR(st->reg)) {
Expand Down

0 comments on commit cb7974b

Please sign in to comment.