31 Aug, 2018

1 commit

  • a) rename to 'put' instead of 'release' to match 'get' when obtaining
    the buffer
    b) change the argument order to have the buffer as first argument
    c) add a new argument telling the function if the message was
    transferred. This allows the function to be used also in cases
    where setting up DMA failed, so the buffer needs to be freed without
    syncing to the message buffer.

    Also convert the only user.

    Signed-off-by: Wolfram Sang
    Reviewed-by: Niklas Söderlund
    Signed-off-by: Wolfram Sang

    Wolfram Sang
     

24 Aug, 2018

1 commit


04 Jul, 2018

4 commits


14 Jun, 2018

1 commit

  • Pull i2c updates from Wolfram Sang:

    - mainly feature additions to drivers (stm32f7, qup, xlp9xx, mlxcpld, ...)

    - conversion to use the i2c_8bit_addr_from_msg macro consistently

    - move includes to platform_data

    - core updates to allow the (still in review) I3C subsystem to connect

    - and the regular share of smaller driver updates

    * 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (68 commits)
    i2c: qup: fix building without CONFIG_ACPI
    i2c: tegra: Remove suspend-resume
    i2c: imx-lpi2c: Switch to SPDX identifier
    i2c: mxs: Switch to SPDX identifier
    i2c: busses: make use of i2c_8bit_addr_from_msg
    i2c: algos: make use of i2c_8bit_addr_from_msg
    i2c: rcar: document R8A77980 bindings
    i2c: qup: Add command-line parameter to override SCL frequency
    i2c: qup: Correct duty cycle for FM and FM+
    i2c: qup: Add support for Fast Mode Plus
    i2c: qup: add probe path for Centriq ACPI devices
    i2c: robotfuzz-osif: drop pointless test
    i2c: robotfuzz-osif: remove pointless local variable
    i2c: rk3x: Don't print visible virtual mapping MMIO address
    i2c: opal: don't check number of messages in the driver
    i2c: ibm_iic: don't check number of messages in the driver
    i2c: imx: Switch to SPDX identifier
    i2c: mux: pca954x: merge calls to of_match_device and of_device_get_match_data
    i2c: mux: demux-pinctrl: use proper parent device for demux adapter
    i2c: mux: improve error message for failed symlink
    ...

    Linus Torvalds
     

30 May, 2018

1 commit


17 May, 2018

3 commits


30 Apr, 2018

1 commit


18 Apr, 2018

3 commits


21 Feb, 2018

1 commit


05 Feb, 2018

1 commit

  • Pull i2c updates from Wolfram Sang:
    "I2C has the following changes for you:

    - new flag to mark DMA safe buffers in i2c_msg. Also, some
    infrastructure around it. And docs.

    - huge refactoring of the at24 driver led by the new maintainer
    Bartosz

    - update I2C bus recovery to send STOP after recovery

    - conversion from gpio to gpiod for I2C bus recovery

    - adding a fault-injector to the i2c-gpio driver

    - lots of small driver improvements, and bigger ones to
    i2c-sh_mobile"

    * 'i2c/for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (99 commits)
    i2c: mv64xxx: Add myself as maintainer for this driver
    i2c: mv64xxx: Fix clock resource by adding an optional bus clock
    i2c: mv64xxx: Remove useless test before clk_disable_unprepare
    i2c: mxs: use true and false for boolean values
    i2c: meson: update doc description to fix build warnings
    i2c: meson: add configurable divider factors
    dt-bindings: i2c: update documentation for the Meson-AXG
    i2c: imx-lpi2c: add runtime pm support
    i2c: rcar: fix some trivial typos in comments
    i2c: davinci: fix the cpufreq transition
    i2c: rk3x: add proper kerneldoc header
    i2c: rk3x: account for const type of of_device_id.data
    i2c: acorn: remove outdated path from file header
    i2c: acorn: add MODULE_LICENSE tag
    i2c: rcar: implement bus recovery
    i2c: send STOP after successful bus recovery
    i2c: ensure SDA is released in recovery if SDA is controllable
    i2c: add 'set_sda' to bus_recovery_info
    i2c: add identifier in declarations for i2c_bus_recovery
    i2c: make kerneldoc about bus recovery more precise
    ...

    Linus Torvalds
     

22 Dec, 2017

1 commit

  • `Documentation/i2c/dev-interface` gives examples for accessing i2c from
    userspace.

    There's a note that warns developers about the two `i2c-dev.h` header
    files which were shipped with the kernel and i2c-tools separately.

    However, following i2c-tools commits suggest that the header files are now
    identical (in functionality) and `i2c_*` helper functions are now defined
    in a separate header called `i2c/smbus.h`, which is distributed with
    i2c-tools:

    commit 652619121974 ("Minimize differences with kernel flavor")
    commit 93caf007f4cb ("Move SMBus helper functions to include/i2c/smbus.h")

    Thus, I've converted the warning paragraph into a historical note and
    updated the suggested header files.

    Signed-off-by: Cengiz Can
    Cc: Wolfram Sang
    Signed-off-by: Jonathan Corbet

    Cengiz C
     

04 Dec, 2017

2 commits


05 Oct, 2017

1 commit


22 Aug, 2017

1 commit


19 Jun, 2017

1 commit


01 Jun, 2017

1 commit


10 Feb, 2017

2 commits


16 Dec, 2016

1 commit

  • Pull i2c updates from Wolfram Sang:

    - the first series of making i2c_device_id optional instead of
    mandatory (in favor of alternatives like of_device_id).

    This involves adding a new probe callback (probe_new) which removes
    some peculiarities I2C had for a long time now. The new probe is
    matching the other subsystems now and the old one will be removed
    once all users are converted. It is expected to take a while but
    there is ongoing interest in that.

    - SMBus Host Notify introduced 4.9 got refactored. They are now using
    interrupts instead of the alert callback which solves multiple
    issues.

    - new drivers for iMX LowPower I2C, Mellanox CPLD and its I2C mux

    - significant refactoring for bcm2835 driver

    - the usual set of driver updates and improvements

    * 'i2c/for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (46 commits)
    i2c: fsl-lpi2c: read lpi2c fifo size in probe()
    i2c: octeon: thunderx: Remove double-check after interrupt
    i2c: octeon: thunderx: TWSI software reset in recovery
    i2c: cadence: Allow Cadence I2C to be selected for Cadence Xtensa CPUs
    i2c: sh_mobile: Add per-Generation fallback bindings
    i2c: rcar: Add per-Generation fallback bindings
    i2c: imx-lpi2c: add low power i2c bus driver
    dt-bindings: i2c: imx-lpi2c: add devicetree bindings
    i2c: designware-pcidrv: Add 10bit address feature to medfield/merrifield
    i2c: pxa: Add support for the I2C units found in Armada 3700
    i2c: pxa: Add definition of fast and high speed modes via the regs layout
    dt-bindings: i2c: pxa: Update the documentation for the Armada 3700
    i2c: qup: support SMBus block read
    i2c: qup: add ACPI support
    i2c: designware: Consolidate default functionality bits
    i2c: i2c-mux-gpio: update mux with gpiod_set_array_value_cansleep
    i2c: mux: pca954x: Add ACPI support for pca954x
    i2c: use an IRQ to report Host Notify events, not alert
    i2c: i801: remove SMBNTFDDAT reads as they always seem to return 0
    i2c: i801: use the BIT() macro for FEATURES_* also
    ...

    Linus Torvalds
     

24 Nov, 2016

2 commits

  • The current SMBus Host Notify implementation relies on .alert() to
    relay its notifications. However, the use cases where SMBus Host
    Notify is needed currently is to signal data ready on touchpads.

    This is closer to an IRQ than a custom API through .alert().
    Given that the 2 touchpad manufacturers (Synaptics and Elan) that
    use SMBus Host Notify don't put any data in the SMBus payload, the
    concept actually matches one to one.

    Benefits are multiple:
    - simpler code and API: the client will just have an IRQ, and
    nothing needs to be added in the adapter beside internally
    enabling it.
    - no more specific workqueue, the threading is handled by IRQ core
    directly (when required)
    - no more races when removing the device (the drivers are already
    required to disable irq on remove)
    - simpler handling for drivers: use plain regular IRQs
    - no more dependency on i2c-smbus for i2c-i801 (and any other adapter)
    - the IRQ domain is created automatically when the adapter exports
    the Host Notify capability
    - the IRQ are assign only if ACPI, OF and the caller did not assign
    one already
    - the domain is automatically destroyed on remove
    - fewer lines of code (minus 20, yeah!)

    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Wolfram Sang

    Benjamin Tissoires
     
  • Device driver for Mellanox I2C controller logic, implemented in Lattice
    CPLD device.
    Device supports:
    - Master mode
    - One physical bus
    - Polling mode

    The Kconfig currently controlling compilation of this code is:
    drivers/i2c/busses/Kconfig:config I2C_MLXCPLD

    Signed-off-by: Michael Shych
    Signed-off-by: Vadim Pasternak
    Reviewed-by: Jiri Pirko
    Reviewed-by: Vladimir Zapolskiy
    Signed-off-by: Wolfram Sang

    Vadim Pasternak
     

11 Nov, 2016

1 commit


08 Sep, 2016

1 commit


24 Jul, 2016

2 commits


17 Jun, 2016

1 commit

  • SMBus Host Notify allows a slave device to act as a master on a bus to
    notify the host of an interrupt. On Intel chipsets, the functionality
    is directly implemented in the firmware. We just need to export a
    function to call .alert() on the proper device driver.

    i2c_handle_smbus_host_notify() behaves like i2c_handle_smbus_alert().
    When called, it schedules a task that will be able to sleep to go through
    the list of devices attached to the adapter.

    The current implementation allows one Host Notification to be scheduled
    while an other is running.

    Tested-by: Andrew Duggan
    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Wolfram Sang

    Benjamin Tissoires
     

05 May, 2016

4 commits

  • 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 regmap overrides
    that makes the i2c accesses unlocked and use plain old regmap
    accesses. This also removes the need for the regmap wrappers used by
    rtl2832_sdr, so deconvolute the code further and provide the regmap
    handle directly instead of the wrapper functions.

    Tested-by: Antti Palosaari
    Signed-off-by: Peter Rosin
    Signed-off-by: Wolfram Sang

    Peter Rosin
     
  • 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
    i2c accesses unlocked. But add a mutex so that firmware commands are
    still serialized.

    Signed-off-by: Antti Palosaari
    Signed-off-by: Peter Rosin
    Signed-off-by: Wolfram Sang

    Antti Palosaari
     
  • 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
     
  • Signed-off-by: Peter Rosin
    Signed-off-by: Wolfram Sang

    Peter Rosin
     

11 Feb, 2016

1 commit


20 Nov, 2015

1 commit