]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
i2c: core: Provide generic definitions for bus frequencies
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 24 Mar 2020 12:32:11 +0000 (14:32 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 24 Mar 2020 20:58:51 +0000 (21:58 +0100)
commite6282fc6f889debe4d6eb6332dc6e49739faa5cb
treefcc3c4318f15e244889fddf3bcd93029f39e3ca4
parente7c69fd3cc534440491c473ec630a085d000d18f
i2c: core: Provide generic definitions for bus frequencies

There are few maximum bus frequencies being used in the I²C core code.
Provide generic definitions for bus frequencies and use them in the core.

The drivers may use predefined constants where it is appropriate.
Some of them are already using these under slightly different names.
We will convert them later to use newly introduced defines.

Note, the name of modes are chosen to follow well established naming
scheme [1].

These definitions will also help to avoid typos in the numbers that
may lead to subtle errors.

[1]: https://en.wikipedia.org/wiki/I%C2%B2C#Differences_between_modes

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core-acpi.c
drivers/i2c/i2c-core-base.c
include/linux/i2c.h