1. 26 1月, 2015 1 次提交
  2. 26 8月, 2014 1 次提交
  3. 30 5月, 2014 1 次提交
  4. 05 5月, 2014 1 次提交
  5. 17 2月, 2014 1 次提交
  6. 03 12月, 2013 1 次提交
    • S
      iio: hid-sensors: Fix power and report state · 751d17e2
      Srinivas Pandruvada 提交于
      In the original HID sensor hub firmwares all Named array enums were
      to 0-based. But the most recent hub implemented as 1-based,
      because of the implementation by one of the major OS vendor.
      Using logical minimum for the field as the base of enum. So we add
      logical minimum to the selector values before setting those fields.
      Some sensor hub FWs already changed logical minimum from 0 to 1
      to reflect this and hope every other vendor will follow.
      There is no easy way to add a common HID quirk for NAry elements,
      even if the standard specifies these field as NAry, the collection
      used to describe selectors is still just "logical".
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      751d17e2
  7. 03 11月, 2013 1 次提交
  8. 01 10月, 2013 1 次提交
  9. 26 3月, 2013 1 次提交
    • L
      iio:trigger: Introduce iio_tigger_{set,get}_drvdata · 1e9663c6
      Lars-Peter Clausen 提交于
      Introduce iio_tigger_{set,get}_drvdata which allows to attach driver specific
      data to a trigger. The functions wrap access to the triggers private_data field
      and all current users are updated to use iio_tigger_{set,get}_drvdata instead of
      directly accessing the private_data field. This is the first step towards
      removing the private_data field from the iio_trigger struct.
      
      The following coccinelle script has been used to update the drivers:
      <smpl>
      @@
      struct iio_trigger *trigger;
      expression priv;
      @@
      -trigger->private_data = priv
      +iio_trigger_set_drv_data(trigger, priv)
      
      @@
      struct iio_trigger *trigger;
      @@
      -trigger->private_data
      +iio_trigger_get_drv_data(trigger)
      </smpl>
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      1e9663c6
  10. 06 1月, 2013 2 次提交
  11. 17 11月, 2012 1 次提交
  12. 22 9月, 2012 1 次提交
    • S
      iio: hid-sensors: Prevent crash during hot-unplug · f07b60b7
      Srinivas Pandruvada 提交于
      When hid sensor hub is unplugged, there is a crash in
      iio_device_unregister_trigger_consumer.
      In a typical IIO driver when remove is called, it will unregister and free
      trigger and then it will call iio_device_free.
      The function iio_trigger_free() will free the allocated memory for trigger.
      If this trigger was assigned to iio_dev->trig, then it should be set to NULL.
      Othewise when iio_device_free() is called later, it finally calls
      iio_device_unregsister_trigger(), which checks for
             if (indio_dev->trig)
                      iio_trigger_put(indio_dev->trig);
      If indio_dev->trig is not set to NULL, it calls iio_trigger_put on a bad
      pointer causing crash.
      This scenerio can happen in any driver, which is storing trigger pointer in
      iio_dev structure and following current procedure during remove.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      f07b60b7
  13. 07 9月, 2012 1 次提交