Re: [PATCH 2/3] Bluetooth: hci_qca: Move boot delay to qca_send_power_pulse()

2019-02-26 Thread Matthias Kaehlcke
Hi Balakrishna,

Thanks for the reviews!

On Tue, Feb 26, 2019 at 05:54:24PM +0530, Balakrishna Godavarthi wrote:
> hi Matthias,
> 
> On 2019-02-26 17:48, Balakrishna Godavarthi wrote:
> > On 2019-02-26 05:19, Matthias Kaehlcke wrote:
> > > After sending a power on pulse the driver has a delay of 100ms
> > > to allow the host controller to boot. Move the delay into
> > > qca_send_power_pulse(), since it is directly related with the
> > > power-on pulse.
> > > 
> > > Signed-off-by: Matthias Kaehlcke 
> > > ---
> > >  drivers/bluetooth/hci_qca.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> > > index e4128774e9686..eacc108c422d0 100644
> > > --- a/drivers/bluetooth/hci_qca.c
> > > +++ b/drivers/bluetooth/hci_qca.c
> > > @@ -1036,6 +1036,9 @@ static int qca_send_power_pulse(struct hci_uart
> > > *hu, bool on)
> > >   usleep_range(100, 200);
> 
> [Bala] : i still doubt do we require this delay.

I don't know if it was necessary (or at least helped in the power-off
case) without this series, but my testing suggests it is not needed
with the delay after the power off pulse ("[3/3] Bluetooth: hci_qca:
Add delay after power-off pulse").

I'll send a new version without the delay.

Thanks

Matthias


Re: [PATCH 2/3] Bluetooth: hci_qca: Move boot delay to qca_send_power_pulse()

2019-02-26 Thread Balakrishna Godavarthi

hi Matthias,

On 2019-02-26 17:48, Balakrishna Godavarthi wrote:

On 2019-02-26 05:19, Matthias Kaehlcke wrote:

After sending a power on pulse the driver has a delay of 100ms
to allow the host controller to boot. Move the delay into
qca_send_power_pulse(), since it is directly related with the
power-on pulse.

Signed-off-by: Matthias Kaehlcke 
---
 drivers/bluetooth/hci_qca.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index e4128774e9686..eacc108c422d0 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1036,6 +1036,9 @@ static int qca_send_power_pulse(struct hci_uart
*hu, bool on)
usleep_range(100, 200);


[Bala] : i still doubt do we require this delay.


hci_uart_set_flow_control(hu, false);

+   if (on)
+   msleep(100);
+
return 0;
 }

@@ -1148,9 +1151,6 @@ static int qca_wcn3990_init(struct hci_uart *hu)
if (ret)
return ret;

-   /* Wait for 100 ms for SoC to boot */
-   msleep(100);
-
/* Now the device is in ready state to communicate with host.
 * To sync host with device we need to reopen port.
 * Without this, we will have RTS and CTS synchronization


Reviewed-by: Balakrishna Godavarthi 


--
Regards
Balakrishna.


Re: [PATCH 2/3] Bluetooth: hci_qca: Move boot delay to qca_send_power_pulse()

2019-02-26 Thread Balakrishna Godavarthi

On 2019-02-26 05:19, Matthias Kaehlcke wrote:

After sending a power on pulse the driver has a delay of 100ms
to allow the host controller to boot. Move the delay into
qca_send_power_pulse(), since it is directly related with the
power-on pulse.

Signed-off-by: Matthias Kaehlcke 
---
 drivers/bluetooth/hci_qca.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index e4128774e9686..eacc108c422d0 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1036,6 +1036,9 @@ static int qca_send_power_pulse(struct hci_uart
*hu, bool on)
usleep_range(100, 200);
hci_uart_set_flow_control(hu, false);

+   if (on)
+   msleep(100);
+
return 0;
 }

@@ -1148,9 +1151,6 @@ static int qca_wcn3990_init(struct hci_uart *hu)
if (ret)
return ret;

-   /* Wait for 100 ms for SoC to boot */
-   msleep(100);
-
/* Now the device is in ready state to communicate with host.
 * To sync host with device we need to reopen port.
 * Without this, we will have RTS and CTS synchronization


Reviewed-by: Balakrishna Godavarthi 

--
Regards
Balakrishna.


[PATCH 2/3] Bluetooth: hci_qca: Move boot delay to qca_send_power_pulse()

2019-02-25 Thread Matthias Kaehlcke
After sending a power on pulse the driver has a delay of 100ms
to allow the host controller to boot. Move the delay into
qca_send_power_pulse(), since it is directly related with the
power-on pulse.

Signed-off-by: Matthias Kaehlcke 
---
 drivers/bluetooth/hci_qca.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index e4128774e9686..eacc108c422d0 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1036,6 +1036,9 @@ static int qca_send_power_pulse(struct hci_uart *hu, bool 
on)
usleep_range(100, 200);
hci_uart_set_flow_control(hu, false);
 
+   if (on)
+   msleep(100);
+
return 0;
 }
 
@@ -1148,9 +1151,6 @@ static int qca_wcn3990_init(struct hci_uart *hu)
if (ret)
return ret;
 
-   /* Wait for 100 ms for SoC to boot */
-   msleep(100);
-
/* Now the device is in ready state to communicate with host.
 * To sync host with device we need to reopen port.
 * Without this, we will have RTS and CTS synchronization
-- 
2.21.0.rc0.258.g878e2cd30e-goog