summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/i2c/i2c.txt
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'tegra-for-4.8-i2c' of ↵Wolfram Sang2016-10-111-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * dt-bindings: i2c: Add support for 'i2c-bus' subnodeJon Hunter2016-06-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | i2c: Add generic support passing secondary devices addressesJean-Michel Hautbois2016-06-131-0/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* i2c: document binding for multi-master caseWolfram Sang2016-01-021-0/+5
| | | | | | | | | | 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>
* i2c: document generic DT bindings for timing parametersWolfram Sang2015-12-141-5/+26
| | | | | | | | | | | | 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>
* i2c: allow specifying separate wakeup interrupt in device treeDmitry Torokhov2015-08-261-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* i2c: dt: describe generic bindingsWolfram Sang2015-08-241-0/+33
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>