21 May, 2016

2 commits

  • Pull staging and IIO driver updates from Greg KH:
    "Here's the big staging and iio driver update for 4.7-rc1.

    I think we almost broke even with this release, only adding a few more
    lines than we removed, which isn't bad overall given that there's a
    bunch of new iio drivers added.

    The Lustre developers seem to have woken up from their sleep and have
    been doing a great job in cleaning up the code and pruning unused or
    old cruft, the filesystem is almost readable :)

    Other than that, just a lot of basic coding style cleanups in the
    churn. All have been in linux-next for a while with no reported
    issues"

    * tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits)
    Staging: emxx_udc: emxx_udc: fixed coding style issue
    staging/gdm724x: fix "alignment should match open parenthesis" issues
    staging/gdm724x: Fix avoid CamelCase
    staging: unisys: rename misleading var ii with frag
    staging: unisys: visorhba: switch success handling to error handling
    staging: unisys: visorhba: main path needs to flow down the left margin
    staging: unisys: visorinput: handle_locking_key() simplifications
    staging: unisys: visorhba: fail gracefully for thread creation failures
    staging: unisys: visornic: comment restructuring and removing bad diction
    staging: unisys: fix format string %Lx to %llx for u64
    staging: unisys: remove unused struct members
    staging: unisys: visorchannel: correct variable misspelling
    staging: unisys: visorhba: replace functionlike macro with function
    staging: dgnc: Need to check for NULL of ch
    staging: dgnc: remove redundant condition check
    staging: dgnc: fix 'line over 80 characters'
    staging: dgnc: clean up the dgnc_get_modem_info()
    staging: lustre: lnet: enable configuration per NI interface
    staging: lustre: o2iblnd: properly set ibr_why
    staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini
    ...

    Linus Torvalds
     
  • Pull driver core updates from Greg KH:
    "Here's the "big" driver core update for 4.7-rc1.

    Mostly just debugfs changes, the long-known and messy races with
    removing debugfs files should be fixed thanks to the great work of
    Nicolai Stange. We also have some isa updates in here (the x86
    maintainers told me to take it through this tree), a new warning when
    we run out of dynamic char major numbers, and a few other assorted
    changes, details in the shortlog.

    All have been in linux-next for some time with no reported issues"

    * tag 'driver-core-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits)
    Revert "base: dd: don't remove driver_data in -EPROBE_DEFER case"
    gpio: ws16c48: Utilize the ISA bus driver
    gpio: 104-idio-16: Utilize the ISA bus driver
    gpio: 104-idi-48: Utilize the ISA bus driver
    gpio: 104-dio-48e: Utilize the ISA bus driver
    watchdog: ebc-c384_wdt: Utilize the ISA bus driver
    iio: stx104: Utilize the module_isa_driver and max_num_isa_dev macros
    iio: stx104: Add X86 dependency to STX104 Kconfig option
    Documentation: Add ISA bus driver documentation
    isa: Implement the max_num_isa_dev macro
    isa: Implement the module_isa_driver macro
    pnp: pnpbios: Add explicit X86_32 dependency to PNPBIOS
    isa: Decouple X86_32 dependency from the ISA Kconfig option
    driver-core: use 'dev' argument in dev_dbg_ratelimited stub
    base: dd: don't remove driver_data in -EPROBE_DEFER case
    kernfs: Move faulting copy_user operations outside of the mutex
    devcoredump: add scatterlist support
    debugfs: unproxify files created through debugfs_create_u32_array()
    debugfs: unproxify files created through debugfs_create_blob()
    debugfs: unproxify files created through debugfs_create_bool()
    ...

    Linus Torvalds
     

20 May, 2016

1 commit

  • Pull i2c updates from Wolfram Sang:

    - Peter Rosin did some major rework on the locking of i2c muxes by
    seperating parent-locked muxes and mux-locked muxes.

    This avoids deadlocks/workarounds when the mux itself needs i2c
    commands for muxing. And as a side-effect, other workarounds in the
    media layer could be eliminated. Also, Peter stepped up as the i2c
    mux maintainer and will keep an eye on these changes.

    - major updates to the octeon driver

    - add a helper to the core to generate the address+rw_bit octal and
    make drivers use it

    - quite a bunch of driver updates

    * 'i2c/for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (84 commits)
    i2c: rcar: add DMA support
    i2c: st: Implement bus clear
    i2c: only check scl functions when using generic recovery
    i2c: algo-bit: declare i2c_bit_quirk_no_clk_stretch as static
    i2c: tegra: disable clock before returning error
    [media] rtl2832: regmap is aware of lockdep, drop local locking hack
    [media] rtl2832_sdr: get rid of empty regmap wrappers
    [media] rtl2832: change the i2c gate to be mux-locked
    [media] si2168: change the i2c gate to be mux-locked
    iio: imu: inv_mpu6050: change the i2c gate to be mux-locked
    i2c: mux: document i2c muxes and elaborate on parent-/mux-locked muxes
    i2c: mux: relax locking of the top i2c adapter during mux-locked muxing
    i2c: muxes always lock the parent adapter
    i2c: allow adapter drivers to override the adapter locking
    i2c: uniphier: add "\n" at the end of error log
    i2c: mv64xxx: remove CONFIG_HAVE_CLK conditionals
    i2c: mv64xxx: use clk_{prepare_enable,disable_unprepare}
    i2c: mv64xxx: handle probe deferral for the clock
    i2c: mv64xxx: enable the driver on ARCH_MVEBU
    i2c: octeon: Add workaround for broken irqs on CN3860
    ...

    Linus Torvalds
     

09 May, 2016

1 commit


05 May, 2016

1 commit

  • The root i2c adapter lock is then no longer held by the i2c mux during
    accesses behind the i2c gate, and such accesses need to take that lock
    just like any other ordinary i2c accesses do.

    So, declare the i2c gate mux-locked, and zap the code that makes the
    unlocked i2c accesses and just use ordinary regmap_write accesses.

    This also happens to fix the deadlock described in
    http://patchwork.ozlabs.org/patch/584776/ authored by
    Adriana Reus and submitted by
    Daniel Baluta

    ----------8mlock) i2c_transfer
    | |
    i2c transaction i2c adapter lock
    | |
    i2c adapter lock i2c_mux_master_xfer
    |
    inv_mpu6050_select_bypass
    |
    mutex_lock(&indio_dev->mlock)

    When we operate on an mpu sensor the order of locking is mpu lock
    followed by the i2c adapter lock. However, when we operate the auxiliary
    sensor the order of locking is the other way around.

    ...
    ----------8
    Acked-by: Daniel Baluta
    Tested-by: Crestez Dan Leonard
    Signed-off-by: Peter Rosin
    Signed-off-by: Wolfram Sang

    Peter Rosin
     

04 May, 2016

2 commits


03 May, 2016

2 commits

  • The Apex Embedded Systems STX104 DAC drivers does not do anything
    special in module init/exit. This patch eliminates the module init/exit
    boilerplate code by utilizing the module_isa_driver macro.

    Additionally, the max_num_isa_dev macro is utilized to simplify the
    determination of maximum possible STX104 devices in the system.

    Cc: Jonathan Cameron
    Cc: Hartmut Knaack
    Cc: Lars-Peter Clausen
    Cc: Peter Meerwald
    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    William Breathitt Gray
     
  • The Apex Embedded Systems STX104 DAC driver expects the STX104 device to
    be I/O port-mapped addressable on an X86 platform. This patch adds an
    explicit X86 dependency to the STX104 configuration option to prevent
    building on non-X86 architectures.

    Cc: Jonathan Cameron
    Cc: Hartmut Knaack
    Cc: Lars-Peter Clausen
    Cc: Peter Meerwald
    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    William Breathitt Gray
     

27 Apr, 2016

1 commit

  • …iio into staging-testing

    Jonathan writes:

    2nd set of new device support, features and cleanup for IIO in the 4.7 cycle.

    Bit of a bumper set for new drivers but plenty of other stuff here as well!

    New device support
    * ad5592R ADC/DAC
    - new driver supporting ad5592r and ad5593r combined ADC/DAC and gpio chips.
    * Aosong am2315 relative humidity
    - new driver with triggered buffer support in follow up patch.
    * bmi160 imu
    - new driver
    * bmp280
    - bmp180 support - note there is support in the misc/bmp085 driver. Intent
    is to remove that driver long term.
    * invensense mpu6050
    - cleanup leading to explicit support of mpu9150 with a good few cleanups
    along the way.
    * Hope RF hp03 pressure and temperature sensor.
    - new driver
    * maxim DS1803 potentiometer
    - new driver
    * maxim max44000 light and proximity sensor
    - new driver built in a series of steps to support pretty much everything.
    * ROHM BH1780 light sensor
    - new driver. There is an existing driver in misc that this is pretty much
    intended to replace. The discussion on whether to support the non standard
    interface of that driver is some way is continuing.
    * st-gyro
    - lsm9ds0-gyro. The accel/magn side of this will take a while longer as
    extensions to the st library are needed for cases where two types of sensor
    share a single i2c address.
    * ti-adc081c
    - support the adc101c and adc121c
    * Vishay VEML6070 UV sensor
    - new driver.

    New features
    * core
    - devm_ APIs for channel_get and channel_get_all. The first user of these
    is the generic ADC based thermal driver. As it is going through the
    thermal tree these will be picked up as a patch to that next cycle as that
    is how the author preferred to do it.
    - mounting matrix support. This new core support allows devices to provide
    to userspace (typically from the device tree) allowing compensation for how
    the sensor is mounted on the device. First examples are on UAVs but it
    has a more mundane use on typical phone where the chip may be on the front
    or the back of the circuit board and soldered at any angle. Includes
    support for this ABI in ak8975 (which has an older interface, now
    deprecated) and mpu6050.
    * tools
    - add a -a option to enable all available channels in generic_buffer sample.
    Makes it somewhat easier to use.
    * adis library and drivers
    - support manual self test flag clearing. This has technically been broken
    for a very long time - result is an offset on readings as the applied field
    is on all the time.
    * ak8975
    - triggered buffer support
    * bmc150
    - spi support (including splitting the driver into core and i2c parts)
    * bmp280
    - oversampling support.
    * dht11
    - improved logging - useful to debug timing issues on this quirky device.
    * st-sensors
    - read each channel invidivually as not all support the optimization of
    reading in bulk. This is technically a fix, but will need to be backported
    if desired.
    - support open drain and shared interrupts.
    * ti-adc081c
    - triggered buffer support.

    Cleanups
    * inkern
    - white space fix.
    * ad7606
    - use the iio_device_claim_direct_mode call rather than open coding equiv.
    * ad799x
    - white space fix.
    * ad9523
    - unsigned -> unsigned int
    * apds9660
    - brace location tidying up.
    - silence an uninitialized variable warning.
    * ak8975
    - else and brace on same line fix.
    * at91_adc
    - white space fixes.
    * bmc150
    - use regmap stored copy of the device pointer rather than having an
    additional copy.
    * bmg160
    - use regmap stored copy of the device pointer rather than having an
    additional copy.
    * hid-sensors
    - white space fixes.
    * mcp3422
    - white space fix.
    * mma7455
    - use regmap to retrieve the device struct rather than carrying another copy
    in the private data.
    * ms_sensors
    - white space fix.
    * mxs-lradc
    - move current bindings out of staging - some will be shortly deprecated but
    the reality is that we have device trees out there using them so they will
    need to be supported for some time. They accidentally got left behind
    when the driver graduated from staging.
    - white space cleanup.
    - set INPUT_PROP_DIRECT.
    - move ts config into a better function.
    - move the STMP reset out of the ADC init.
    * vf610_adc
    - case label indenting fix.

    Greg Kroah-Hartman
     

26 Apr, 2016

7 commits


24 Apr, 2016

13 commits

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

    Crestez Dan Leonard
     
  • This patch exposes ALSTIM as illuminance_integration_time and ALSPGA as
    illuminance_scale.

    Changing ALSTIM also changes the number of bits available in the data
    register. This is handled inside raw value reading because:
    * It's very easy to shift a few bits
    * It allows SCALE and INT_TIME to be completely independent controls
    * Buffer support requires constant scan_type.realbits per-channel

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

    Crestez Dan Leonard
     
  • This is exposed as an output channel with "led" as an extend_name.

    Other sensors also have support for controlling an external LED. It's
    not clear that simply exposing an undecorated output channel is the
    correct approach.

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

    Crestez Dan Leonard
     
  • The proximity sensor relies on sending pulses to an external IR led and
    it is disabled by default on powerup. The driver will enable it with a
    default power setting.

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

    Crestez Dan Leonard
     
  • This just adds support for reporting illuminance with default settings.

    Important default registers are written on probe because the device
    otherwise lacks a reset function.

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

    Crestez Dan Leonard
     
  • Signed-off-by: Tiberiu Breana
    Signed-off-by: Jonathan Cameron

    Tiberiu Breana
     
  • Add basic support for the Aosong AM2315 relative humidity
    and ambient temperature sensor.
    Includes support for raw readings and ACPI detection.

    Datasheet:
    http://www.aosong.com/asp_bin/Products/en/AM2315.pdf

    Signed-off-by: Tiberiu Breana
    Signed-off-by: Jonathan Cameron

    Tiberiu Breana
     
  • Add support for HopeRF pressure and temperature sensor.

    This device uses two fixed I2C addresses, one for storing
    calibration coefficients and another for accessing the ADC.

    Signed-off-by: Marek Vasut
    Cc: Matt Ranostay
    Cc: Jonathan Cameron
    Signed-off-by: Jonathan Cameron

    Marek Vasut
     
  • This device has an identical interface to other supported sensors and the patch
    only adds IDs.

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

    Crestez Dan Leonard
     
  • It causes a static checker warning if we use "buf" on the failure path
    so move that inside the if statement.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Jonathan Cameron

    Dan Carpenter
     
  • Add a new rotation matrix sysfs attribute compliant with IIO core
    mounting matrix API.
    Matrix is retrieved from "in_anglvel_mount_matrix" and
    "in_accel_mount_matrix" sysfs attributes. It is declared into mpu6050 DTS
    entry as a "mount-matrix" property.

    Old interface is kept for backward userspace compatibility and may be
    retrieved from legacy platform_data mechanism only.

    Signed-off-by: Gregor Boirie
    Acked-by: Rob Herring
    Signed-off-by: Jonathan Cameron

    Gregor Boirie
     
  • Expose a rotation matrix to indicate userspace the chip orientation with
    respect to the overall hardware system.
    Matrix is retrieved from "in_mount_matrix". It is declared into ak8975 DTS
    entry as a "mount-matrix" property.

    Signed-off-by: Gregor Boirie
    Acked-by: Rob Herring
    Signed-off-by: Jonathan Cameron

    Gregor Boirie
     
  • Expose a rotation matrix to indicate userspace the chip placement with
    respect to the overall hardware system. This is needed to adjust
    coordinates sampled from a sensor chip when its position deviates from the
    main hardware system.

    Final coordinates computation is delegated to userspace since:
    * computation may involve floating point arithmetics ;
    * it allows an application to combine adjustments with arbitrary
    transformations.

    This 3 dimentional space rotation matrix is expressed as 3x3 array of
    strings to support floating point numbers. It may be retrieved from a
    "[_][_]mount_matrix" sysfs attribute file. It is declared into a
    device / driver specific DTS property or platform data.

    Signed-off-by: Gregor Boirie
    Signed-off-by: Jonathan Cameron

    Gregor Boirie
     

22 Apr, 2016

1 commit


20 Apr, 2016

9 commits

  • Driver includes struct regmap and struct device in its global data.
    Remove the struct device and use regmap API to retrieve device info.

    Patch created using Coccinelle plus manual edits.

    Signed-off-by: Alison Schofield
    Reviewed-by: Srinivas Pandruvada
    Signed-off-by: Jonathan Cameron

    Alison Schofield
     
  • Driver includes struct regmap and struct device in its global data.
    Remove the struct device and use regmap API to retrieve device info.

    Patch created using Coccinelle plus manual edits.

    Signed-off-by: Alison Schofield
    Reviewed-by: Irina Tirdea
    Reviewed-by: Srinivas Pandruvada
    Signed-off-by: Jonathan Cameron

    Alison Schofield
     
  • ultraviolet (UV) light sensor with I2C interface with a peak
    sensitivity at 355 nm

    strangely, chip uses two addresses 0x38 and 0x39 for LSB and
    MSB data, resp.

    datasheet: http://www.vishay.com/docs/84277/veml6070.pdf

    Signed-off-by: Peter Meerwald-Stadler
    Signed-off-by: Jonathan Cameron

    Peter Meerwald-Stadler
     
  • Some of kernel driver uses the IIO framework to get the sensor
    value via ADC or IIO HW driver. The client driver get iio channel
    by iio_channel_get_all() and release it by calling
    iio_channel_release_all().

    Add resource managed version (devm_*) of these APIs so that if client
    calls the devm_iio_channel_get_all() then it need not to release it
    explicitly, it can be done by managed device framework when driver
    get un-binded.

    This reduces the code in error path and also need of .remove callback in
    some cases.

    Signed-off-by: Laxman Dewangan
    Signed-off-by: Jonathan Cameron

    Laxman Dewangan
     
  • Some of kernel driver uses the IIO framework to get the sensor
    value via ADC or IIO HW driver. The client driver get iio channel
    by iio_channel_get() and release it by calling iio_channel_release().

    Add resource managed version (devm_*) of these APIs so that if client
    calls the devm_iio_channel_get() then it need not to release it explicitly,
    it can be done by managed device framework when driver get un-binded.

    This reduces the code in error path and also need of .remove callback in
    some cases.

    Signed-off-by: Laxman Dewangan
    Signed-off-by: Jonathan Cameron

    Laxman Dewangan
     
  • Some types of ST Sensors can be connected to the same IRQ line
    as other peripherals using open drain. Add a device tree binding
    and a sensor data property to flip the right bit in the interrupt
    control register to enable open drain mode on the INT line.

    If the line is set to be open drain, also tag on IRQF_SHARED
    to the IRQ flags when requesting the interrupt, as the whole
    point of using open drain interrupt lines is to share them with
    more than one peripheral (wire-or).

    Cc: devicetree@vger.kernel.org
    Cc: Giuseppe Barba
    Cc: Denis Ciocca
    Acked-by: Rob Herring
    Signed-off-by: Linus Walleij
    Signed-off-by: Jonathan Cameron

    Linus Walleij
     
  • This makes all ST sensor drivers check that they actually have
    new data available for the requested channel(s) before claiming
    an IRQ, by reading the status register (which is conveniently
    the same for all ST sensors) and check that the channel has new
    data before proceeding to read it and fill the buffer.

    This way sensors can share an interrupt line: it can be flaged
    as shared and then the sensor that did not fire will return
    NO_IRQ, and the sensor that fired will handle the IRQ and
    return IRQ_HANDLED.

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

    Linus Walleij
     
  • 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