1. 18 9月, 2012 2 次提交
    • L
      iio:inkern: Add function to read the processed value · 48e44ce0
      Lars-Peter Clausen 提交于
      Add a function to read a processed value from a channel. The function will first
      attempt to read the IIO_CHAN_INFO_PROCESSED attribute. If that fails it will
      read the IIO_CHAN_INFO_RAW attribute and convert the result from a raw value to
      a processed value.
      
      The patch also introduces a function to convert raw value to a processed value
      and exports it, in case a user needs or wants to do the conversion by itself.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      48e44ce0
    • L
      iio: consumer.h: Fix kernel doc incosistency · 45f010ba
      Lars-Peter Clausen 提交于
      For the iio_read_channel_raw and iio_read_channel_scale the kerneldoc comment
      refers to an argument called "channel", while the argument is called "chan" in
      the function signature. This leads to the following warnings from kerneldoc:
      
      	Warning(include/linux/iio/consumer.h:71): No description found for parameter 'chan'
      	Warning(include/linux/iio/consumer.h:71): Excess function parameter 'channel' description in 'iio_read_channel_raw'
      	Warning(include/linux/iio/consumer.h:109): No description found for parameter 'chan'
      	Warning(include/linux/iio/consumer.h:109): Excess function parameter 'channel' description in 'iio_read_channel_scale'
      
      This patch fixes the warnings by naming them consistently.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      45f010ba
  2. 28 8月, 2012 1 次提交
  3. 30 6月, 2012 1 次提交
  4. 26 4月, 2012 1 次提交
  5. 25 2月, 2012 1 次提交
    • J
      staging:iio:core add in kernel interface mapping and getting IIO channels. · e27d75d7
      Jonathan Cameron 提交于
      Lifted from proposal for in kernel interface built on the out of staging
      branch.
      
      Two elements here:
      * Map as defined in "inkern.h"
      * Matching code to actually get the iio_dev and channel
      that we want from the global list of IIO devices.
      V4: Everything now built if iio is built (rather than being optional)
          Removal race condition prevented by using info pointer as a check
          of removal under a lock.
      V3: Drop the option of registering / getting channels using dev pointer.
      Stick to name only as suggested by Mark Brown (this has caused user
      confusion in the regulator framework.)
      V2: As per Greg KH suggestion, move over to registration by passing
      the tables into the provider drivers (how regulator does it).
      This does not prevent us using the original more flexible approach
      if at a later date there is a usecase that demands it.
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e27d75d7