18 Aug, 2013

1 commit


17 Aug, 2013

13 commits

  • 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: Balaji T K
    Signed-off-by: Graeme Gregory
    Signed-off-by: Oleksandr Kozaruk
    Signed-off-by: Jonathan Cameron

    Oleksandr Kozaruk
     
  • 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: Hector Palacios
    Acked-by: Marek Vasut
    Acked-by: Alexandre Belloni
    Signed-off-by: Jonathan Cameron

    Hector Palacios
     
  • Using devm_iio_device_alloc makes code simpler.

    Signed-off-by: Sachin Kamat
    Acked-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Sachin Kamat
     
  • Using devm_iio_device_alloc makes code simpler.

    Signed-off-by: Sachin Kamat
    Cc: Denis Ciocca
    Signed-off-by: Jonathan Cameron

    Sachin Kamat
     
  • Using devm_iio_device_alloc makes code simpler.

    Signed-off-by: Sachin Kamat
    Cc: Christian Strobel
    Signed-off-by: Jonathan Cameron

    Sachin Kamat
     
  • Using devm_iio_device_alloc makes code simpler.

    Signed-off-by: Sachin Kamat
    Signed-off-by: Jonathan Cameron

    Sachin Kamat
     
  • Using devm_iio_device_alloc makes code simpler.

    Signed-off-by: Sachin Kamat
    Cc: Srinivas Pandruvada
    Signed-off-by: Jonathan Cameron

    Sachin Kamat
     
  • Using devm_iio_device_alloc makes code simpler.

    Signed-off-by: Sachin Kamat
    Acked-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Sachin Kamat
     
  • Using devm_iio_device_alloc makes code simpler.

    Signed-off-by: Sachin Kamat
    Cc: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Sachin Kamat
     
  • Using devm_iio_device_alloc makes code simpler.

    Signed-off-by: Sachin Kamat
    Acked-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Sachin Kamat
     
  • Using devm_iio_device_alloc makes code simpler.

    Signed-off-by: Sachin Kamat
    Acked-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Sachin Kamat
     
  • Signed-off-by: Peter Meerwald
    Signed-off-by: Jonathan Cameron

    Peter Meerwald
     
  • the TI TMP006 is a non-contact temperature sensor with I2C interface;
    it measures the surface temperature of a distance object using a
    thermopile to absorb IR energy emitted from the object

    the sensor has two channels: IR sensor voltage (16-bit) and reference
    temperature of the chip (14-bit); datasheet is here:
    http://www.ti.com/lit/ds/symlink/tmp006.pdf

    v2 (thanks to Grygorii Strashko, Lars-Peter Clausen, Jonathan Cameron
    for review comments):
    * power down device on driver remove
    * use sign_extend32()
    * style cleanup
    * add comments what channel raw LSBs mean
    * spelling of thermopile

    Signed-off-by: Peter Meerwald
    Cc: Grygorii Strashko
    Cc: Lars-Peter Clausen
    Cc: Jonathan Cameron
    Cc: LM Sensors
    Signed-off-by: Jonathan Cameron

    Peter Meerwald
     

16 Aug, 2013

12 commits

  • Macro get_unused_fd() is used to allocate a file descriptor with
    default flags. Those default flags (0) can be "unsafe":
    O_CLOEXEC must be used by default to not leak file descriptor
    across exec().

    Instead of macro get_unused_fd(), functions anon_inode_getfd()
    or get_unused_fd_flags() should be used with flags given by userspace.
    If not possible, flags should be set to O_CLOEXEC to provide userspace
    with a default safe behavor.

    In a further patch, get_unused_fd() will be removed so that
    new code start using anon_inode_getfd() or get_unused_fd_flags()
    with correct flags.

    This patch replaces calls to get_unused_fd() with call to
    get_unused_fd_flags(O_CLOEXEC) following advice from Erik Gilling.

    Signed-off-by: Yann Droneaud
    Cc: Erik Gilling
    Cc: Colin Cross
    Link: http://lkml.kernel.org/r/CACSP8SjXGMk2_kX_+RgzqqQwqKernvF1Wt3K5tw991W5dfAnCA@mail.gmail.com
    Link: http://lkml.kernel.org/r/cover.1376327678.git.ydroneaud@opteya.com
    Signed-off-by: Greg Kroah-Hartman

    Yann Droneaud
     
  • Macro get_unused_fd() is used to allocate a file descriptor with
    default flags. Those default flags (0) can be "unsafe":
    O_CLOEXEC must be used by default to not leak file descriptor
    across exec().

    Instead of macro get_unused_fd(), functions anon_inode_getfd()
    or get_unused_fd_flags() should be used with flags given by userspace.
    If not possible, flags should be set to O_CLOEXEC to provide userspace
    with a default safe behavor.

    In a further patch, get_unused_fd() will be removed so that
    new code start using anon_inode_getfd() or get_unused_fd_flags()
    with correct flags.

    This patch replaces calls to get_unused_fd() with call to
    get_unused_fd_flags(O_CLOEXEC) following advice from Erik Gilling.

    Signed-off-by: Yann Droneaud
    Cc: Erik Gilling
    Cc: Colin Cross
    Link: http://lkml.kernel.org/r/CACSP8SjZcpcpEtQHzcGYhf-MP7QGo0XpN7-uN7rmD=vNtopG=w@mail.gmail.com
    Link: http://lkml.kernel.org/r/cover.1376327678.git.ydroneaud@opteya.com
    Signed-off-by: Greg Kroah-Hartman

    Yann Droneaud
     
  • The new structures being
    typedef struct tagSCTS -> struct vnt_cts
    typedef struct tagSCTS_FB -> struct vnt_cts_fb

    These are only needed by rxtc.c so moved to rxtx.h and
    will eventually form part of the structure of
    struct vnt_tx_buffer.

    The linux/ieee80211.h in desc.h is no longer needed.

    Signed-off-by: Malcolm Priestley
    Signed-off-by: Greg Kroah-Hartman

    Malcolm Priestley
     
  • The new structures being
    typedef struct tagSRTS_g -> struct vnt_rts_g
    typedef struct tagSRTS_g_FB -> struct vnt_rts_g_fb
    typedef struct tagSRTS_ab -> struct vnt_rts_ab
    typedef struct tagSRTS_a_FB -> struct vnt_rts_a_fb

    These are only needed by rxtc.c so moved to rxtx.h and
    will eventually form part of the structure of
    struct vnt_tx_buffer.

    Signed-off-by: Malcolm Priestley
    Signed-off-by: Greg Kroah-Hartman

    Malcolm Priestley
     
  • Using an int which is casted to unsigned char as inbuf is messy.
    The code won't work on big endian systems. The patch should fix
    this.

    Signed-off-by: Jens Frederich
    Signed-off-by: Greg Kroah-Hartman

    Jens Frederich
     
  • This patch replace some magic numbers. I believe it makes
    the driver more readable.

    The magic number 0x26 is the XO system embedded controller
    (EC) command 'DCON power enable/disable'.

    Number 0x41, and 0x42 are special memory controller settings
    register. The 0x41 initialize bit sequence 0x101 means:
    enable memory power down function and special SDRAM clock
    delay for synchronize SDRAM output and clock signal.

    The 0x42 initialize squence 0x101 is wrong. According to
    the specification Bit 8 is reserved, thus not in use.
    I removed it.

    Signed-off-by: Jens Frederich
    Signed-off-by: Greg Kroah-Hartman

    Jens Frederich
     
  • Replace with struct vnt_beacon_buffer.

    Signed-off-by: Malcolm Priestley
    Signed-off-by: Greg Kroah-Hartman

    Malcolm Priestley
     
  • Move vnt_tx_buffer *pTxBufHead to argument u8 *usbPacketBuf position.

    Fix the calling to s_bPacketToWirelessUsb so it attached to
    the calling struct vnt_tx_buffer pTX_Buffer.

    Signed-off-by: Malcolm Priestley
    Signed-off-by: Greg Kroah-Hartman

    Malcolm Priestley
     
  • Rename to vnt_tx_buffer.

    Signed-off-by: Malcolm Priestley
    Signed-off-by: Greg Kroah-Hartman

    Malcolm Priestley
     
  • We should not use extra variable just to copy pointer value,
    renaming parameter name serves pupose & removes extra variable.

    Signed-off-by: Rupesh Gujare
    Signed-off-by: Greg Kroah-Hartman

    Rupesh Gujare
     
  • We are assigning value to hport before returning, there is
    no need to initialize it.

    Signed-off-by: Rupesh Gujare
    Signed-off-by: Greg Kroah-Hartman

    Rupesh Gujare
     
  • This patch removes the dgnc_proc.c and dgnc_proc.h files and all
    references to proc functions in dgnc_driver.c. This also removes proc.h
    from the include headers in driver.c, mgmt.c and sysfs.c and proc.o
    from the Makefile.

    Drivers now use sysfs instead of proc.

    Signed-off-by: Lidza Louina
    Signed-off-by: Greg Kroah-Hartman

    Lidza Louina
     

15 Aug, 2013

14 commits