20 Apr, 2016

3 commits

  • The current buffer read code tries to optimize reads from the
    sensor data registers by issuing a single read operation across
    all the indata registers.

    This doesn't work: when the LIS331DL accelerometer sensor is
    configured to open drain, active low interrupt mode, this will
    just clear the XDA (X-axis data available) bit in the STATUS_REG
    register (0x27), while YDA, ZDA and even ZYXDA remain set to 1,
    and the internal logic of the sensor holds the DRDY (INT1) line
    asserted (the value of the status register is 0xee).

    If we instead issue one read operation per enabled channel
    (X, Y, Z) things start working and we can use open drain and
    active low interrupts.

    Note that a backported patch fixing this issue will be heading
    via the fixes branch but changes in this file already in staging-next
    will make that patch 'look' rather different. The code in here
    is the correct one when that clash hits.

    Cc: Giuseppe Barba
    Cc: Denis Ciocca
    Signed-off-by: Linus Walleij
    Signed-off-by: Jonathan Cameron

    Linus Walleij
     
  • This patch moves the STMP reset out of ADC init function so as to remove
    the possiblity of an error return which will be necessary for PM ops support
    patches to follow.

    Signed-off-by: Stefan Wahren
    Tested-by: Marek Vasut
    Signed-off-by: Jonathan Cameron

    Stefan Wahren
     
  • This patch moves the touchscreen type configuration into
    a more suitable function. Btw this simplifies PM ops later.

    Signed-off-by: Stefan Wahren
    Reviewed-by: Marek Vasut
    Tested-by: Marek Vasut
    Acked-by: Dmitry Torokhov
    Signed-off-by: Jonathan Cameron

    Stefan Wahren
     

19 Apr, 2016

2 commits


17 Apr, 2016

6 commits

  • Set INPUT_PROP_DIRECT to indicate that it is a touchscreen on the
    device to help userspace classify it.

    Signed-off-by: Ksenija Stanojevic
    Acked-by: Dmitry Torokhov
    Signed-off-by: Jonathan Cameron

    Ksenija Stanojevic
     
  • Using this requires software triggers like CONFIG_IIO_HRTIMER_TRIGGER.

    The device can be configured to do internal periodic sampling but does not
    offer some sort of interrupt on data ready. Interrupts can only trigger when
    values get out of a specific range.

    Signed-off-by: Crestez Dan Leonard
    Signed-off-by: Jonathan Cameron

    Crestez Dan Leonard
     
  • These chips have an almost identical interface but support a different
    number of value bits. Datasheet links for comparison:

    * http://www.ti.com/lit/ds/symlink/adc081c021.pdf
    * http://www.ti.com/lit/ds/symlink/adc101c021.pdf
    * http://www.ti.com/lit/ds/symlink/adc121c021.pdf

    Signed-off-by: Crestez Dan Leonard
    Signed-off-by: Jonathan Cameron

    Crestez Dan Leonard
     
  • This fix checkpatch warnings:

    WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

    Signed-off-by: Slawomir Stepien
    Signed-off-by: Jonathan Cameron

    Slawomir Stepien
     
  • This is a reimplementation of the old misc device driver for the
    ROHM BH1780 ambient light sensor (drivers/misc/bh1780gli.c).

    Differences from the old driver:
    - Uses the IIO framework
    - Uses runtime PM to idle the hardware after 5 seconds
    - No weird custom power management from userspace
    - No homebrewn values in sysfs

    This uses the same (undocumented) device tree compatible-string
    as the old driver ("rohm,bh1780gli").

    Cc: Arnd Bergmann
    Cc: Ulf Hansson
    Cc: Daniel Mack
    Cc: Peter Meerwald-Stadler
    Signed-off-by: Linus Walleij
    Reviewed-by: Ulf Hansson
    Signed-off-by: Jonathan Cameron

    Linus Walleij
     
  • Indent lines inside if statement.

    Signed-off-by: Ksenija Stanojevic
    Signed-off-by: Jonathan Cameron

    Ksenija Stanojevic
     

16 Apr, 2016

16 commits


11 Apr, 2016

1 commit

  • * Unify log messages
    * Add more DEBUG messages

    Apparently this driver is working unreliably on some platforms that I can't
    test. Therefore I want an easy way for bug reporters to provide useful
    information without making the driver too chatty by default.

    Signed-off-by: Harald Geyer
    Signed-off-by: Jonathan Cameron

    Harald Geyer
     

10 Apr, 2016

6 commits


05 Apr, 2016

5 commits

  • fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of
    'unsigned''

    Signed-off-by: Clifton Barnes
    Acked-by: Martyn Welch
    Signed-off-by: Greg Kroah-Hartman

    Clifton Barnes
     
  • fix checkpatch.pl warning about 'Avoid CamelCase'

    Signed-off-by: Daeseok Youn
    Signed-off-by: Greg Kroah-Hartman

    Daeseok Youn
     
  • The "ch->ch_bd" is already assined to "bd" but this is only
    for checking null or MAGIC number.
    in the dgnc_tty_ioctl function, bd can be used for referencing
    to board_ops structure.

    Signed-off-by: Daeseok Youn
    Signed-off-by: Greg Kroah-Hartman

    Daeseok Youn
     
  • Currently, lowmemorykiller (LMK) is using TIF_MEMDIE for two purposes.
    One is to remember processes killed by LMK, and the other is to
    accelerate termination of processes killed by LMK.

    But since LMK is invoked as a memory shrinker function, there still
    should be some memory available. It is very likely that memory
    allocations by processes killed by LMK will succeed without using
    ALLOC_NO_WATERMARKS via TIF_MEMDIE. Even if their allocations cannot
    escape from memory allocation loop unless they use ALLOC_NO_WATERMARKS,
    lowmem_deathpending_timeout can guarantee forward progress by choosing
    next victim process.

    On the other hand, mark_oom_victim() assumes that it must be called with
    oom_lock held and it must not be called after oom_killer_disable() was
    called. But LMK is calling it without holding oom_lock and checking
    oom_killer_disabled. It is possible that LMK calls mark_oom_victim()
    due to allocation requests by kernel threads after current thread
    returned from oom_killer_disabled(). This will break synchronization
    for PM/suspend.

    This patch introduces per a task_struct flag for remembering processes
    killed by LMK, and replaces TIF_MEMDIE with that flag. By applying this
    patch, assumption by mark_oom_victim() becomes true.

    Signed-off-by: Tetsuo Handa
    Acked-by: Michal Hocko
    Cc: Arve Hjonnevag
    Cc: Riley Andrews
    Signed-off-by: Greg Kroah-Hartman

    Tetsuo Handa
     
  • …iio into staging-next

    Jonathan writes:

    First round of IIO new device support, features and cleanups for the 4.7 cycle.

    New core support
    * UV light modifier (for intensity)
    * UV light index channel type.

    New device support
    * hp206c barometer and altimeter
    - new driver.
    * mcp4131 potentiometer
    - new driver supporting lots of parts from Microchip.
    * mma8452
    - FXLS8471Q support
    - NXP LPC18XX SOC ADC
    - new driver.
    - NXP LPC18XX SOC DAC
    - new driver.
    - rockchip_saradc
    - support rk3399
    * st accel
    - h3lis331dl support

    Staging driver removals
    * adis16204
    - obsolete part making it hard to get parts to test the driver in order
    to clean it up.
    * adis16220
    - obsolete part making it hard to get the parts test the driver in order
    to clean it up.

    Features
    * core
    - convenience functions to claim / release direct access to the device.
    Makes more consistent handling of this corner easier. Used in ad7192 driver.
    * ak8975
    - power regulator support.
    * at91-sama5d2
    - differential channel support.
    * mma8452
    - runtime pm support
    - drop device specific autosleep and use the runtime pm one instead.
    * ms5611
    - DT bindings
    - oversampling ratio support

    Cleanups and minor fixes
    * MAINTAINERS
    - Peter got married - hence name change!

    * Documentation
    - Fix a typo in in_proximity_raw description.
    - Add some missing docs for iio_buffer_access_funcs.

    * Tools
    - update iio_event_monitor names to match new stuff.
    - make generic_buffer look for triggers ending in -trigger as we let these in
    for a number of drivers a long time back and now it is a fairly common
    option.

    Drivers
    * staging wide
    - convert bare unsigned usage to unsigned int to comply with coding style.
    * non staging wide:
    - since boiler plate gpio handling of interrupts has been moved into the
    ACPI core we don't need to include gpio/consumer.h in a load of drivers so
    drop it.
    * ad7606
    - fix an endian casting sparse warning.
    * ak8975
    - fix a possible unitialized warning from gcc.
    - drop and unused field left over from earlier cleanups
    - fix a missing regulator_disable on exit.
    * at91-sama5d2
    - typo and indentation
    - missing IOMEM dependency.
    - cleanup mode register usage by avoidling erasing whole thing when changing
    the sampling frequency.
    * bmc150
    - use the core demux and available_scan_masks to simplify buffer handling
    - optimize the transfers in the trigger handler now we have a magic function
    to emulate bulk reads (under circumstances met here). This matters with some
    rather dumb i2c adapters in particular.
    - use a single regmap_conf for all bus types as they were all the same.
    * bmg160
    - use the core demux and available_scan_masks to simplify the buffer handling
    - optimize the transfers in the trigger handler now we have a magic funciton
    to emulate bulk rads (under circumstances met here).
    - drop gpio interrupt probing from the driver (ACPI) as now handled by the
    ACPI core.
    * ina2xx-adc
    - update the CALIB register when RShunt changes.
    - fix scale for VShunt - in reality this error canceled out when used.
    * isl29028
    - use regmap to retrieve the struct device instead of carrying a second
    copy of it around.
    * kxcjk-1013
    - use core demux
    - optimize i2c transfers in the trigger handler.
    * mcp4531
    - refactor to use a pointer to access model parameters instead of indexing
    into the array each time.
    * mma8452
    - style fixes
    - avoid swtiching to active whenever the config changes
    - add missin i2c_device_id for mma8451
    * mpu6050
    - fix possible NULL dereference.
    - fix the name / chip_id used when ACPI used (otherwise reports as NULL).
    * ms5611
    - fix a missing regulator_disable that left the regulator on during removal.
    * mxc4005
    - drop gpio interrupt handling for ACPI case from driver as the core now
    handles this case.
    * st-sensors
    - note that there are only ever a maximum of 3 axis on current st-sensors
    so just allocate a fixed sized buffer big enough for that.
    * tpl0102
    - change the i2c_check_functionality condition to bring it inline with other
    IIO users as EOPNOTSUPP.
    * tsl2563
    - replace deprecated flush_scheduled_work

    Greg Kroah-Hartman
     

03 Apr, 2016

1 commit