Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'staging-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull IIO driver fixes from Greg KH:
"Here are some small IIO driver fixes for 4.11-rc4 that resolve a
number of tiny reported issues. All of these have been in linux-next
for a while with no reported issues"

* tag 'staging-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
iio: imu: st_lsm6dsx: fix FIFO_CTRL2 overwrite during watermark configuration
iio: adc: ti_am335x_adc: fix fifo overrun recovery
iio: sw-device: Fix config group initialization
iio: magnetometer: ak8974: remove incorrect __exit markups
iio: hid-sensor-trigger: Change get poll value function order to avoid sensor properties losing after resume from S3

+20 -9
+12 -1
drivers/iio/adc/ti_am335x_adc.c
··· 169 169 { 170 170 struct iio_dev *indio_dev = private; 171 171 struct tiadc_device *adc_dev = iio_priv(indio_dev); 172 - unsigned int status, config; 172 + unsigned int status, config, adc_fsm; 173 + unsigned short count = 0; 174 + 173 175 status = tiadc_readl(adc_dev, REG_IRQSTATUS); 174 176 175 177 /* ··· 185 183 tiadc_writel(adc_dev, REG_CTRL, config); 186 184 tiadc_writel(adc_dev, REG_IRQSTATUS, IRQENB_FIFO1OVRRUN 187 185 | IRQENB_FIFO1UNDRFLW | IRQENB_FIFO1THRES); 186 + 187 + /* wait for idle state. 188 + * ADC needs to finish the current conversion 189 + * before disabling the module 190 + */ 191 + do { 192 + adc_fsm = tiadc_readl(adc_dev, REG_ADCFSM); 193 + } while (adc_fsm != 0x10 && count++ < 100); 194 + 188 195 tiadc_writel(adc_dev, REG_CTRL, (config | CNTRLREG_TSCSSENB)); 189 196 return IRQ_HANDLED; 190 197 } else if (status & IRQENB_FIFO1THRES) {
+3 -3
drivers/iio/common/hid-sensors/hid-sensor-trigger.c
··· 51 51 st->report_state.report_id, 52 52 st->report_state.index, 53 53 HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM); 54 - 55 - poll_value = hid_sensor_read_poll_value(st); 56 54 } else { 57 55 int val; 58 56 ··· 87 89 sensor_hub_get_feature(st->hsdev, st->power_state.report_id, 88 90 st->power_state.index, 89 91 sizeof(state_val), &state_val); 90 - if (state && poll_value) 92 + if (state) 93 + poll_value = hid_sensor_read_poll_value(st); 94 + if (poll_value > 0) 91 95 msleep_interruptible(poll_value * 2); 92 96 93 97 return 0;
+2 -2
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
··· 193 193 if (err < 0) 194 194 goto out; 195 195 196 - fifo_watermark = ((data & ~ST_LSM6DSX_FIFO_TH_MASK) << 8) | 197 - (fifo_watermark & ST_LSM6DSX_FIFO_TH_MASK); 196 + fifo_watermark = ((data << 8) & ~ST_LSM6DSX_FIFO_TH_MASK) | 197 + (fifo_watermark & ST_LSM6DSX_FIFO_TH_MASK); 198 198 199 199 wdata = cpu_to_le16(fifo_watermark); 200 200 err = hw->tf->write(hw->dev, ST_LSM6DSX_REG_FIFO_THL_ADDR,
+2 -2
drivers/iio/magnetometer/ak8974.c
··· 763 763 return ret; 764 764 } 765 765 766 - static int __exit ak8974_remove(struct i2c_client *i2c) 766 + static int ak8974_remove(struct i2c_client *i2c) 767 767 { 768 768 struct iio_dev *indio_dev = i2c_get_clientdata(i2c); 769 769 struct ak8974 *ak8974 = iio_priv(indio_dev); ··· 845 845 .of_match_table = of_match_ptr(ak8974_of_match), 846 846 }, 847 847 .probe = ak8974_probe, 848 - .remove = __exit_p(ak8974_remove), 848 + .remove = ak8974_remove, 849 849 .id_table = ak8974_id, 850 850 }; 851 851 module_i2c_driver(ak8974_driver);
+1 -1
include/linux/iio/sw_device.h
··· 62 62 const char *name, 63 63 struct config_item_type *type) 64 64 { 65 - #ifdef CONFIG_CONFIGFS_FS 65 + #if IS_ENABLED(CONFIG_CONFIGFS_FS) 66 66 config_group_init_type_name(&d->group, name, type); 67 67 #endif 68 68 }