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
24 Aug, 2018
1 commit
-
The old @sunsite.dk address is no longer active, so update the references.
Signed-off-by: Peter Korsgaard
Signed-off-by: Wolfram Sang
04 Jul, 2018
4 commits
-
Intel Ice Lake has the same SMBus host controller than Intel Cannon
Lake. Add the PCI ID to the drivers list of supported devices.Signed-off-by: Mika Westerberg
[jarkko.nikula@linux.intel.com: Add entries to Documentation and Kconfig]
Signed-off-by: Jarkko Nikula
Reviewed-by: Jean Delvare
Signed-off-by: Wolfram Sang -
Make list of supported chipsets a little bit shorter by consolidating
names that belong to the same family.Signed-off-by: Jarkko Nikula
Reviewed-by: Jean Delvare
Signed-off-by: Wolfram Sang -
Add another injector for an incomplete transfer. As mentioned in the
docs, this one is important to check bus recovery algorithms with it.
Otherwise random data may be sent to devices!Signed-off-by: Wolfram Sang
Signed-off-by: Wolfram Sang -
Make the incomplete_transfer routine reusable, so we can add other test
cases with different patterns later. Prepare the docs for that, too.Signed-off-by: Wolfram Sang
Signed-off-by: Wolfram Sang
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
...
30 May, 2018
1 commit
-
The URL is broken. This patch fixes it.
Signed-off-by: Federico Vaga
[wsa: shortened the URL a bit]
Signed-off-by: Wolfram Sang
17 May, 2018
3 commits
-
This header only contains platform_data. Move it to the proper directory.
Signed-off-by: Wolfram Sang
Acked-by: Lee Jones -
This header only contains platform_data. Move it to the proper directory.
Signed-off-by: Wolfram Sang
Acked-by: Peter Korsgaard
30 Apr, 2018
1 commit
-
It adds capability register description to documentation.
Signed-off-by: Michael Shych
Signed-off-by: Wolfram Sang
18 Apr, 2018
3 commits
-
The example I2C code is rewritten to adopt the preferred kernel block
commenting style.Signed-off-by: Sam Hansen
Signed-off-by: Wolfram Sang -
Currently, Documentation/i2c/dev-interface describes the use of
i2c_smbus_* helper routines as static inlined functions provided by
linux/i2c-dev.h. Work has been done to refactor the linux/i2c-dev.h file
in the i2c-tools project out into its own library. As a result, these
docs have become stale.This patch corrects the discrepancy and directs the reader to the
i2c-tools project for more information.Signed-off-by: Sam Hansen
Signed-off-by: Wolfram Sang -
This strips trailing whitespace in Documentation/i2c/dev-interface.
Signed-off-by: Sam Hansen
Signed-off-by: Wolfram Sang
21 Feb, 2018
1 commit
-
Commits adding PCI IDs for Intel Braswell and Kaby Lake PCH-H lacked the
respective Kconfig and Documentation/i2c/busses/i2c-i801 change. Add
them now.Signed-off-by: Jarkko Nikula
Signed-off-by: Wolfram Sang
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
...
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
04 Dec, 2017
2 commits
-
Reviewed-by: Jonathan Cameron
Reviewed-by: Mauro Carvalho Chehab
Signed-off-by: Wolfram Sang
Signed-off-by: Wolfram Sang -
Add fault injection capabilities to the i2c-gpio driver. When connected
to another I2C bus, it can create unusual states which the other I2C bus
master driver needs to handle. Only for debugging!Signed-off-by: Wolfram Sang
05 Oct, 2017
1 commit
-
Add PCI ID for Intel Cedar Fork PCH.
Signed-off-by: Jarkko Nikula
Reviewed-by: Jean Delvare
Signed-off-by: Wolfram Sang
22 Aug, 2017
1 commit
-
Specifically mention what drivers are mux-locked and parent-locked.
Signed-off-by: Peter Rosin
19 Jun, 2017
1 commit
-
Added SMBUS PCI Ids for SMBUS for Cannon Lake PCH.
Signed-off-by: Srinivas Pandruvada
[jarkko.nikula@linux.intel.com: Add entries to Documentation and Kconfig.
Cover Cannon Lake-H too]
Signed-off-by: Jarkko Nikula
Signed-off-by: Wolfram Sang
01 Jun, 2017
1 commit
-
The I2C core files were renamed, adapt the textfile to it.
Reviewed-by: Andy Shevchenko
Signed-off-by: Wolfram Sang
10 Feb, 2017
2 commits
-
Intel Gemini Lake has the same SMBus host controller than Intel Broxton.
Signed-off-by: Mika Westerberg
Signed-off-by: Jean Delvare
Signed-off-by: Wolfram Sang -
The rename did the wrong thing for this documentation file all those
years ago. Fix that as well as the neglected rename of the platform
data structure.Fixes: e7065e20d9a6 ("i2c: Rename last mux driver to standard pattern")
Signed-off-by: Peter Rosin
Signed-off-by: Wolfram Sang
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
...
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 -
Device driver for Mellanox I2C controller logic, implemented in Lattice
CPLD device.
Device supports:
- Master mode
- One physical bus
- Polling modeThe Kconfig currently controlling compilation of this code is:
drivers/i2c/busses/Kconfig:config I2C_MLXCPLDSigned-off-by: Michael Shych
Signed-off-by: Vadim Pasternak
Reviewed-by: Jiri Pirko
Reviewed-by: Vladimir Zapolskiy
Signed-off-by: Wolfram Sang
11 Nov, 2016
1 commit
-
Signed-off-by: Peter Rosin
Signed-off-by: Wolfram Sang
08 Sep, 2016
1 commit
-
Make it clear that adding slave support shall not disable master
functionality. We can have both, so we should.Signed-off-by: Wolfram Sang
24 Jul, 2016
2 commits
-
pm_runtime_forbid was the wrong knob, this is the better one.
Signed-off-by: Wolfram Sang
-
Signed-off-by: Wolfram Sang
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
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 -
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 -
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 -
Signed-off-by: Peter Rosin
Signed-off-by: Wolfram Sang
11 Feb, 2016
1 commit
-
This path fix spelling typos found in Documentation/i2c.
Signed-off-by: Masanari Iida
Signed-off-by: Jonathan Corbet
20 Nov, 2015
1 commit
-
Adding Intel codename Lewisburg platform device IDs for SMBus.
Signed-off-by: Alexandra Yates
Reviewed-by: Jean Delvare
Signed-off-by: Wolfram Sang