]> git.baikalelectronics.ru Git - kernel.git/commit
dt-bindings: bluetooth: broadcom: Fix clocks check
authorMaxime Ripard <maxime@cerno.tech>
Fri, 24 Sep 2021 07:27:53 +0000 (09:27 +0200)
committerRob Herring <robh@kernel.org>
Tue, 12 Oct 2021 14:05:34 +0000 (09:05 -0500)
commit4202e8737cb358d4cceb850d17fd7b6eafa19634
tree95c3598ffbe45fff26f1a52305ed77ff3578c55c
parentf4ed34df2f449c2e927f3ce4eca5f40b68d54ca9
dt-bindings: bluetooth: broadcom: Fix clocks check

The original binding was mentioning that valid values for the clocks and
clock-names property were one or two clocks from extclk, txco and lpo,
with extclk being deprecated in favor of txco.

However, the current binding lists a valid array as extclk, txco and
lpo, with either one or two items.

While this looks similar, it actually enforces that all the device trees
use either ["extclk"], or ["extclk", "txco"]. That doesn't make much
sense, since the two clocks are said to be equivalent, with one
superseeding the other.

lpo is also not a valid clock anymore, and would be as the third clock
of the list, while we could have only this clock in the previous binding
(and in DTs).

Let's rework the clock clause to allow to have either:

 - extclk, and mark it a deprecated
 - txco alone
 - lpo alone
 - txco, lpo

While ["extclk", "lpo"] wouldn't be valid, it wasn't found in any device
tree so it's not an issue in practice.

Similarly, ["lpo", "txco"] is still considered invalid, but it's
generally considered as a best practice to fix the order of clocks.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210924072756.869731-1-maxime@cerno.tech
Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml