linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	alsa-devel@alsa-project.org,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	tiwai@suse.de, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Hui Wang <hui.wang@canonical.com>,
	broonie@kernel.org, srinivas.kandagatla@linaro.org,
	jank@cadence.com, slawomir.blauciak@intel.com,
	Sanyog Kale <sanyog.r.kale@intel.com>,
	Bard liao <yung-chuan.liao@linux.intel.com>,
	Rander Wang <rander.wang@linux.intel.com>
Subject: Re: [PATCH 3/4] soundwire: SDCA: add helper macro to access controls
Date: Wed, 26 Aug 2020 22:10:18 +0530	[thread overview]
Message-ID: <20200826164018.GF2639@vkoul-mobl> (raw)
In-Reply-To: <9c078341-7e90-a4e8-da30-19e9720d93e4@linux.intel.com>

On 26-08-20, 10:00, Pierre-Louis Bossart wrote:
> 
> 
> > > +/* v1.2 device - SDCA address mapping */
> > 
> > Can you please add description of bits used by each field here,
> > something like we have done for DevId
> 
> were you referring to something like this?
> 
>  * Spec definition
>  *   Register		Bit	Contents
>  *   DevId_0 [7:4]	47:44	sdw_version
>  *   DevId_0 [3:0]	43:40	unique_id
>  *   DevId_1		39:32	mfg_id [15:8]
>  *   DevId_2		31:24	mfg_id [7:0]
>  *   DevId_3		23:16	part_id [15:8]
>  *   DevId_4		15:08	part_id [7:0]
>  *   DevId_5		07:00	class_id

Correct

> > 
> > > +#define SDW_SDCA_CTL(fun, ent, ctl, ch)		(BIT(30) |			\
> > > +						 (((fun) & 0x7) << 22) |	\
> > > +						 (((ent) & 0x40) << 15) |	\
> > > +						 (((ent) & 0x3f) << 7) |	\
> > > +						 (((ctl) & 0x30) << 15) |	\
> > > +						 (((ctl) & 0x0f) << 3) |	\
> > > +						 (((ch) & 0x38) << 12) |	\
> > > +						 ((ch) & 0x07))
> > 
> > GENMASK() for the bitmaps here please. Also it would look very neat by
> > using FIELD_PREP() here, you can skip the bit shifts and they would be
> > done by FIELD_PREP() for you.
> 
> ok.

FWIW I am testing changes to do the conversion for subsystem to use nice
stuff in bitfield.h


-- 
~Vinod

  reply	other threads:[~2020-08-26 16:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 17:16 [PATCH 0/4] regmap: add SoundWire 1.2 MBQ support Pierre-Louis Bossart
2020-08-25 17:16 ` [PATCH 1/4] regmap: sdw: move to -EOPNOTSUPP Pierre-Louis Bossart
2020-08-25 21:48   ` Mark Brown
2020-08-25 22:08     ` Pierre-Louis Bossart
2020-08-26  9:56       ` Mark Brown
2020-08-26 10:09         ` Takashi Iwai
2020-08-26 10:13           ` Mark Brown
2020-08-26 10:22             ` Takashi Iwai
2020-08-26 12:03               ` Vinod Koul
2020-08-26 15:05               ` Pierre-Louis Bossart
2020-08-26 17:25                 ` Mark Brown
2020-08-26 18:08                   ` Pierre-Louis Bossart
2020-08-25 17:16 ` [PATCH 2/4] regmap: sdw: add required header files Pierre-Louis Bossart
2020-08-25 17:16 ` [PATCH 3/4] soundwire: SDCA: add helper macro to access controls Pierre-Louis Bossart
2020-08-26  1:04   ` Bard liao
2020-08-26  8:55   ` Vinod Koul
2020-08-26 15:00     ` Pierre-Louis Bossart
2020-08-26 16:40       ` Vinod Koul [this message]
2020-08-25 17:16 ` [PATCH 4/4] regmap: sdw: add support for SoundWire 1.2 MBQ Pierre-Louis Bossart
2020-08-26  0:59   ` Bard liao
2020-08-26  9:05   ` Vinod Koul
2020-08-26 16:57     ` Pierre-Louis Bossart
2020-08-28  7:23       ` Vinod Koul
2020-08-28 14:49         ` Pierre-Louis Bossart
2020-08-26 10:16   ` Mark Brown
2020-08-26 14:54     ` Pierre-Louis Bossart

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=20200826164018.GF2639@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=hui.wang@canonical.com \
    --cc=jank@cadence.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rander.wang@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=slawomir.blauciak@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.de \
    --cc=yung-chuan.liao@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).