1. 20 8月, 2013 37 次提交
  2. 18 8月, 2013 1 次提交
  3. 17 8月, 2013 2 次提交
    • 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
    • H
      iio: mxs-lradc: change the realbits to 12 · 1eb70a97
      Hector Palacios 提交于
      The LRADC virtual channels have an 18 bit field to store the sum of up
      to 2^5 accumulated samples. The read_raw function however only operates
      over a single sample (12 bit resolution).
      In order to use this field for scaling operations, we need it to be the
      exact resolution value of the LRADC.
      Besides, the driver was using an 18 bit mask (LRADC_CH_VALUE_MASK) to
      report touch coordinates to userland. A 12 bit mask should be used instead
      or else the touch libraries will expect a coordinates range between 0
      and 0x3ffff (18 bits), instead of between 0 and 0xfff (12 bits).
      Signed-off-by: NHector Palacios <hector.palacios@digi.com>
      Acked-by: NMarek Vasut <marex@denx.de>
      Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      1eb70a97