All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] Bluetooth: hci_qca:Removed the function qca_setup_clock()
@ 2020-02-03  8:05 Venkata Lakshmi Narayana Gubba
  2020-02-03  9:29 ` gubbaven
  0 siblings, 1 reply; 2+ messages in thread
From: Venkata Lakshmi Narayana Gubba @ 2020-02-03  8:05 UTC (permalink / raw)
  To: marcel, johan.hedberg
  Cc: mka, linux-kernel, linux-bluetooth, robh, hemantg, linux-arm-msm,
	bgodavar, tientzu, seanpaul, rjliao, yshavit,
	Venkata Lakshmi Narayana Gubba

For enabling and disabling clocks, directly called the functions
clk_prepare_enable() and clk_disable_unprepare() respectively.

Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
---
 drivers/bluetooth/hci_qca.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 73706f3..eacc65b 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1738,15 +1738,6 @@ static int qca_power_off(struct hci_dev *hdev)
 	return 0;
 }
 
-static int qca_setup_clock(struct clk *clk, bool enable)
-{
-	if (enable)
-		return clk_prepare_enable(clk);
-
-	clk_disable_unprepare(clk);
-	return 0;
-}
-
 static int qca_regulator_enable(struct qca_serdev *qcadev)
 {
 	struct qca_power *power = qcadev->bt_power;
@@ -1764,7 +1755,7 @@ static int qca_regulator_enable(struct qca_serdev *qcadev)
 
 	power->vregs_on = true;
 
-	ret = qca_setup_clock(qcadev->susclk, true);
+	ret = clk_prepare_enable(qcadev->susclk);
 	if (ret) {
 		/* Turn off regulators to overcome power leakage */
 		qca_regulator_disable(qcadev);
@@ -1791,7 +1782,7 @@ static void qca_regulator_disable(struct qca_serdev *qcadev)
 	power->vregs_on = false;
 
 	if (qcadev->susclk)
-		qca_setup_clock(qcadev->susclk, false);
+		clk_disable_unprepare(qcadev->susclk);
 }
 
 static int qca_init_regulators(struct qca_power *qca,
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] Bluetooth: hci_qca:Removed the function qca_setup_clock()
  2020-02-03  8:05 [PATCH v3] Bluetooth: hci_qca:Removed the function qca_setup_clock() Venkata Lakshmi Narayana Gubba
@ 2020-02-03  9:29 ` gubbaven
  0 siblings, 0 replies; 2+ messages in thread
From: gubbaven @ 2020-02-03  9:29 UTC (permalink / raw)
  To: marcel, johan.hedberg
  Cc: mka, linux-kernel, linux-bluetooth, robh, hemantg, linux-arm-msm,
	bgodavar, tientzu, seanpaul, rjliao, yshavit

Please discard this.I will be sending another patch set.

Regards,
Venkata.

On 2020-02-03 13:35, Venkata Lakshmi Narayana Gubba wrote:
> For enabling and disabling clocks, directly called the functions
> clk_prepare_enable() and clk_disable_unprepare() respectively.
> 
> Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
> ---
>  drivers/bluetooth/hci_qca.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 73706f3..eacc65b 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -1738,15 +1738,6 @@ static int qca_power_off(struct hci_dev *hdev)
>  	return 0;
>  }
> 
> -static int qca_setup_clock(struct clk *clk, bool enable)
> -{
> -	if (enable)
> -		return clk_prepare_enable(clk);
> -
> -	clk_disable_unprepare(clk);
> -	return 0;
> -}
> -
>  static int qca_regulator_enable(struct qca_serdev *qcadev)
>  {
>  	struct qca_power *power = qcadev->bt_power;
> @@ -1764,7 +1755,7 @@ static int qca_regulator_enable(struct qca_serdev 
> *qcadev)
> 
>  	power->vregs_on = true;
> 
> -	ret = qca_setup_clock(qcadev->susclk, true);
> +	ret = clk_prepare_enable(qcadev->susclk);
>  	if (ret) {
>  		/* Turn off regulators to overcome power leakage */
>  		qca_regulator_disable(qcadev);
> @@ -1791,7 +1782,7 @@ static void qca_regulator_disable(struct
> qca_serdev *qcadev)
>  	power->vregs_on = false;
> 
>  	if (qcadev->susclk)
> -		qca_setup_clock(qcadev->susclk, false);
> +		clk_disable_unprepare(qcadev->susclk);
>  }
> 
>  static int qca_init_regulators(struct qca_power *qca,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-03  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03  8:05 [PATCH v3] Bluetooth: hci_qca:Removed the function qca_setup_clock() Venkata Lakshmi Narayana Gubba
2020-02-03  9:29 ` gubbaven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.