i2c: designware: Do not require clock when SSCN and FFCN are provided
authorSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Mon, 4 Jan 2016 15:17:35 +0000 (09:17 -0600)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 10 Jan 2016 08:36:52 +0000 (09:36 +0100)
commitb33af11de236fd6e25f3716182f008039ec68e93
treeb85681f53b9f21f9074bf1844a820e7ae06492b7
parentfa5b0bfa26d54b9b94e5c2ff9c826d1e12d6ad3a
i2c: designware: Do not require clock when SSCN and FFCN are provided

The current driver uses input clock source frequency to calculate
values for [SS|FS]_[HC|LC] registers. However, when booting ACPI, we do not
currently have a good way to provide the frequency information.
Instead, we can leverage the SSCN and FFCN ACPI methods, which can be used
to directly provide these values. So, the clock information should
no longer be required during probing.

However, since clk can be invalid, additional checks must be done where
we are making use of it.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Tested-by: Loc Ho <lho@apm.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-designware-core.c
drivers/i2c/busses/i2c-designware-platdrv.c