1
0
Fork 0
Commit Graph

10 Commits (0c7244209588630a9b45e52490ef1390e04499a6)

Author SHA1 Message Date
sim manseop 483a5d22bc dt-bindings: i2c: Fix SMBus typo
Fix typo 'SMbus' to 'SMBus'

Signed-off-by: sim manseop <semtax33@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-09-26 18:02:41 -05:00
Phil Reid 69d17246ab i2c: i2c-smbus: add of_i2c_setup_smbus_alert
This commit adds of_i2c_setup_smbus_alert which allows the smbalert
driver to be attached to an i2c adapter via the device tree.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2017-10-28 23:42:47 +02:00
Dmitry Torokhov 331c342552 i2c: do not enable fall back to Host Notify by default
Falling back unconditionally to HostNotify as primary client's interrupt
breaks some drivers which alter their functionality depending on whether
interrupt is present or not, so let's introduce a board flag telling I2C
core explicitly if we want wired interrupt or HostNotify-based one:
I2C_CLIENT_HOST_NOTIFY.

For DT-based systems we introduce "host-notify" property that we convert
to I2C_CLIENT_HOST_NOTIFY board flag.

Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2017-01-12 20:06:15 +01:00
Wolfram Sang b2edcdae3d i2c: 'i2c-bus' node support for v4.8-rc1
This includes the device tree binding and I2C core changes to support
 the i2c-bus subnode that I2C masters can use to describe their slaves
 in a separate namespace and therefore avoid clashing with potentially
 other subnodes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXdn2gAAoJEN0jrNd/PrOhe94P/j+1I3iGpHcU/mNmCaqgit9z
 TLMehmgglf9kj0iXpYoBjYU/XxzRKBfOaceRrPj16V9GbhiKGcHX0fhH06zydczS
 ZPS5FBNGqH9C6WYe8oszTBWz5skulSQba6VUwG01MnT2Nv7z7ONcHB2HPjM6TKob
 D0dxN4U3BlfTCGd/FxJariork2xY8o8mKZN7pntkJ+hQNeengCXXoPaY2bGSFH4K
 omfUal8/tdPZAruMaA/Dmvu9jBv0RkVSQzNnHXNkGzAw3fAsYm1UzcpG4VNhgeyj
 XNFiedIFOls8KW2Xd0LdPAzpyafS4w4gBj2SOol0xpUFhA9CchZCzci7DI2NSj9A
 VpiZzBPt6I+zv9c2HdzRqjH2PZTRoy0c9/szCBWyabZ/tST3SWk/tBY5SoLYpmL7
 Jq/sOWtegpGvj2XRw8jhmxXVjXYzqzAbyo6SrINZs8ElFrWZxTgsVHmq2SVE5qvh
 DnIpr7y/gfKyqAynm0QshNCo5kauvSX4Pa55MfEB/7GfkqhvYzjg+nlplut9woSG
 +JN3dWS5tts9pqzHWVL4YY/S11Dx+pT6ZPkmprjMAN+ghxNWjEhA57q7FxAHTU83
 BsermHINCpCcN/zyLGDXSaJbJq9hH5LLCHA23ZfnWtOFC5zikp1TG325A/2WMnwb
 ovKSLXRScyVqliffmO8G
 =+0Q/
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-4.8-i2c' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into i2c/for-next

[wsa: fell through the cracks, applied to 4.9 now]

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

i2c: 'i2c-bus' node support for v4.8-rc1

This includes the device tree binding and I2C core changes to support
the i2c-bus subnode that I2C masters can use to describe their slaves
in a separate namespace and therefore avoid clashing with potentially
other subnodes.
2016-10-11 23:37:26 +02:00
Jon Hunter 98b0048845 dt-bindings: i2c: Add support for 'i2c-bus' subnode
The I2C driver core for boards using device-tree assumes any subnode of
an I2C adapter in the device-tree blob is an I2C slave device. Although
this makes complete sense, some I2C adapters may have subnodes which
are not I2C slaves but subnodes presenting other features. For example
some Tegra devices have an I2C interface which may share its pins with
other devices. In order to share these pins using the pinctrl framework,
it is necessary to add subnodes to the I2C device node that represent
these pins.

To allow I2C adapters to have non-I2C specific subnodes in device-tree
that are not parsed by the I2C driver core, add support for an optional
'i2c-bus' subnode where I2C slaves can be placed. If the 'i2c-bus'
subnode is present then all I2C slaves must be placed under this
subnode.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2016-06-30 11:01:13 +02:00
Jean-Michel Hautbois 0f614d834b i2c: Add generic support passing secondary devices addresses
Some I2C devices have multiple addresses assigned, for example each address
corresponding to a different internal register map page of the device.
So far drivers which need support for this have handled this with a driver
specific and non-generic implementation, e.g. passing the additional address
via platform data.

This patch provides a new helper function called i2c_new_secondary_device()
which is intended to provide a generic way to get the secondary address
as well as instantiate a struct i2c_client for the secondary address.

The function expects a pointer to the primary i2c_client, a name
for the secondary address and an optional default address. The name is used
as a handle to specify which secondary address to get.

The default address is used as a fallback in case no secondary address
was explicitly specified. In case no secondary address and no default
address were specified the function returns NULL.

For now the function only supports look-up of the secondary address
from devicetree, but it can be extended in the future
to for example support board files and/or ACPI.

Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@veo-labs.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2016-06-13 22:32:09 +02:00
Wolfram Sang 0c739738a0 i2c: document binding for multi-master case
We need this binding because some I2C master drivers will need to adapt
their PM settings for the arbitration circuitry.

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2016-01-02 22:10:32 +01:00
Wolfram Sang 99b809d7bd i2c: document generic DT bindings for timing parameters
Also, sort the properties alphabetically and make indentation
consistent. Wording largely taken from i2c-rk3x.txt, thanks guys!

Only "i2c-scl-internal-delay-ns" is new, the rest is used by two drivers
already and was documented in their driver binding documentation.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2015-12-14 10:39:01 +01:00
Dmitry Torokhov 3fffd12839 i2c: allow specifying separate wakeup interrupt in device tree
Instead of having each i2c driver individually parse device tree data in
case it or platform supports separate wakeup interrupt, and handle
enabling and disabling wakeup interrupts in their power management
routines, let's have i2c core do that for us.

Platforms wishing to specify separate wakeup interrupt for the device
should use named interrupt syntax in their DTSes:

	interrupt-parent = <&intc1>;
	interrupts = <5 0>, <6 0>;
	interrupt-names = "irq", "wakeup";

This patch is inspired by work done by Vignesh R <vigneshr@ti.com> for
pixcir_i2c_ts driver.

Note that the original code tried to preserve any existing wakeup
settings from userspace but was not quite right in that regard:
it would preserve wakeup flag set by userspace upon driver rebinding;
but it would re-arm the wakeup flag if it was disabled by userspace.

We think that resetting the flag upon re-binding the driver is proper
behavior as the driver is responsible for setting up and handling
wakeups.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Vignesh R <vigneshr@ti.com>
[wsa: updated the commit message]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2015-08-26 18:47:58 +02:00
Wolfram Sang 7a59b00a09 i2c: dt: describe generic bindings
Start a new file which describes the generic bindings used for I2C with
device tree. So we have a central place to look for them, increase
visibility of them, and hopefully reduce the amount of custom properties
introduced.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2015-08-24 14:05:17 +02:00