All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Chuang <yhchuang@realtek.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: "kvalo@codeaurora.org" <kvalo@codeaurora.org>,
	"Larry.Finger@lwfinger.net" <Larry.Finger@lwfinger.net>,
	Pkshih <pkshih@realtek.com>, Andy Huang <tehuang@realtek.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [RFC v3 07/12] rtw88: phy files
Date: Mon, 8 Oct 2018 02:28:15 +0000	[thread overview]
Message-ID: <F7CD281DE3E379468C6D07993EA72F84D172B9F1@RTITMBSVM01.realtek.com.tw> (raw)
In-Reply-To: <20181004141015.GC20484@redhat.com>

> -----Original Message-----
> From: Stanislaw Gruszka [mailto:sgruszka@redhat.com]
> Sent: Thursday, October 04, 2018 10:10 PM
> To: Tony Chuang
> Cc: kvalo@codeaurora.org; Larry.Finger@lwfinger.net; Pkshih; Andy Huang;
> linux-wireless@vger.kernel.org
> Subject: Re: [RFC v3 07/12] rtw88: phy files
> 
> On Wed, Oct 03, 2018 at 07:20:54PM +0800, yhchuang@realtek.com wrote:
> > +void rtw_phy_cfg_bb(struct rtw_dev *rtwdev, const struct rtw_table *tbl,
> > +		    u32 addr, u32 data)
> > +{
> > +	if (addr == 0xfe)
> > +		msleep(50);
> > +	else if (addr == 0xfd)
> > +		mdelay(5);
> > +	else if (addr == 0xfc)
> > +		mdelay(1);
> > +	else if (addr == 0xfb)
> > +		usleep_range(50, 60);
> > +	else if (addr == 0xfa)
> > +		udelay(5);
> > +	else if (addr == 0xf9)
> > +		udelay(1);
> > +	else
> > +		rtw_write32(rtwdev, addr, data);
> 
> This mix of mdelay(), msleep(), udelay() and usleep_range() looks strange.
> You should eigher use atomic versions *delay or non-atomic *sleep
> versions .

This is to make checkpatch.pl happy.

> 
> > +#define bcd_to_dec_pwr_by_rate(val, i) \
> > +	({ \
> > +		typeof(val) __val_ = val; \
> > +		typeof(i) __i_ = i; \
> > +		((s8)((((__val_ >> (__i_ * 8 + 4)) & 0xF)) * 10 + \
> > +		       ((__val_ >> (__i_ * 8)) & 0xF))); \
> > +	 })
> 
> Can use bcd2bin from include/linux/bcd.h instead ?
> 

OK

> 
> Thanks
> Stanislaw
> 

Yan-Hsuan Chuang

  reply	other threads:[~2018-10-08  2:28 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 11:20 [RFC v3 00/12] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips yhchuang
2018-10-03 11:20 ` [RFC v3 01/12] rtw88: main files yhchuang
2018-10-08 14:10   ` Johannes Berg
     [not found]   ` <201810081447.w98ElQfu018110@rtits1.realtek.com.tw>
2018-10-11  7:23     ` Tony Chuang
2018-10-11  7:30       ` Johannes Berg
2018-10-13 17:47       ` Kalle Valo
2018-10-22  3:40         ` Tony Chuang
2018-11-15 14:18           ` Kalle Valo
2018-10-03 11:20 ` [RFC v3 02/12] rtw88: core files yhchuang
2018-10-08 14:12   ` Johannes Berg
2018-10-03 11:20 ` [RFC v3 03/12] rtw88: hci files yhchuang
2018-10-03 11:20 ` [RFC v3 04/12] rtw88: trx files yhchuang
2018-10-03 11:20 ` [RFC v3 05/12] rtw88: mac files yhchuang
2018-10-08 13:38   ` Johannes Berg
2018-10-03 11:20 ` [RFC v3 06/12] rtw88: fw and efuse files yhchuang
2018-10-03 11:20 ` [RFC v3 07/12] rtw88: phy files yhchuang
2018-10-04 14:10   ` Stanislaw Gruszka
2018-10-08  2:28     ` Tony Chuang [this message]
2018-10-03 11:20 ` [RFC v3 08/12] rtw88: debug files yhchuang
2018-10-04 14:23   ` Stanislaw Gruszka
2018-10-08  7:57     ` Tony Chuang
2018-10-08 13:29   ` Johannes Berg
     [not found]   ` <201810081446.w98EkN0r017815@rtits1.realtek.com.tw>
2018-10-09  2:42     ` Tony Chuang
2018-10-03 11:20 ` [RFC v3 09/12] rtw88: chip files yhchuang
2018-10-04 14:36   ` Stanislaw Gruszka
2018-10-08  9:38     ` Tony Chuang
2018-10-03 11:20 ` [RFC v3 10/12] rtw88: 8822B init table yhchuang
2018-10-03 11:20 ` [RFC v3 11/12] rtw88: 8822C " yhchuang
2018-10-03 11:20 ` [RFC v3 12/12] rtw88: Kconfig & Makefile yhchuang
2018-10-08 14:00   ` Johannes Berg
     [not found]   ` <201810081447.w98ElIFH018051@rtits1.realtek.com.tw>
2018-10-09  5:10     ` Tony Chuang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F7CD281DE3E379468C6D07993EA72F84D172B9F1@RTITMBSVM01.realtek.com.tw \
    --to=yhchuang@realtek.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=sgruszka@redhat.com \
    --cc=tehuang@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.