1. 18 3月, 2014 1 次提交
  2. 28 9月, 2013 1 次提交
  3. 22 9月, 2013 1 次提交
  4. 08 9月, 2013 1 次提交
  5. 17 8月, 2013 1 次提交
    • O
      iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver · 1696f364
      Oleksandr Kozaruk 提交于
      The GPADC is general purpose ADC found on TWL6030, and TWL6032 PMIC,
      known also as Phoenix and PhoenixLite.
      
      The TWL6030 and TWL6032 have GPADC with 17 and 19 channels
      respectively. Some channels have current source and are used for
      measuring voltage drop on resistive load for detecting battery ID
      resistance, or measuring voltage drop on NTC resistors for external
      temperature measurements. Some channels measure voltage, (i.e. battery
      voltage), and have voltage dividers, thus, capable to scale voltage.
      Some channels are dedicated for measuring die temperature.
      
      Some channels are calibrated in 2 points, having offsets from ideal
      values kept in trim registers. This is used to correct measurements.
      
      The differences between GPADC in TWL6030 and TWL6032:
      - 10 bit vs 12 bit ADC;
      - 17 vs 19 channels;
      - channels have different purpose(i.e. battery voltage
        channel 8 vs channel 18);
      - trim values are interpreted differently.
      
      Based on the driver patched from Balaji TK, Graeme Gregory, Ambresh K,
      Girish S Ghongdemath.
      Signed-off-by: NBalaji T K <balajitk@ti.com>
      Signed-off-by: NGraeme Gregory <gg@slimlogic.co.uk>
      Signed-off-by: NOleksandr Kozaruk <oleksandr.kozaruk@ti.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      1696f364
  6. 04 8月, 2013 3 次提交
  7. 23 5月, 2013 1 次提交
  8. 18 3月, 2013 2 次提交
  9. 16 3月, 2013 2 次提交
  10. 26 1月, 2013 1 次提交
  11. 30 11月, 2012 2 次提交
  12. 20 11月, 2012 2 次提交
  13. 10 11月, 2012 1 次提交
  14. 06 11月, 2012 2 次提交
  15. 22 9月, 2012 1 次提交
    • K
      iio: adc: add new lp8788 adc driver · f0347c36
      Kim, Milo 提交于
       TI LP8788 PMU provides regulators, battery charger, ADC,
       RTC, backlight driver and current sinks.
      
       This patch enables the LP8788 ADC functions.
      
       The LP8788 ADC has several ADC input selection and supports 12bit resolution.
       Internal operation of getting ADC is access to registers of LP8788.
       The LP8788 ADC uses exported functions for accessing these registers.
       (exported by LP8788 MFD device driver)
      
       This driver supports IIO_CHAN_INFO_RAW and SCALE.
       So the IIO consumer can calculate the value with raw and scale.
       The unit of scale is micro.
      
       (ADC Input Selection)
      
       Voltage: battery voltage (MAX 5.0, 5.5 and 6.0V)
                charger input voltage
                four general ADC inputs
                coin cell voltage
       Current: battery charging current
       Temperature: IC temperature
      
       (The IIO map for the IIO consumer)
      
       The ADC input is configurable in the platform side.
       Even though this platform data is not defined,
       the default IIO map is created for supporting the power supply driver.
       The battery voltage and temperature are used inside this driver.
      
       (History)
      
       Patch v6.
       (a) Fix scale value for each ADC input selection
       Voltage and current type are mili unit and temperature is degree.
       To calculate the IC temperature,
       temp = raw * scaleint + (raw * scalepart)/ 1000000, scaleint is always 0.
            = raw * 0.061050, raw: 0 ~ 4095
       Then range of IC temperature(ADC result) is 0 ~ 250'C
      
       (b) Reorganization of the IIO channel Spec
       Remove address, scan_type and scan_index and rollback the datasheet name.
       The reason why 'address' field is unnecessary is no relation with each channel.
       Moreover, to get the raw ADC value, the address info is not only one register
       but also several registers.
       Therefore specific function(lp8788_get_adc_result) is called rather than
       using one 'address' field.
      
       (c) Fix coding style
       Remove duplicated checking routine while unregistering the IIO map.
       Fix code for space and parenthesis.
      
       Patch v5.
       Fix default consumer name as 'lp8788-charger'.
       Add mutex for ADC read operation.
       Reorganization on lp8788_adc_read_raw().
      
       Patch v4.
       Fix adc_raw function: support RAW and SCALE channel info.
       Change LP8788 ADC platform data - iio map.
       Enables the default IIO map.
      
       Patch v3.
       Fix wrong size of allocating iio private data.
       Fix coding styles.
      
       Patch v2.
       Support RAW and SCALE interface for IIO consumer.
       Clean up the iio channel spec macro.
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      f0347c36
  16. 15 9月, 2012 4 次提交
  17. 08 9月, 2012 1 次提交
  18. 28 8月, 2012 1 次提交
    • L
      iio:adc: Add common code for ADI Sigma Delta devices · af300848
      Lars-Peter Clausen 提交于
      Most devices from the Analog Devices Sigma Delta family use a similar scheme for
      communication with the device. This includes register access, as well as trigger
      handling. But each device sub-family has different features and different
      register layouts (some even have no registers at all) and thus it is impractical
      to try to support all of the devices by the same driver. This patch adds a
      common base library for Sigma Delta converter devices. It will be used by
      individual drivers.
      
      This code is mostly based on the three existing Sigma Delta drivers the AD7192,
      AD7780 and AD7793, but has been improved for more robustness and flexibility.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      af300848
  19. 30 6月, 2012 1 次提交
  20. 19 6月, 2012 1 次提交
  21. 15 5月, 2012 1 次提交