Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1900519ybb; Thu, 2 Apr 2020 09:20:48 -0700 (PDT) X-Google-Smtp-Source: APiQypLBtcjRHIpeyzaJs+MvHDQE583CnTQFdM2qXT2ZB3rZhe63SXZJmvr5qQjdped0/24O3kyF X-Received: by 2002:a05:6808:12:: with SMTP id u18mr2977633oic.167.1585844448299; Thu, 02 Apr 2020 09:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585844448; cv=none; d=google.com; s=arc-20160816; b=BVzpqov2rVN0CsKwgtQGrFX/JOc4AJc32xvEBkZumEzm40PQZ1s2ocZ5cegKSMfaCH fIFq5LPYbS4FfGIwRnrNCd3r3rvMkrERmrOM0K/m5iiFzsWEhtA8zRcWwEeyZV8cqZa4 zO0dhcLLSVUYN9FZt5LJhY1VQ5MxEbS4LIIA4V8R81aG+a0C1SzKPAncWmUVznepvucz ZPMxIF9y/TNjCuZE30gxlSByQrAs5t2YlJx/zEh3NEO3aU9ODLCzd7OHhUSbdoAuH6S2 5nLdbk3sY0VRQQSnQ2265Ao7a1xwagoJpP/9tJt3fRfRXnUGVZJgdKuNj3r8HjG22rnP orYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:user-agent :in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:dkim-signature; bh=6/xO0qxDK9bP/JwDy+lx62oXVPNXqtijbANBwyBJwRo=; b=LQUsHh36GXamBagCNnepVF5pMhmGExpQaPq0Bo0DfB7iHl3pJ7mWojwKIwGGmGTAqf W+YH3Fb3/NNvx4OCfJ14J2oiGi/U8Xh75ZfCrrpH/tsuIkD7svEaFiANoG7HAzpx5IB6 1T1tIoODyWDKiy8HQJvZvO5xyijBGXDHs439oHmPQ/4ux9J+zJVUTvvEjO6e82a6cjYu KQpO1zxENKtoRihPHcjraDpzT7fkAkdYpNxsSFPMXt2W3XFmggtjF8lWUsRRTuUD/X/v ADQojy5o4HO4DoG+KH+N32KXl9A/el0SzyUua/zABaAO0gL8l+t1nTZp9EVvkKb+h9+x fVkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=h9U6MBB2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c201si2472929oib.57.2020.04.02.09.20.34; Thu, 02 Apr 2020 09:20:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=h9U6MBB2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389735AbgDBQSv (ORCPT + 99 others); Thu, 2 Apr 2020 12:18:51 -0400 Received: from mout.gmx.net ([212.227.15.18]:44535 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389458AbgDBQSu (ORCPT ); Thu, 2 Apr 2020 12:18:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1585844318; bh=Ha6uhEHP6yt0gDqDKrJoPEb7up/ARPeYWAyiPscmxhk=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=h9U6MBB23/IrRh+hgK8kbV18dQaObah4to1o4DuTrnIGi2axNR6awjSLodkY2F3Qh xD+zywErFDEBWcFPIIUVErG9wsTWOXIUAjy3FwtFWxW1vm+NjMd7Az4MY8JtjuVS3W ACikdVbsoFBu5vjQTKK0OxL8Z5m4QmJ4YUEodPK8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ubuntu ([83.52.229.196]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1N4hvR-1jA79F1owR-011ltw; Thu, 02 Apr 2020 18:18:38 +0200 Date: Thu, 2 Apr 2020 18:18:25 +0200 From: Oscar Carter To: Dan Carpenter , Malcolm Priestley , Quentin Deslandes Cc: Oscar Carter , Forest Bond , Greg Kroah-Hartman , Amir Mahdi Ghorbanian , Colin Ian King , Gabriela Bittencourt , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: vt6656: Use defines in vnt_mac_reg_bits_* functions Message-ID: <20200402161825.GA3939@ubuntu> References: <20200328095433.7879-1-oscar.carter@gmx.com> <20200331102906.GA2066@kadam> <20200401165537.GC3109@ubuntu> <20200402091917.GA17323@jiffies> <4e5fc495-9355-02b7-4148-ea4de5370617@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e5fc495-9355-02b7-4148-ea4de5370617@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Provags-ID: V03:K1:zgJ0x0lB71mFFzXhTSJLU6lMqD7zrO7EH6/wEuwXDz9/rmEt9P/ CK4qnq2WEHU3R+oqaUBz/LJIps5b882EIcJOb20W+Vo8+67qbO1P2oNZ8H7fi9dL675A7v2 x9VneawAF0TQnBqDtPd1aXkUhB4EA/U7IDdWC8Zt9Q8XiBfgrgkHWhmqQdxWg8+j1CmF7hw k+qvq0uBEVtwN0vp4oo9A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:D7pbub1xazs=:+3glSZlpMMy5g2/PRgN+Nz djfSv7lj8tdK91yOA+ERI1jYCWMEeyLXeWT5LhGGqSp6M0QXNY+EhzkzHiosxe/YumFF0Ci9G frZ8SZXWlUQYj1PQl/0ZQQ5CGQMbbde4B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K+ YCYz/rY07rjTSdwoRnbyHyWdImdKp992WNX5Wj8HLGuJ7ptH3OxkLJDec40LA/pUrAecsG+ju VmRphkGrNsbpFOws8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 02, 2020 at 11:58:07AM +0100, Malcolm Priestley wrote: > > > On 02/04/2020 10:19, Quentin Deslandes wrote: > > On 04/01/20 18:55:38, Oscar Carter wrote: > > > On Tue, Mar 31, 2020 at 01:29:06PM +0300, Dan Carpenter wrote: > > > > On Sat, Mar 28, 2020 at 10:54:33AM +0100, Oscar Carter wrote: > > > > > Define the necessary bits in the CHANNEL, PAPEDELAY and GPIOCTL0 > > > > > registers to can use them in the calls to vnt_mac_reg_bits_on an= d > > > > > vnt_mac_reg_bits_off functions. In this way, avoid the use of BI= T() > > > > > macros and clarify the code. > > > > > > > > > > Fixes: 3017e587e368 ("staging: vt6656: Use BIT() macro in vnt_ma= c_reg_bits_* functions") > > > > > Suggested-by: Dan Carpenter > > > > > Signed-off-by: Oscar Carter > > > > > --- > > > > > drivers/staging/vt6656/baseband.c | 6 ++++-- > > > > > drivers/staging/vt6656/card.c | 3 +-- > > > > > drivers/staging/vt6656/mac.h | 12 ++++++++++++ > > > > > drivers/staging/vt6656/main_usb.c | 2 +- > > > > > 4 files changed, 18 insertions(+), 5 deletions(-) > > > > > > > > > > diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging= /vt6656/baseband.c > > > > > index a19a563d8bcc..dd3c3bf5e8b5 100644 > > > > > --- a/drivers/staging/vt6656/baseband.c > > > > > +++ b/drivers/staging/vt6656/baseband.c > > > > > @@ -442,7 +442,8 @@ int vnt_vt3184_init(struct vnt_private *priv= ) > > > > > if (ret) > > > > > goto end; > > > > > > > > > > - ret =3D vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, BIT(0)); > > > > > + ret =3D vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, > > > > > + PAPEDELAY_B0); > > > > > > > > This doesn't clarify anything. It makes it less clear because som= eone > > > > would assume B0 means something but it's just hiding a magic numbe= r > > > > behind a meaningless define. B0 means BIT(0) which means nothing.= So > > > > now we have to jump through two hoops to find out that we don't kn= ow > > > > anything. > > > > > > > I created this names due to the lack of information about the hardwa= re. I > > > searched but I did not find anything. > > > > > > > Just leave it as-is. Same for the rest. > > > Ok. > > > > > > > > > > > There problem is a hardware spec which explains what this stuff is= . > > > > > > > It's possible to find a datasheet of this hardware to make this modi= fication > > > accordingly to the correct bit names of registers ? > > > > I haven't found any so far, if your researches are luckier than mine, = I > > would be interested too. Even getting your hands on the actual device = is > > complicated. > > All I can tell you is it related to command above it MAC_REG_ITRTMSET > without it the device will not associate with access point is probably T= X > timing/power rated. > > Other bits in MAC_REG_PAPEDELAY are related to LED function and defined = in > LEDSTS_* in mac.h. > > I think it is some kind of enable so something like ITRTMSET_ENABLE woul= d > do. > I think the best for now is leave it as-is due to the lack of information = about bit names of registers. > Regards > > Malcolm Thanks, Oscar carter