| .. | .. |
|---|
| 255 | 255 | *val2 = chip->shunt_resistor_uohm; |
|---|
| 256 | 256 | return IIO_VAL_FRACTIONAL; |
|---|
| 257 | 257 | } |
|---|
| 258 | + return -EINVAL; |
|---|
| 258 | 259 | |
|---|
| 259 | 260 | case IIO_CHAN_INFO_HARDWAREGAIN: |
|---|
| 260 | 261 | switch (chan->address) { |
|---|
| .. | .. |
|---|
| 267 | 268 | *val = chip->range_vbus == 32 ? 1 : 2; |
|---|
| 268 | 269 | return IIO_VAL_INT; |
|---|
| 269 | 270 | } |
|---|
| 271 | + return -EINVAL; |
|---|
| 270 | 272 | } |
|---|
| 271 | 273 | |
|---|
| 272 | 274 | return -EINVAL; |
|---|
| .. | .. |
|---|
| 276 | 278 | * Available averaging rates for ina226. The indices correspond with |
|---|
| 277 | 279 | * the bit values expected by the chip (according to the ina226 datasheet, |
|---|
| 278 | 280 | * table 3 AVG bit settings, found at |
|---|
| 279 | | - * http://www.ti.com/lit/ds/symlink/ina226.pdf. |
|---|
| 281 | + * https://www.ti.com/lit/ds/symlink/ina226.pdf. |
|---|
| 280 | 282 | */ |
|---|
| 281 | 283 | static const int ina226_avg_tab[] = { 1, 4, 16, 64, 128, 256, 512, 1024 }; |
|---|
| 282 | 284 | |
|---|
| .. | .. |
|---|
| 1016 | 1018 | } |
|---|
| 1017 | 1019 | |
|---|
| 1018 | 1020 | indio_dev->modes = INDIO_DIRECT_MODE | INDIO_BUFFER_SOFTWARE; |
|---|
| 1019 | | - indio_dev->dev.parent = &client->dev; |
|---|
| 1020 | | - indio_dev->dev.of_node = client->dev.of_node; |
|---|
| 1021 | 1021 | if (id->driver_data == ina226) { |
|---|
| 1022 | 1022 | indio_dev->channels = ina226_channels; |
|---|
| 1023 | 1023 | indio_dev->num_channels = ARRAY_SIZE(ina226_channels); |
|---|