From b5beb827b7a138e496e66020c69e3fae670d96e2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 3 Oct 2014 10:06:55 -0700 Subject: [PATCH] 3.16-stable patches added patches: asoc-davinci-mcasp-correct-rx-format-unit-configuration.patch iio-accel-bma180-fix-indio_dev-trig-assignment.patch iio-adc-ad_sigma_delta-fix-indio_dev-trig-assignment.patch iio-adc-at91-don-t-use-the-last-converted-data-register.patch iio-adc-xilinx-xadc-assign-auxiliary-channels-address-correctly.patch iio-gyro-itg3200-fix-indio_dev-trig-assignment.patch iio-hid_sensor_hub-fix-indio_dev-trig-assignment.patch iio-inkern-fix-overwritten-eprobe_defer-in-of_iio_channel_get_by_name.patch iio-inv_mpu6050-fix-indio_dev-trig-assignment.patch iio-magnetometer-bugfix-magnetometers-gain-values.patch iio-meter-ade7758-fix-indio_dev-trig-assignment.patch iio-st_sensors-fix-indio_dev-trig-assignment.patch iio-trigger-modify-return-value-for-iio_trigger_get.patch smb3-fix-oops-when-creating-symlinks-on-smb3.patch --- ...correct-rx-format-unit-configuration.patch | 49 +++++++++ ...bma180-fix-indio_dev-trig-assignment.patch | 33 ++++++ ..._delta-fix-indio_dev-trig-assignment.patch | 34 ++++++ ...use-the-last-converted-data-register.patch | 86 +++++++++++++++ ...auxiliary-channels-address-correctly.patch | 32 ++++++ ...tg3200-fix-indio_dev-trig-assignment.patch | 33 ++++++ ...or_hub-fix-indio_dev-trig-assignment.patch | 34 ++++++ ..._defer-in-of_iio_channel_get_by_name.patch | 34 ++++++ ...pu6050-fix-indio_dev-trig-assignment.patch | 33 ++++++ ...ter-bugfix-magnetometers-gain-values.patch | 102 ++++++++++++++++++ ...de7758-fix-indio_dev-trig-assignment.patch | 34 ++++++ ...ensors-fix-indio_dev-trig-assignment.patch | 33 ++++++ ...ify-return-value-for-iio_trigger_get.patch | 38 +++++++ queue-3.16/series | 14 +++ ...-oops-when-creating-symlinks-on-smb3.patch | 38 +++++++ 15 files changed, 627 insertions(+) create mode 100644 queue-3.16/asoc-davinci-mcasp-correct-rx-format-unit-configuration.patch create mode 100644 queue-3.16/iio-accel-bma180-fix-indio_dev-trig-assignment.patch create mode 100644 queue-3.16/iio-adc-ad_sigma_delta-fix-indio_dev-trig-assignment.patch create mode 100644 queue-3.16/iio-adc-at91-don-t-use-the-last-converted-data-register.patch create mode 100644 queue-3.16/iio-adc-xilinx-xadc-assign-auxiliary-channels-address-correctly.patch create mode 100644 queue-3.16/iio-gyro-itg3200-fix-indio_dev-trig-assignment.patch create mode 100644 queue-3.16/iio-hid_sensor_hub-fix-indio_dev-trig-assignment.patch create mode 100644 queue-3.16/iio-inkern-fix-overwritten-eprobe_defer-in-of_iio_channel_get_by_name.patch create mode 100644 queue-3.16/iio-inv_mpu6050-fix-indio_dev-trig-assignment.patch create mode 100644 queue-3.16/iio-magnetometer-bugfix-magnetometers-gain-values.patch create mode 100644 queue-3.16/iio-meter-ade7758-fix-indio_dev-trig-assignment.patch create mode 100644 queue-3.16/iio-st_sensors-fix-indio_dev-trig-assignment.patch create mode 100644 queue-3.16/iio-trigger-modify-return-value-for-iio_trigger_get.patch create mode 100644 queue-3.16/smb3-fix-oops-when-creating-symlinks-on-smb3.patch diff --git a/queue-3.16/asoc-davinci-mcasp-correct-rx-format-unit-configuration.patch b/queue-3.16/asoc-davinci-mcasp-correct-rx-format-unit-configuration.patch new file mode 100644 index 00000000000..a56b3895eb3 --- /dev/null +++ b/queue-3.16/asoc-davinci-mcasp-correct-rx-format-unit-configuration.patch @@ -0,0 +1,49 @@ +From fe0a29e163a5d045c73faab682a8dac71c2f8012 Mon Sep 17 00:00:00 2001 +From: Peter Ujfalusi +Date: Thu, 4 Sep 2014 10:52:53 +0300 +Subject: ASoC: davinci-mcasp: Correct rx format unit configuration + +From: Peter Ujfalusi + +commit fe0a29e163a5d045c73faab682a8dac71c2f8012 upstream. + +In case of capture we should not use rotation. The reverse and mask is +enough to get the data align correctly from the bus to MCU: +Format data from bus after reverse (XRBUF) +S16_LE: |LSB|MSB|xxx|xxx| |xxx|xxx|MSB|LSB| +S24_3LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB| +S24_LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB| +S32_LE: |LSB|DAT|DAT|MSB| |MSB|DAT|DAT|LSB| + +With this patch all supported formats will work for playback and capture. + +Reported-by: Jyri Sarha (broken S24_3LE capture) +Signed-off-by: Peter Ujfalusi +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/davinci/davinci-mcasp.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +--- a/sound/soc/davinci/davinci-mcasp.c ++++ b/sound/soc/davinci/davinci-mcasp.c +@@ -455,8 +455,17 @@ static int davinci_config_channel_size(s + { + u32 fmt; + u32 tx_rotate = (word_length / 4) & 0x7; +- u32 rx_rotate = (32 - word_length) / 4; + u32 mask = (1ULL << word_length) - 1; ++ /* ++ * For captured data we should not rotate, inversion and masking is ++ * enoguh to get the data to the right position: ++ * Format data from bus after reverse (XRBUF) ++ * S16_LE: |LSB|MSB|xxx|xxx| |xxx|xxx|MSB|LSB| ++ * S24_3LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB| ++ * S24_LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB| ++ * S32_LE: |LSB|DAT|DAT|MSB| |MSB|DAT|DAT|LSB| ++ */ ++ u32 rx_rotate = 0; + + /* + * if s BCLK-to-LRCLK ratio has been configured via the set_clkdiv() diff --git a/queue-3.16/iio-accel-bma180-fix-indio_dev-trig-assignment.patch b/queue-3.16/iio-accel-bma180-fix-indio_dev-trig-assignment.patch new file mode 100644 index 00000000000..6faf9912b80 --- /dev/null +++ b/queue-3.16/iio-accel-bma180-fix-indio_dev-trig-assignment.patch @@ -0,0 +1,33 @@ +From 0668a4e4d297328ce08b44d91d160537596115e2 Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada +Date: Fri, 22 Aug 2014 21:48:00 +0100 +Subject: iio: accel: bma180: Fix indio_dev->trig assignment + +From: Srinivas Pandruvada + +commit 0668a4e4d297328ce08b44d91d160537596115e2 upstream. + +This can result in wrong reference count for trigger device, call +iio_trigger_get to increment reference. +Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion +with Jonathan. + +Signed-off-by: Srinivas Pandruvada +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/accel/bma180.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/accel/bma180.c ++++ b/drivers/iio/accel/bma180.c +@@ -571,7 +571,7 @@ static int bma180_probe(struct i2c_clien + trig->ops = &bma180_trigger_ops; + iio_trigger_set_drvdata(trig, indio_dev); + data->trig = trig; +- indio_dev->trig = trig; ++ indio_dev->trig = iio_trigger_get(trig); + + ret = iio_trigger_register(trig); + if (ret) diff --git a/queue-3.16/iio-adc-ad_sigma_delta-fix-indio_dev-trig-assignment.patch b/queue-3.16/iio-adc-ad_sigma_delta-fix-indio_dev-trig-assignment.patch new file mode 100644 index 00000000000..1b847d2b776 --- /dev/null +++ b/queue-3.16/iio-adc-ad_sigma_delta-fix-indio_dev-trig-assignment.patch @@ -0,0 +1,34 @@ +From 9e5846be33277802c0c76e5c12825d0e4d27f639 Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada +Date: Fri, 22 Aug 2014 21:48:00 +0100 +Subject: iio: adc: ad_sigma_delta: Fix indio_dev->trig assignment + +From: Srinivas Pandruvada + +commit 9e5846be33277802c0c76e5c12825d0e4d27f639 upstream. + +This can result in wrong reference count for trigger device, call +iio_trigger_get to increment reference. +Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion +with Jonathan. + +Signed-off-by: Srinivas Pandruvada +Acked-by: Lars-Peter Clausen +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/adc/ad_sigma_delta.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/adc/ad_sigma_delta.c ++++ b/drivers/iio/adc/ad_sigma_delta.c +@@ -472,7 +472,7 @@ static int ad_sd_probe_trigger(struct ii + goto error_free_irq; + + /* select default trigger */ +- indio_dev->trig = sigma_delta->trig; ++ indio_dev->trig = iio_trigger_get(sigma_delta->trig); + + return 0; + diff --git a/queue-3.16/iio-adc-at91-don-t-use-the-last-converted-data-register.patch b/queue-3.16/iio-adc-at91-don-t-use-the-last-converted-data-register.patch new file mode 100644 index 00000000000..9be40975240 --- /dev/null +++ b/queue-3.16/iio-adc-at91-don-t-use-the-last-converted-data-register.patch @@ -0,0 +1,86 @@ +From d4f51956ac8ad302db9b0c4e4232775b1baa7b44 Mon Sep 17 00:00:00 2001 +From: Ludovic Desroches +Date: Thu, 9 Oct 2014 15:02:00 +0100 +Subject: iio: adc: at91: don't use the last converted data register + +From: Ludovic Desroches + +commit d4f51956ac8ad302db9b0c4e4232775b1baa7b44 upstream. + +If touchscreen mode is enabled and a conversion is requested on another +channel, the result in the last converted data register can be a +touchscreen relative value. Starting a conversion involves to do a +conversion for all active channel. It starts with ADC channels and ends +with touchscreen channels. Then if ADC_LCD register is not read quickly, +its content may be a touchscreen conversion. +To remove this temporal constraint, the conversion value is taken from +the channel data register. + +Signed-off-by: Ludovic Desroches +Acked-by: Alexandre Belloni +Acked-by: Nicolas Ferre +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/adc/at91_adc.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +--- a/drivers/iio/adc/at91_adc.c ++++ b/drivers/iio/adc/at91_adc.c +@@ -196,6 +196,7 @@ struct at91_adc_state { + bool done; + int irq; + u16 last_value; ++ int chnb; + struct mutex lock; + u8 num_channels; + void __iomem *reg_base; +@@ -274,7 +275,7 @@ void handle_adc_eoc_trigger(int irq, str + disable_irq_nosync(irq); + iio_trigger_poll(idev->trig, iio_get_time_ns()); + } else { +- st->last_value = at91_adc_readl(st, AT91_ADC_LCDR); ++ st->last_value = at91_adc_readl(st, AT91_ADC_CHAN(st, st->chnb)); + st->done = true; + wake_up_interruptible(&st->wq_data_avail); + } +@@ -351,7 +352,7 @@ static irqreturn_t at91_adc_rl_interrupt + unsigned int reg; + + status &= at91_adc_readl(st, AT91_ADC_IMR); +- if (status & st->registers->drdy_mask) ++ if (status & GENMASK(st->num_channels - 1, 0)) + handle_adc_eoc_trigger(irq, idev); + + if (status & AT91RL_ADC_IER_PEN) { +@@ -418,7 +419,7 @@ static irqreturn_t at91_adc_9x5_interrup + AT91_ADC_IER_YRDY | + AT91_ADC_IER_PRDY; + +- if (status & st->registers->drdy_mask) ++ if (status & GENMASK(st->num_channels - 1, 0)) + handle_adc_eoc_trigger(irq, idev); + + if (status & AT91_ADC_IER_PEN) { +@@ -689,9 +690,10 @@ static int at91_adc_read_raw(struct iio_ + case IIO_CHAN_INFO_RAW: + mutex_lock(&st->lock); + ++ st->chnb = chan->channel; + at91_adc_writel(st, AT91_ADC_CHER, + AT91_ADC_CH(chan->channel)); +- at91_adc_writel(st, AT91_ADC_IER, st->registers->drdy_mask); ++ at91_adc_writel(st, AT91_ADC_IER, BIT(chan->channel)); + at91_adc_writel(st, AT91_ADC_CR, AT91_ADC_START); + + ret = wait_event_interruptible_timeout(st->wq_data_avail, +@@ -708,7 +710,7 @@ static int at91_adc_read_raw(struct iio_ + + at91_adc_writel(st, AT91_ADC_CHDR, + AT91_ADC_CH(chan->channel)); +- at91_adc_writel(st, AT91_ADC_IDR, st->registers->drdy_mask); ++ at91_adc_writel(st, AT91_ADC_IDR, BIT(chan->channel)); + + st->last_value = 0; + st->done = false; diff --git a/queue-3.16/iio-adc-xilinx-xadc-assign-auxiliary-channels-address-correctly.patch b/queue-3.16/iio-adc-xilinx-xadc-assign-auxiliary-channels-address-correctly.patch new file mode 100644 index 00000000000..b4161bf1b74 --- /dev/null +++ b/queue-3.16/iio-adc-xilinx-xadc-assign-auxiliary-channels-address-correctly.patch @@ -0,0 +1,32 @@ +From 1887e724e2b6df06847522fe9dc2ab53639516cc Mon Sep 17 00:00:00 2001 +From: Subbaraya Sundeep Bhatta +Date: Sun, 9 Nov 2014 09:55:00 +0000 +Subject: iio: adc: xilinx-xadc: assign auxiliary channels address correctly + +From: Subbaraya Sundeep Bhatta + +commit 1887e724e2b6df06847522fe9dc2ab53639516cc upstream. + +This patch fixes incorrect logic for assigning address +to auxiliary channels of xilinx xadc. + +Signed-off-by: Subbaraya Sundeep Bhatta +Acked-by: Lars-Peter Clausen +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/adc/xilinx-xadc-core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/adc/xilinx-xadc-core.c ++++ b/drivers/iio/adc/xilinx-xadc-core.c +@@ -1126,7 +1126,7 @@ static int xadc_parse_dt(struct iio_dev + chan->address = XADC_REG_VPVN; + } else { + chan->scan_index = 15 + reg; +- chan->scan_index = XADC_REG_VAUX(reg - 1); ++ chan->address = XADC_REG_VAUX(reg - 1); + } + num_channels++; + chan++; diff --git a/queue-3.16/iio-gyro-itg3200-fix-indio_dev-trig-assignment.patch b/queue-3.16/iio-gyro-itg3200-fix-indio_dev-trig-assignment.patch new file mode 100644 index 00000000000..d0549ff5568 --- /dev/null +++ b/queue-3.16/iio-gyro-itg3200-fix-indio_dev-trig-assignment.patch @@ -0,0 +1,33 @@ +From 0b4dce2ee694a991ef38203ec5ff91a738518cb3 Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada +Date: Fri, 22 Aug 2014 21:48:00 +0100 +Subject: iio: gyro: itg3200: Fix indio_dev->trig assignment + +From: Srinivas Pandruvada + +commit 0b4dce2ee694a991ef38203ec5ff91a738518cb3 upstream. + +This can result in wrong reference count for trigger device, call +iio_trigger_get to increment reference. +Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion +with Jonathan. + +Signed-off-by: Srinivas Pandruvada +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/gyro/itg3200_buffer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/gyro/itg3200_buffer.c ++++ b/drivers/iio/gyro/itg3200_buffer.c +@@ -132,7 +132,7 @@ int itg3200_probe_trigger(struct iio_dev + goto error_free_irq; + + /* select default trigger */ +- indio_dev->trig = st->trig; ++ indio_dev->trig = iio_trigger_get(st->trig); + + return 0; + diff --git a/queue-3.16/iio-hid_sensor_hub-fix-indio_dev-trig-assignment.patch b/queue-3.16/iio-hid_sensor_hub-fix-indio_dev-trig-assignment.patch new file mode 100644 index 00000000000..1f0db5e00d8 --- /dev/null +++ b/queue-3.16/iio-hid_sensor_hub-fix-indio_dev-trig-assignment.patch @@ -0,0 +1,34 @@ +From 55a6f9ddfdea0d2d343cd1b39baf8aa752664b6e Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada +Date: Fri, 22 Aug 2014 21:48:00 +0100 +Subject: iio: hid_sensor_hub: Fix indio_dev->trig assignment + +From: Srinivas Pandruvada + +commit 55a6f9ddfdea0d2d343cd1b39baf8aa752664b6e upstream. + +This can result in wrong reference count for trigger device, call +iio_trigger_get to increment reference. +Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion +with Jonathan. + +Signed-off-by: Srinivas Pandruvada +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c ++++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c +@@ -122,7 +122,8 @@ int hid_sensor_setup_trigger(struct iio_ + dev_err(&indio_dev->dev, "Trigger Register Failed\n"); + goto error_free_trig; + } +- indio_dev->trig = attrb->trigger = trig; ++ attrb->trigger = trig; ++ indio_dev->trig = iio_trigger_get(trig); + + return ret; + diff --git a/queue-3.16/iio-inkern-fix-overwritten-eprobe_defer-in-of_iio_channel_get_by_name.patch b/queue-3.16/iio-inkern-fix-overwritten-eprobe_defer-in-of_iio_channel_get_by_name.patch new file mode 100644 index 00000000000..12f5efb0495 --- /dev/null +++ b/queue-3.16/iio-inkern-fix-overwritten-eprobe_defer-in-of_iio_channel_get_by_name.patch @@ -0,0 +1,34 @@ +From 872687f626e033b4ddfaec1e410057cfc6636d77 Mon Sep 17 00:00:00 2001 +From: Johannes Pointner +Date: Mon, 25 Aug 2014 09:04:00 +0100 +Subject: iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name + +From: Johannes Pointner + +commit 872687f626e033b4ddfaec1e410057cfc6636d77 upstream. + +Fixes: a2c12493ed7e ('iio: of_iio_channel_get_by_name() returns non-null pointers for error legs') + +which improperly assumes that of_iio_channel_get_by_name must always +return NULL and thus now hides -EPROBE_DEFER. + +Signed-off-by: Johannes Pointner +Reviewed-by: Guenter Roeck +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/inkern.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/inkern.c ++++ b/drivers/iio/inkern.c +@@ -178,7 +178,7 @@ static struct iio_channel *of_iio_channe + index = of_property_match_string(np, "io-channel-names", + name); + chan = of_iio_channel_get(np, index); +- if (!IS_ERR(chan)) ++ if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER) + break; + else if (name && index >= 0) { + pr_err("ERROR: could not get IIO channel %s:%s(%i)\n", diff --git a/queue-3.16/iio-inv_mpu6050-fix-indio_dev-trig-assignment.patch b/queue-3.16/iio-inv_mpu6050-fix-indio_dev-trig-assignment.patch new file mode 100644 index 00000000000..62dd9990a0f --- /dev/null +++ b/queue-3.16/iio-inv_mpu6050-fix-indio_dev-trig-assignment.patch @@ -0,0 +1,33 @@ +From b07e3b3850b2e1f09c19f54d3ed7210d9f529e2c Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada +Date: Fri, 22 Aug 2014 21:48:00 +0100 +Subject: iio: inv_mpu6050: Fix indio_dev->trig assignment + +From: Srinivas Pandruvada + +commit b07e3b3850b2e1f09c19f54d3ed7210d9f529e2c upstream. + +This can result in wrong reference count for trigger device, call +iio_trigger_get to increment reference. +Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion +with Jonathan. + +Signed-off-by: Srinivas Pandruvada +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c ++++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c +@@ -135,7 +135,7 @@ int inv_mpu6050_probe_trigger(struct iio + ret = iio_trigger_register(st->trig); + if (ret) + goto error_free_irq; +- indio_dev->trig = st->trig; ++ indio_dev->trig = iio_trigger_get(st->trig); + + return 0; + diff --git a/queue-3.16/iio-magnetometer-bugfix-magnetometers-gain-values.patch b/queue-3.16/iio-magnetometer-bugfix-magnetometers-gain-values.patch new file mode 100644 index 00000000000..cd5ca750a04 --- /dev/null +++ b/queue-3.16/iio-magnetometer-bugfix-magnetometers-gain-values.patch @@ -0,0 +1,102 @@ +From a31d0928999fbf33b3a6042e8bcb7b7f7e07d094 Mon Sep 17 00:00:00 2001 +From: Denis CIOCCA +Date: Thu, 9 Oct 2014 13:55:00 +0100 +Subject: iio:magnetometer: bugfix magnetometers gain values + +From: Denis CIOCCA + +commit a31d0928999fbf33b3a6042e8bcb7b7f7e07d094 upstream. + +This patch fix gains values. The first driver was designed using +engineering samples, in mass production the values are changed. + +Signed-off-by: Denis Ciocca +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/magnetometer/st_magn_core.c | 52 ++++++++++++++++++-------------- + 1 file changed, 30 insertions(+), 22 deletions(-) + +--- a/drivers/iio/magnetometer/st_magn_core.c ++++ b/drivers/iio/magnetometer/st_magn_core.c +@@ -42,7 +42,8 @@ + #define ST_MAGN_FS_AVL_5600MG 5600 + #define ST_MAGN_FS_AVL_8000MG 8000 + #define ST_MAGN_FS_AVL_8100MG 8100 +-#define ST_MAGN_FS_AVL_10000MG 10000 ++#define ST_MAGN_FS_AVL_12000MG 12000 ++#define ST_MAGN_FS_AVL_16000MG 16000 + + /* CUSTOM VALUES FOR SENSOR 1 */ + #define ST_MAGN_1_WAI_EXP 0x3c +@@ -69,20 +70,20 @@ + #define ST_MAGN_1_FS_AVL_4700_VAL 0x05 + #define ST_MAGN_1_FS_AVL_5600_VAL 0x06 + #define ST_MAGN_1_FS_AVL_8100_VAL 0x07 +-#define ST_MAGN_1_FS_AVL_1300_GAIN_XY 1100 +-#define ST_MAGN_1_FS_AVL_1900_GAIN_XY 855 +-#define ST_MAGN_1_FS_AVL_2500_GAIN_XY 670 +-#define ST_MAGN_1_FS_AVL_4000_GAIN_XY 450 +-#define ST_MAGN_1_FS_AVL_4700_GAIN_XY 400 +-#define ST_MAGN_1_FS_AVL_5600_GAIN_XY 330 +-#define ST_MAGN_1_FS_AVL_8100_GAIN_XY 230 +-#define ST_MAGN_1_FS_AVL_1300_GAIN_Z 980 +-#define ST_MAGN_1_FS_AVL_1900_GAIN_Z 760 +-#define ST_MAGN_1_FS_AVL_2500_GAIN_Z 600 +-#define ST_MAGN_1_FS_AVL_4000_GAIN_Z 400 +-#define ST_MAGN_1_FS_AVL_4700_GAIN_Z 355 +-#define ST_MAGN_1_FS_AVL_5600_GAIN_Z 295 +-#define ST_MAGN_1_FS_AVL_8100_GAIN_Z 205 ++#define ST_MAGN_1_FS_AVL_1300_GAIN_XY 909 ++#define ST_MAGN_1_FS_AVL_1900_GAIN_XY 1169 ++#define ST_MAGN_1_FS_AVL_2500_GAIN_XY 1492 ++#define ST_MAGN_1_FS_AVL_4000_GAIN_XY 2222 ++#define ST_MAGN_1_FS_AVL_4700_GAIN_XY 2500 ++#define ST_MAGN_1_FS_AVL_5600_GAIN_XY 3030 ++#define ST_MAGN_1_FS_AVL_8100_GAIN_XY 4347 ++#define ST_MAGN_1_FS_AVL_1300_GAIN_Z 1020 ++#define ST_MAGN_1_FS_AVL_1900_GAIN_Z 1315 ++#define ST_MAGN_1_FS_AVL_2500_GAIN_Z 1666 ++#define ST_MAGN_1_FS_AVL_4000_GAIN_Z 2500 ++#define ST_MAGN_1_FS_AVL_4700_GAIN_Z 2816 ++#define ST_MAGN_1_FS_AVL_5600_GAIN_Z 3389 ++#define ST_MAGN_1_FS_AVL_8100_GAIN_Z 4878 + #define ST_MAGN_1_MULTIREAD_BIT false + + /* CUSTOM VALUES FOR SENSOR 2 */ +@@ -105,10 +106,12 @@ + #define ST_MAGN_2_FS_MASK 0x60 + #define ST_MAGN_2_FS_AVL_4000_VAL 0x00 + #define ST_MAGN_2_FS_AVL_8000_VAL 0x01 +-#define ST_MAGN_2_FS_AVL_10000_VAL 0x02 +-#define ST_MAGN_2_FS_AVL_4000_GAIN 430 +-#define ST_MAGN_2_FS_AVL_8000_GAIN 230 +-#define ST_MAGN_2_FS_AVL_10000_GAIN 230 ++#define ST_MAGN_2_FS_AVL_12000_VAL 0x02 ++#define ST_MAGN_2_FS_AVL_16000_VAL 0x03 ++#define ST_MAGN_2_FS_AVL_4000_GAIN 146 ++#define ST_MAGN_2_FS_AVL_8000_GAIN 292 ++#define ST_MAGN_2_FS_AVL_12000_GAIN 438 ++#define ST_MAGN_2_FS_AVL_16000_GAIN 584 + #define ST_MAGN_2_MULTIREAD_BIT false + #define ST_MAGN_2_OUT_X_L_ADDR 0x28 + #define ST_MAGN_2_OUT_Y_L_ADDR 0x2a +@@ -266,9 +269,14 @@ static const struct st_sensors st_magn_s + .gain = ST_MAGN_2_FS_AVL_8000_GAIN, + }, + [2] = { +- .num = ST_MAGN_FS_AVL_10000MG, +- .value = ST_MAGN_2_FS_AVL_10000_VAL, +- .gain = ST_MAGN_2_FS_AVL_10000_GAIN, ++ .num = ST_MAGN_FS_AVL_12000MG, ++ .value = ST_MAGN_2_FS_AVL_12000_VAL, ++ .gain = ST_MAGN_2_FS_AVL_12000_GAIN, ++ }, ++ [3] = { ++ .num = ST_MAGN_FS_AVL_16000MG, ++ .value = ST_MAGN_2_FS_AVL_16000_VAL, ++ .gain = ST_MAGN_2_FS_AVL_16000_GAIN, + }, + }, + }, diff --git a/queue-3.16/iio-meter-ade7758-fix-indio_dev-trig-assignment.patch b/queue-3.16/iio-meter-ade7758-fix-indio_dev-trig-assignment.patch new file mode 100644 index 00000000000..65d1a7730e9 --- /dev/null +++ b/queue-3.16/iio-meter-ade7758-fix-indio_dev-trig-assignment.patch @@ -0,0 +1,34 @@ +From 0495081179212b758775df752e657ea71dcae020 Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada +Date: Fri, 22 Aug 2014 21:48:00 +0100 +Subject: iio: meter: ade7758: Fix indio_dev->trig assignment + +From: Srinivas Pandruvada + +commit 0495081179212b758775df752e657ea71dcae020 upstream. + +This can result in wrong reference count for trigger device, call +iio_trigger_get to increment reference. +Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion +with Jonathan. + +Signed-off-by: Srinivas Pandruvada +Acked-by: Lars-Peter Clausen +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/iio/meter/ade7758_trigger.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/staging/iio/meter/ade7758_trigger.c ++++ b/drivers/staging/iio/meter/ade7758_trigger.c +@@ -85,7 +85,7 @@ int ade7758_probe_trigger(struct iio_dev + ret = iio_trigger_register(st->trig); + + /* select default trigger */ +- indio_dev->trig = st->trig; ++ indio_dev->trig = iio_trigger_get(st->trig); + if (ret) + goto error_free_irq; + diff --git a/queue-3.16/iio-st_sensors-fix-indio_dev-trig-assignment.patch b/queue-3.16/iio-st_sensors-fix-indio_dev-trig-assignment.patch new file mode 100644 index 00000000000..4429a4863f4 --- /dev/null +++ b/queue-3.16/iio-st_sensors-fix-indio_dev-trig-assignment.patch @@ -0,0 +1,33 @@ +From f0e84acd7056e6d7ade551c6439531606ae30a46 Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada +Date: Fri, 22 Aug 2014 21:48:00 +0100 +Subject: iio: st_sensors: Fix indio_dev->trig assignment + +From: Srinivas Pandruvada + +commit f0e84acd7056e6d7ade551c6439531606ae30a46 upstream. + +This can result in wrong reference count for trigger device, call +iio_trigger_get to increment reference. +Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion +with Jonathan. + +Signed-off-by: Srinivas Pandruvada +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/common/st_sensors/st_sensors_trigger.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/common/st_sensors/st_sensors_trigger.c ++++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c +@@ -49,7 +49,7 @@ int st_sensors_allocate_trigger(struct i + dev_err(&indio_dev->dev, "failed to register iio trigger.\n"); + goto iio_trigger_register_error; + } +- indio_dev->trig = sdata->trig; ++ indio_dev->trig = iio_trigger_get(sdata->trig); + + return 0; + diff --git a/queue-3.16/iio-trigger-modify-return-value-for-iio_trigger_get.patch b/queue-3.16/iio-trigger-modify-return-value-for-iio_trigger_get.patch new file mode 100644 index 00000000000..7b1bb38b8fc --- /dev/null +++ b/queue-3.16/iio-trigger-modify-return-value-for-iio_trigger_get.patch @@ -0,0 +1,38 @@ +From f153566570fb9e32c2f59182883f4f66048788fb Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada +Date: Fri, 22 Aug 2014 21:48:00 +0100 +Subject: iio:trigger: modify return value for iio_trigger_get + +From: Srinivas Pandruvada + +commit f153566570fb9e32c2f59182883f4f66048788fb upstream. + +Instead of a void function, return the trigger pointer. + +Whilst not in of itself a fix, this makes the following set of +7 fixes cleaner than they would otherwise be. + +Signed-off-by: Srinivas Pandruvada +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/iio/trigger.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/include/linux/iio/trigger.h ++++ b/include/linux/iio/trigger.h +@@ -84,10 +84,12 @@ static inline void iio_trigger_put(struc + put_device(&trig->dev); + } + +-static inline void iio_trigger_get(struct iio_trigger *trig) ++static inline struct iio_trigger *iio_trigger_get(struct iio_trigger *trig) + { + get_device(&trig->dev); + __module_get(trig->ops->owner); ++ ++ return trig; + } + + /** diff --git a/queue-3.16/series b/queue-3.16/series index d5c7aab81c1..e2ec0f385a1 100644 --- a/queue-3.16/series +++ b/queue-3.16/series @@ -215,3 +215,17 @@ x86-xen-don-t-copy-bogus-duplicate-entries-into-kernel-page-tables.patch x86-early_ioremap-increase-fix_btmaps_slots-to-8.patch x86-kaslr-avoid-the-setup_data-area-when-picking-location.patch shmem-fix-nlink-for-rename-overwrite-directory.patch +asoc-davinci-mcasp-correct-rx-format-unit-configuration.patch +smb3-fix-oops-when-creating-symlinks-on-smb3.patch +iio-trigger-modify-return-value-for-iio_trigger_get.patch +iio-accel-bma180-fix-indio_dev-trig-assignment.patch +iio-hid_sensor_hub-fix-indio_dev-trig-assignment.patch +iio-gyro-itg3200-fix-indio_dev-trig-assignment.patch +iio-inv_mpu6050-fix-indio_dev-trig-assignment.patch +iio-meter-ade7758-fix-indio_dev-trig-assignment.patch +iio-st_sensors-fix-indio_dev-trig-assignment.patch +iio-adc-ad_sigma_delta-fix-indio_dev-trig-assignment.patch +iio-magnetometer-bugfix-magnetometers-gain-values.patch +iio-inkern-fix-overwritten-eprobe_defer-in-of_iio_channel_get_by_name.patch +iio-adc-xilinx-xadc-assign-auxiliary-channels-address-correctly.patch +iio-adc-at91-don-t-use-the-last-converted-data-register.patch diff --git a/queue-3.16/smb3-fix-oops-when-creating-symlinks-on-smb3.patch b/queue-3.16/smb3-fix-oops-when-creating-symlinks-on-smb3.patch new file mode 100644 index 00000000000..4291bc1fb42 --- /dev/null +++ b/queue-3.16/smb3-fix-oops-when-creating-symlinks-on-smb3.patch @@ -0,0 +1,38 @@ +From da80659d4aa758dc6935b10ec64513f0b67bc969 Mon Sep 17 00:00:00 2001 +From: Steve French +Date: Sun, 14 Sep 2014 23:27:09 -0500 +Subject: SMB3: Fix oops when creating symlinks on smb3 + +From: Steve French + +commit da80659d4aa758dc6935b10ec64513f0b67bc969 upstream. + +We were not checking for symlink support properly for SMB2/SMB3 +mounts so could oops when mounted with mfsymlinks when try +to create symlink when mfsymlinks on smb2/smb3 mounts + +Signed-off-by: Steve French +CC: Sachin Prabhu +Signed-off-by: Greg Kroah-Hartman + +--- + fs/cifs/link.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/fs/cifs/link.c ++++ b/fs/cifs/link.c +@@ -213,8 +213,12 @@ create_mf_symlink(const unsigned int xid + if (rc) + goto out; + +- rc = tcon->ses->server->ops->create_mf_symlink(xid, tcon, cifs_sb, +- fromName, buf, &bytes_written); ++ if (tcon->ses->server->ops->create_mf_symlink) ++ rc = tcon->ses->server->ops->create_mf_symlink(xid, tcon, ++ cifs_sb, fromName, buf, &bytes_written); ++ else ++ rc = -EOPNOTSUPP; ++ + if (rc) + goto out; + -- 2.47.3