All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mt76x0: phy: use mt76_poll_msec in mt76x0_phy_temp_sensor
       [not found] <cover.1540666225.git.lorenzo.bianconi@redhat.com>
@ 2018-10-27 19:06 ` Lorenzo Bianconi
  2018-11-05 16:55   ` Felix Fietkau
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Bianconi @ 2018-10-27 19:06 UTC (permalink / raw)
  To: nbd; +Cc: sgruszka, linux-wireless

Use mt76_poll_msec utility routine for CORE_R34 register polling
instead of mt76_poll in order to allow the hw to complete requested
calibration since on slow devices (e.g. mt7620 based boards) calibration
takes longer than 2ms

Fixes: 66a34c66e0cb ("mt76x0: phy: add phy/vco temperature compensation")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
index c734987a344c..830ea6047f10 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
@@ -686,8 +686,7 @@ static void mt76x0_phy_temp_sensor(struct mt76x02_dev *dev)
 	mt76x0_rf_wr(dev, MT_RF(0, 67), 0x01);
 
 	mt76_wr(dev, MT_BBP(CORE, 34), 0x00080055);
-
-	if (!mt76_poll(dev, MT_BBP(CORE, 34), BIT(4), 0, 2000)) {
+	if (!mt76_poll_msec(dev, MT_BBP(CORE, 34), BIT(4), 0, 200)) {
 		mt76_clear(dev, MT_BBP(CORE, 34), BIT(4));
 		goto done;
 	}
-- 
2.19.1


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

* Re: [PATCH] mt76x0: phy: use mt76_poll_msec in mt76x0_phy_temp_sensor
  2018-10-27 19:06 ` [PATCH] mt76x0: phy: use mt76_poll_msec in mt76x0_phy_temp_sensor Lorenzo Bianconi
@ 2018-11-05 16:55   ` Felix Fietkau
  0 siblings, 0 replies; 2+ messages in thread
From: Felix Fietkau @ 2018-11-05 16:55 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: sgruszka, linux-wireless

On 2018-10-27 21:06, Lorenzo Bianconi wrote:
> Use mt76_poll_msec utility routine for CORE_R34 register polling
> instead of mt76_poll in order to allow the hw to complete requested
> calibration since on slow devices (e.g. mt7620 based boards) calibration
> takes longer than 2ms
> 
> Fixes: 66a34c66e0cb ("mt76x0: phy: add phy/vco temperature compensation")
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Applied, thanks.

- Felix

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

end of thread, other threads:[~2018-11-05 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1540666225.git.lorenzo.bianconi@redhat.com>
2018-10-27 19:06 ` [PATCH] mt76x0: phy: use mt76_poll_msec in mt76x0_phy_temp_sensor Lorenzo Bianconi
2018-11-05 16:55   ` Felix Fietkau

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.