linux-stable/drivers/i2c
Serge Semin 93e6c2cbcd i2c: designware: Use standard optional ref clock implementation
[ Upstream commit 27071b5cbc ]

Even though the DW I2C controller reference clock source is requested by
the method devm_clk_get() with non-optional clock requirement the way the
clock handler is used afterwards has a pure optional clock semantic
(though in some circumstances we can get a warning about the clock missing
printed in the system console). There is no point in reimplementing that
functionality seeing the kernel clock framework already supports the
optional interface from scratch. Thus let's convert the platform driver to
using it.

Note by providing this commit we get to fix two problems. The first one
was introduced in commit c62ebb3d5f ("i2c: designware: Add support for
an interface clock"). It causes not having the interface clock (pclk)
enabled/disabled in case if the reference clock isn't provided. The second
problem was first introduced in commit b33af11de2 ("i2c: designware: Do
not require clock when SSCN and FFCN are provided"). Since that
modification the deferred probe procedure has been unsupported in case if
the interface clock isn't ready.

Fixes: c62ebb3d5f ("i2c: designware: Add support for an interface clock")
Fixes: b33af11de2 ("i2c: designware: Do not require clock when SSCN and FFCN are provided")
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-22 14:22:02 +02:00
..
algos i2c: algo: bit: use new macro to specifiy capabilities 2021-01-22 09:59:21 +01:00
busses i2c: designware: Use standard optional ref clock implementation 2022-06-22 14:22:02 +02:00
muxes i2c: mux: demux-pinctrl: do not deactivate a master that is not active 2022-04-08 14:23:42 +02:00
Kconfig i2c: add slave testunit driver 2020-09-21 11:02:17 +02:00
Makefile i2c: add slave testunit driver 2020-09-21 11:02:17 +02:00
i2c-boardinfo.c i2c: Remove support for dangling device properties 2021-04-10 21:43:02 +02:00
i2c-core-acpi.c i2c: acpi: fix resource leak in reconfiguration device addition 2021-10-02 08:38:43 +02:00
i2c-core-base.c Revert "i2c: core: support bus regulator controlling in adapter" 2022-01-11 15:35:15 +01:00
i2c-core-of.c i2c: use my kernel.org address from now on 2020-05-05 16:29:09 +02:00
i2c-core-slave.c i2c: slave: add sanity check when unregistering 2020-07-28 18:37:17 +02:00
i2c-core-smbus.c i2c: core-smbus: Expose PEC calculate function for generic use 2021-06-25 17:09:34 +02:00
i2c-core.h i2c: acpi: Remove dead code, i.e. i2c_acpi_match_device() 2020-08-25 09:22:09 +02:00
i2c-dev.c i2c: dev: check return value when calling dev_set_name() 2022-04-20 09:34:20 +02:00
i2c-mux.c
i2c-slave-eeprom.c i2c: busses: Use fallthrough pseudo-keyword 2020-07-23 22:04:08 +02:00
i2c-slave-testunit.c i2c: testunit: add support for block process calls 2021-02-12 11:11:04 +01:00
i2c-smbus.c i2c: smbus: add core function handling SMBus host-notify 2020-09-09 10:38:28 +02:00
i2c-stub.c i2c: stub: remove definition of DEBUG 2021-01-17 13:00:10 +01:00