Commit 8c7e8627 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

staging:iio:ad799x: Remove internal reference support

None of the devices supported by this driver have an internal voltage reference,
so remove support for it from the driver.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 226f4ab6
...@@ -87,7 +87,6 @@ struct ad799x_state; ...@@ -87,7 +87,6 @@ struct ad799x_state;
* struct ad799x_chip_info - chip specifc information * struct ad799x_chip_info - chip specifc information
* @channel: channel specification * @channel: channel specification
* @num_channels: number of channels * @num_channels: number of channels
* @int_vref_mv: the internal reference voltage
* @monitor_mode: whether the chip supports monitor interrupts * @monitor_mode: whether the chip supports monitor interrupts
* @default_config: device default configuration * @default_config: device default configuration
* @event_attrs: pointer to the monitor event attribute group * @event_attrs: pointer to the monitor event attribute group
...@@ -96,7 +95,6 @@ struct ad799x_state; ...@@ -96,7 +95,6 @@ struct ad799x_state;
struct ad799x_chip_info { struct ad799x_chip_info {
struct iio_chan_spec channel[9]; struct iio_chan_spec channel[9];
int num_channels; int num_channels;
u16 int_vref_mv;
u16 default_config; u16 default_config;
const struct iio_info *info; const struct iio_info *info;
}; };
......
...@@ -498,7 +498,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -498,7 +498,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[4] = IIO_CHAN_SOFT_TIMESTAMP(4), [4] = IIO_CHAN_SOFT_TIMESTAMP(4),
}, },
.num_channels = 5, .num_channels = 5,
.int_vref_mv = 4096,
.info = &ad7991_info, .info = &ad7991_info,
}, },
[ad7995] = { [ad7995] = {
...@@ -538,7 +537,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -538,7 +537,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[4] = IIO_CHAN_SOFT_TIMESTAMP(4), [4] = IIO_CHAN_SOFT_TIMESTAMP(4),
}, },
.num_channels = 5, .num_channels = 5,
.int_vref_mv = 1024,
.info = &ad7991_info, .info = &ad7991_info,
}, },
[ad7999] = { [ad7999] = {
...@@ -578,7 +576,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -578,7 +576,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[4] = IIO_CHAN_SOFT_TIMESTAMP(4), [4] = IIO_CHAN_SOFT_TIMESTAMP(4),
}, },
.num_channels = 5, .num_channels = 5,
.int_vref_mv = 1024,
.info = &ad7991_info, .info = &ad7991_info,
}, },
[ad7992] = { [ad7992] = {
...@@ -604,7 +601,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -604,7 +601,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[2] = IIO_CHAN_SOFT_TIMESTAMP(2), [2] = IIO_CHAN_SOFT_TIMESTAMP(2),
}, },
.num_channels = 3, .num_channels = 3,
.int_vref_mv = 4096,
.default_config = AD7998_ALERT_EN, .default_config = AD7998_ALERT_EN,
.info = &ad7992_info, .info = &ad7992_info,
}, },
...@@ -649,7 +645,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -649,7 +645,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[4] = IIO_CHAN_SOFT_TIMESTAMP(4), [4] = IIO_CHAN_SOFT_TIMESTAMP(4),
}, },
.num_channels = 5, .num_channels = 5,
.int_vref_mv = 1024,
.default_config = AD7998_ALERT_EN, .default_config = AD7998_ALERT_EN,
.info = &ad7993_4_7_8_info, .info = &ad7993_4_7_8_info,
}, },
...@@ -694,7 +689,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -694,7 +689,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[4] = IIO_CHAN_SOFT_TIMESTAMP(4), [4] = IIO_CHAN_SOFT_TIMESTAMP(4),
}, },
.num_channels = 5, .num_channels = 5,
.int_vref_mv = 4096,
.default_config = AD7998_ALERT_EN, .default_config = AD7998_ALERT_EN,
.info = &ad7993_4_7_8_info, .info = &ad7993_4_7_8_info,
}, },
...@@ -771,7 +765,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -771,7 +765,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[8] = IIO_CHAN_SOFT_TIMESTAMP(8), [8] = IIO_CHAN_SOFT_TIMESTAMP(8),
}, },
.num_channels = 9, .num_channels = 9,
.int_vref_mv = 1024,
.default_config = AD7998_ALERT_EN, .default_config = AD7998_ALERT_EN,
.info = &ad7993_4_7_8_info, .info = &ad7993_4_7_8_info,
}, },
...@@ -848,7 +841,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -848,7 +841,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[8] = IIO_CHAN_SOFT_TIMESTAMP(8), [8] = IIO_CHAN_SOFT_TIMESTAMP(8),
}, },
.num_channels = 9, .num_channels = 9,
.int_vref_mv = 4096,
.default_config = AD7998_ALERT_EN, .default_config = AD7998_ALERT_EN,
.info = &ad7993_4_7_8_info, .info = &ad7993_4_7_8_info,
}, },
...@@ -875,10 +867,10 @@ static int ad799x_probe(struct i2c_client *client, ...@@ -875,10 +867,10 @@ static int ad799x_probe(struct i2c_client *client,
/* TODO: Add pdata options for filtering and bit delay */ /* TODO: Add pdata options for filtering and bit delay */
if (pdata) if (!pdata)
st->int_vref_mv = pdata->vref_mv; return -EINVAL;
else
st->int_vref_mv = st->chip_info->int_vref_mv; st->int_vref_mv = pdata->vref_mv;
st->reg = regulator_get(&client->dev, "vcc"); st->reg = regulator_get(&client->dev, "vcc");
if (!IS_ERR(st->reg)) { if (!IS_ERR(st->reg)) {
......
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