]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'iio-for-v4.2b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 May 2015 18:45:21 +0000 (11:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 May 2015 18:45:21 +0000 (11:45 -0700)
Jonathan writes:

Second set of new driver, functionality and cleanups for IIO in the 4.2 cycle.

Core functionality
* i and q modifiers from quadrature channels.
* IIO_CHAN_INFO_OVERSAMPLING_RATIO added.
* High pass filter attributes added to mirror the existing low pass filter
  ones.

Core cleanups
* Make IIO tools building more cross compiler friendly.
* Substantial rework of the function __iio_update_buffers to greatly simplify
  a hideously evolved function.

New drivers and support
* ACPI0008 ambient light sensor driver. This one has been around a long time to
  will be good to finally get it into mainline.
* Berlin SOC ADC support.
* BMC150 magnetometer.  The accelerometer in the same package has been supported
  for quite some time, so good to have this half as well.
* m62332 DAC driver
* MEMSIC MMC35420 magnetometer.
* ROHM BH1710 and similar ambient light sensors.
* Sensortek STK3310 light sensor.
* Sensortek STK8312 accelerometer.
* Sensortek STK8BA50 accelerometer.
* ti-adc128s052 gains support form the adc122s021 2 channel ADC.

Driver cleanups and functionality.
* Allow various drivers to compile with !GPIOLIB if COMPILE_TEST enabled.
* bmc150 - decouple trigger from buffer to allow other triggers to be used.
* bmg160 - decouple trigger from buffer to allow other triggers to be used.
  Fix a trivial unused field.
* Constify a load of platform_device_id structures.
* inv_mpu6050 - device tree bindings.
* hid-sensors - fix a memory leak during probe if certain errors occur.
* ltr501 - illuminance channel derived (in an non obvious fashion) from the
  intensity channels.
* ltr501 - fix a boundary check on the proximity threshold.
* mlx90614 - drop a pointless return.
* mma8452 - Debugfs register access and fix a bug that had no effect (by
  coincidence)
* ti_am335x_adc - add device tree bindings for sample-delay, open-delay and
  averaging.  The ideal settings for these tend to be board design specific.

1  2 
drivers/iio/adc/axp288_adc.c
drivers/iio/light/hid-sensor-prox.c
drivers/iio/pressure/hid-sensor-press.c

index 56008a86b78f854229943769307ce2fd2c328201,27197fd1517e5485fc083833311d1d20a856e127..0c904edd6c004c00581ca6651ef65aa0c982e9cc
@@@ -53,42 -53,39 +53,42 @@@ static const struct iio_chan_spec cons
                .channel = 0,
                .address = AXP288_TS_ADC_H,
                .datasheet_name = "TS_PIN",
 +              .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
        }, {
                .indexed = 1,
                .type = IIO_TEMP,
                .channel = 1,
                .address = AXP288_PMIC_ADC_H,
                .datasheet_name = "PMIC_TEMP",
 +              .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
        }, {
                .indexed = 1,
                .type = IIO_TEMP,
                .channel = 2,
                .address = AXP288_GP_ADC_H,
                .datasheet_name = "GPADC",
 +              .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
        }, {
                .indexed = 1,
                .type = IIO_CURRENT,
                .channel = 3,
                .address = AXP20X_BATT_CHRG_I_H,
                .datasheet_name = "BATT_CHG_I",
 -              .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED),
 +              .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
        }, {
                .indexed = 1,
                .type = IIO_CURRENT,
                .channel = 4,
                .address = AXP20X_BATT_DISCHRG_I_H,
                .datasheet_name = "BATT_DISCHRG_I",
 -              .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED),
 +              .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
        }, {
                .indexed = 1,
                .type = IIO_VOLTAGE,
                .channel = 5,
                .address = AXP20X_BATT_V_H,
                .datasheet_name = "BATT_V",
 -              .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED),
 +              .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
        },
  };
  
@@@ -154,6 -151,9 +154,6 @@@ static int axp288_adc_read_raw(struct i
                                                chan->address))
                        dev_err(&indio_dev->dev, "TS pin restore\n");
                break;
 -      case IIO_CHAN_INFO_PROCESSED:
 -              ret = axp288_adc_read_channel(val, chan->address, info->regmap);
 -              break;
        default:
                ret = -EINVAL;
        }
@@@ -238,7 -238,7 +238,7 @@@ static int axp288_adc_remove(struct pla
        return 0;
  }
  
- static struct platform_device_id axp288_adc_id_table[] = {
+ static const struct platform_device_id axp288_adc_id_table[] = {
        { .name = "axp288_adc" },
        {},
  };
index ef60bae738e344c510d529578051f7767eba7916,be9db9d985b25dae5732adf1253db83b3778f5a0..0d248476f4c9b64b7479e4135fbddb95e178bae2
@@@ -43,6 -43,8 +43,6 @@@ struct prox_state 
  static const struct iio_chan_spec prox_channels[] = {
        {
                .type = IIO_PROXIMITY,
 -              .modified = 1,
 -              .channel2 = IIO_NO_MOD,
                .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
                .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
                BIT(IIO_CHAN_INFO_SCALE) |
@@@ -251,6 -253,7 +251,6 @@@ static int hid_prox_probe(struct platfo
        struct iio_dev *indio_dev;
        struct prox_state *prox_state;
        struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
 -      struct iio_chan_spec *channels;
  
        indio_dev = devm_iio_device_alloc(&pdev->dev,
                                sizeof(struct prox_state));
                return ret;
        }
  
 -      channels = kmemdup(prox_channels, sizeof(prox_channels), GFP_KERNEL);
 -      if (!channels) {
 +      indio_dev->channels = kmemdup(prox_channels, sizeof(prox_channels),
 +                                    GFP_KERNEL);
 +      if (!indio_dev->channels) {
                dev_err(&pdev->dev, "failed to duplicate channels\n");
                return -ENOMEM;
        }
  
 -      ret = prox_parse_report(pdev, hsdev, channels,
 +      ret = prox_parse_report(pdev, hsdev,
 +                              (struct iio_chan_spec *)indio_dev->channels,
                                HID_USAGE_SENSOR_PROX, prox_state);
        if (ret) {
                dev_err(&pdev->dev, "failed to setup attributes\n");
                goto error_free_dev_mem;
        }
  
 -      indio_dev->channels = channels;
        indio_dev->num_channels =
                                ARRAY_SIZE(prox_channels);
        indio_dev->dev.parent = &pdev->dev;
@@@ -350,7 -352,7 +350,7 @@@ static int hid_prox_remove(struct platf
        return 0;
  }
  
- static struct platform_device_id hid_prox_ids[] = {
+ static const struct platform_device_id hid_prox_ids[] = {
        {
                /* Format: HID-SENSOR-usage_id_in_hex_lowercase */
                .name = "HID-SENSOR-200011",
index 3cf0bd67d24ca8001224f960513bbd93b45be1e5,c060bd847f540af5c9cc5e840dbcb7c94c0c598a..6848d8c80effcf7c92c44669691b4a55ef3b75e7
@@@ -47,6 -47,8 +47,6 @@@ struct press_state 
  static const struct iio_chan_spec press_channels[] = {
        {
                .type = IIO_PRESSURE,
 -              .modified = 1,
 -              .channel2 = IIO_NO_MOD,
                .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
                .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
                BIT(IIO_CHAN_INFO_SCALE) |
@@@ -260,7 -262,6 +260,6 @@@ static int hid_press_probe(struct platf
        struct iio_dev *indio_dev;
        struct press_state *press_state;
        struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
-       struct iio_chan_spec *channels;
  
        indio_dev = devm_iio_device_alloc(&pdev->dev,
                                sizeof(struct press_state));
                return ret;
        }
  
-       channels = kmemdup(press_channels, sizeof(press_channels), GFP_KERNEL);
-       if (!channels) {
+       indio_dev->channels = kmemdup(press_channels, sizeof(press_channels),
+                                     GFP_KERNEL);
+       if (!indio_dev->channels) {
                dev_err(&pdev->dev, "failed to duplicate channels\n");
                return -ENOMEM;
        }
  
-       ret = press_parse_report(pdev, hsdev, channels,
-                               HID_USAGE_SENSOR_PRESSURE, press_state);
+       ret = press_parse_report(pdev, hsdev,
+                                (struct iio_chan_spec *)indio_dev->channels,
+                                HID_USAGE_SENSOR_PRESSURE, press_state);
        if (ret) {
                dev_err(&pdev->dev, "failed to setup attributes\n");
                goto error_free_dev_mem;
        }
  
-       indio_dev->channels = channels;
        indio_dev->num_channels =
                                ARRAY_SIZE(press_channels);
        indio_dev->dev.parent = &pdev->dev;
@@@ -360,7 -362,7 +360,7 @@@ static int hid_press_remove(struct plat
        return 0;
  }
  
- static struct platform_device_id hid_press_ids[] = {
+ static const struct platform_device_id hid_press_ids[] = {
        {
                /* Format: HID-SENSOR-usage_id_in_hex_lowercase */
                .name = "HID-SENSOR-200031",