Bluetooth: hci_qca: use devm_clk_get_optional_enabled_with_rate()
Subsystems (2)
PATCH RESEND 1/1 Bluetooth: hci_qca: use devm_clk_get_optional_enabled_with_rate()
From: Bartosz Golaszewski <[email protected]>
Use the new devm_clk_get_optional_enabled_with_rate() clock helper to shrink the code a bit.
---
Resending now that devm_clk_get_optional_enabled_with_rate() is in mainline.
drivers/bluetooth/hci_qca.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-)
drivers/bluetooth/hci_qca.c +2 -22
@@ -2294,13 +2294,6 @@ static int qca_init_regulators(struct qca_power *qca,return 0 ; } -static void qca_clk_disable_unprepare (void *data) -{ -struct clk *clk = data; - -clk_disable_unprepare (clk); -} -static int qca_serdev_probe (struct serdev_device *serdev) {struct qca_serdev *qcadev;
@@ -2433,25 +2426,12 @@ static int qca_serdev_probe(struct serdev_device *serdev)if (!qcadev->bt_en) power_ctrl_enabled = false; - qcadev->susclk =devm_clk_get_optional (&serdev->dev,NULL ); + qcadev->susclk =devm_clk_get_optional_enabled_with_rate ( + &serdev->dev,NULL ,SUSCLK_RATE_32KHZ );if (IS_ERR (qcadev->susclk)) {dev_warn (&serdev->dev,"failed to acquire clk\n" );return PTR_ERR (qcadev->susclk); } - err =clk_set_rate (qcadev->susclk,SUSCLK_RATE_32KHZ ); -if (err) -return err; - - err =clk_prepare_enable (qcadev->susclk); -if (err) -return err; - - err =devm_add_action_or_reset (&serdev->dev, - qca_clk_disable_unprepare, - qcadev->susclk); -if (err) -return err; - } err =hci_uart_register_device (&qcadev->serdev_hu, &qca_proto);
Signature · 1 line
2.43.0
Quoted 8 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
Use the new
devm_clk_get_optional_enabled_with_rate()clock helper to shrink the code a bit.Signed-off-by Bartosz Golaszewski <[email protected]>---
It's been two weeks, gentle ping.
Bart
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 8 lines · On Mon, 30 Sep 2024 10:09:38 +0200 you wrote:
From: Bartosz Golaszewski <[email protected]>
Use the new
devm_clk_get_optional_enabled_with_rate()clock helper to shrink the code a bit.Signed-off-by Bartosz Golaszewski <[email protected]>[...]
Here is the summary with links:
- [RESEND] Bluetooth: hci_qca: use devm_clk_get_optional_enabled_with_rate()
https://git.kernel.org/bluetooth/bluetooth-next/c/5fe50b4b2d0c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html