OSDN Git Service

i2c: xlp9xx: Get clock frequency with clk API
authorJayachandran C <jnair@caviumnetworks.com>
Tue, 10 Oct 2017 06:27:55 +0000 (11:57 +0530)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 17 Oct 2017 21:53:16 +0000 (23:53 +0200)
commitc347b8fc22b21899154cc153a4951aaf226b4e1a
tree2dd182ae80e703a6b3b53889099c0beab3969e70
parent1977dbefe92c0baefefb62927df6e3908af8c453
i2c: xlp9xx: Get clock frequency with clk API

Get the input clock frequency to the controller from the linux clk
API, if it is available. This allows us to pass in the block input
frequency either from ACPI (using APD) or from device tree.

The old hardcoded frequency is used as default for backwards compatibility.

Signed-off-by: Jayachandran C <jnair@caviumnetworks.com>
Signed-off-by: Kamlakant Patel <kamlakant.patel@cavium.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-xlp9xx.c