aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/xilinx-xadc-core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-13 14:51:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-13 14:51:14 -0400
commitec94efcdadab69f41d257a1054260f8295ab77ef (patch)
tree6287158245d80fa79b6017787d0bd762bad89c96 /drivers/iio/adc/xilinx-xadc-core.c
parent892c89d5d7ffd1bb794fe54d86c0eef18d215fab (diff)
parentf0828ba96d02d4d4b197c531b34c662ee3c928df (diff)
Merge tag 'iio-fixes-for-4.1a-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes: The usual mixed bag of fixes for IIO in the 4.1 cycle. Second version of this pull request as a small fix to a fix turned up before Greg pulled it for a cc10001 patch near the top of the tree. One core fix * Set updated for a iio kfifo was incorrectly set to false during a failed update, resulting in atttempts to repeat the failed operation appearing to succeed. This time I've decided to list the driver fixes in alphabetical order rather than 'randomly'. * axp288_adc - a recent change added a check for valid info masks when reading channels from consumer drivers. * bmp280 - temperature compensation was failing to read the tfine value, hence causing a temperature of 0 to always be returned and incorrect presure measurements. * cc10001 - Fix channel number mapping when some channels are reserved for remote CPUs. Fix an issue with the use of the power-up/power-down register (basically wrong polarity). Fix an issue due to the missinterpretting the return value from regulator_get_voltage. Add a delay before the start bit as recommended for the hardware to avoid data corruption. * hid pressure - fix channel spec of modfiied, but no modifier (which makes no sense!) * hid proximity - fix channel spec of modified, but no modifier (which makes no sense!). Fix a memory leak in the probe function. * mcp320x - occasional incorrect readings on dma using spi busses due to cacheline corruption. Fixed by forcing ___cacheline_aligned for the buffers. * mma9551 - buffer overrun fix (miss specified maximum length of buffers) * mma9553 - endian fix on status message. Add an enable element for activity channel. Input checking for activity period to avoid rather unpredictable results. * spmi-vadc - fix an overflow in the output value normalization seen on some boards. * st-snesors - oops due to use of a mutex that is not yet initialized during probe. * xilinx adc - Some wrong register addresses, a wrong address for vccaux channel, incorrect scale on VREFP and incorrect sign on VREFN.
Diffstat (limited to 'drivers/iio/adc/xilinx-xadc-core.c')
-rw-r--r--drivers/iio/adc/xilinx-xadc-core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
index a221f7329b79..ce93bd8e3f68 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -856,6 +856,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev,
856 switch (chan->address) { 856 switch (chan->address) {
857 case XADC_REG_VCCINT: 857 case XADC_REG_VCCINT:
858 case XADC_REG_VCCAUX: 858 case XADC_REG_VCCAUX:
859 case XADC_REG_VREFP:
859 case XADC_REG_VCCBRAM: 860 case XADC_REG_VCCBRAM:
860 case XADC_REG_VCCPINT: 861 case XADC_REG_VCCPINT:
861 case XADC_REG_VCCPAUX: 862 case XADC_REG_VCCPAUX:
@@ -996,7 +997,7 @@ static const struct iio_event_spec xadc_voltage_events[] = {
996 .num_event_specs = (_alarm) ? ARRAY_SIZE(xadc_voltage_events) : 0, \ 997 .num_event_specs = (_alarm) ? ARRAY_SIZE(xadc_voltage_events) : 0, \
997 .scan_index = (_scan_index), \ 998 .scan_index = (_scan_index), \
998 .scan_type = { \ 999 .scan_type = { \
999 .sign = 'u', \ 1000 .sign = ((_addr) == XADC_REG_VREFN) ? 's' : 'u', \
1000 .realbits = 12, \ 1001 .realbits = 12, \
1001 .storagebits = 16, \ 1002 .storagebits = 16, \
1002 .shift = 4, \ 1003 .shift = 4, \
@@ -1008,7 +1009,7 @@ static const struct iio_event_spec xadc_voltage_events[] = {
1008static const struct iio_chan_spec xadc_channels[] = { 1009static const struct iio_chan_spec xadc_channels[] = {
1009 XADC_CHAN_TEMP(0, 8, XADC_REG_TEMP), 1010 XADC_CHAN_TEMP(0, 8, XADC_REG_TEMP),
1010 XADC_CHAN_VOLTAGE(0, 9, XADC_REG_VCCINT, "vccint", true), 1011 XADC_CHAN_VOLTAGE(0, 9, XADC_REG_VCCINT, "vccint", true),
1011 XADC_CHAN_VOLTAGE(1, 10, XADC_REG_VCCINT, "vccaux", true), 1012 XADC_CHAN_VOLTAGE(1, 10, XADC_REG_VCCAUX, "vccaux", true),
1012 XADC_CHAN_VOLTAGE(2, 14, XADC_REG_VCCBRAM, "vccbram", true), 1013 XADC_CHAN_VOLTAGE(2, 14, XADC_REG_VCCBRAM, "vccbram", true),
1013 XADC_CHAN_VOLTAGE(3, 5, XADC_REG_VCCPINT, "vccpint", true), 1014 XADC_CHAN_VOLTAGE(3, 5, XADC_REG_VCCPINT, "vccpint", true),
1014 XADC_CHAN_VOLTAGE(4, 6, XADC_REG_VCCPAUX, "vccpaux", true), 1015 XADC_CHAN_VOLTAGE(4, 6, XADC_REG_VCCPAUX, "vccpaux", true),