OSDN Git Service

Bluetooth: hci_bcm: Use "txco" and "extclk" to get clock reference
authorChen-Yu Tsai <wens@csie.org>
Mon, 17 Dec 2018 04:04:41 +0000 (12:04 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 18 Dec 2018 23:28:38 +0000 (00:28 +0100)
commit55dbfcd0f621a745acfd8e3221c41be181b5b128
treececfbdded597379f821a27ca4f2de808b6fc8f74
parent8c08947b7c4f4496e7c23be970121280fcb6cbf5
Bluetooth: hci_bcm: Use "txco" and "extclk" to get clock reference

Originally the device tree binding only specified one clock reference,
with the name "extclk". The driver simply retrieves the clock without
bothering to specify a name.

Since we added a second clock to the binding, we need to fetch the
clocks by name now. First we try the new name "txco", then fall back
to the old name "extclk", and finally try retrieving a clock without
using any name, to cover any instances where a bad device tree or
firmware worked by accident.

In the last case, we should take care that we don't get the same
clock twice when we add support for the "lpo" clock.

Tested-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c