1. 15 9月, 2012 4 次提交
  2. 08 9月, 2012 5 次提交
  3. 07 9月, 2012 6 次提交
  4. 04 9月, 2012 7 次提交
  5. 28 8月, 2012 5 次提交
  6. 17 8月, 2012 4 次提交
  7. 16 7月, 2012 1 次提交
    • P
      iio: fix pointer cast warning · 79587623
      Peter Meerwald 提交于
      fix compile warning reported by Fengguang Wu:
      
      drivers/iio/light/adjd_s311.c: In function 'adjd_s311_trigger_handler':
      drivers/iio/light/adjd_s311.c:188:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      drivers/iio/light/adjd_s311.c:188:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      
         185              }
         186
         187              if (indio_dev->scan_timestamp)
       > 188                      *(s64 *)((phys_addr_t)data->buffer + ALIGN(len, sizeof(s64)))
         189                              = time_ns;
         190              iio_push_to_buffer(buffer, (u8 *)data->buffer, time_ns);
         191
      Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net>
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      79587623
  8. 13 7月, 2012 4 次提交
  9. 11 7月, 2012 1 次提交
  10. 10 7月, 2012 2 次提交
    • L
      iio: Introduce iio_validate_scan_mask_onehot · 81636632
      Lars-Peter Clausen 提交于
      Add a helper function for validating a scan mask for devices where exactly one
      channel must be selected during sampling. This is a common case among devices
      which have scan mask restrictions so it makes sense to provide this function in
      the core.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      81636632
    • L
      iio: Add callback to check whether a scan mask is valid · 939546d1
      Lars-Peter Clausen 提交于
      This is useful for cases where the number of valid scan masks grows
      exponentially, but it is rather easy to check whether a mask is valid or not
      programmatically.
      
      An example of such a case is a device with multiple ADCs where each ADC has a
      upstream MUX, which allows to select from a number of physical channels.
      
        +-------+   +-------+
        |       |   |       | --- Channel 1
        | ADC 1 |---| MUX 1 | ---   ...
        |       |   |       | --- Channel M
        +-------+   +-------+
      
           .            .            .
           .            .            .
           .            .            .
      
        +-------+   +-------+
        |       |   |       | --- Channel M * N + 1
        | ADC N |---| MUX N | ---       ...
        |       |   |       | --- Channel M * N + M
        +-------+   +-------+
      
      The number of necessary scan masks for this case is (M+1)**N - 1, on the other
      hand it is easy to check whether subsets for each ADC of the scanmask have only
      one bit set.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      939546d1
  11. 09 7月, 2012 1 次提交