mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>,
	Simon <horms@verge.net.au>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/4] ASoC: rsnd: use regmap instead of original register mapping method
Date: Tue, 17 Sep 2013 22:23:58 +0900	[thread overview]
Message-ID: <uioxzfuoi.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <20130917130402.GE21013@sirena.org.uk>


Dear Mark

> > +void rsnd_write(struct rsnd_priv *priv,
> > +		struct rsnd_mod *mod,
> > +		enum rsnd_reg reg, u32 data)
> > +{
> > +	struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
> > +
> > +	if (regmap_fields_enable(gen->regs[reg]))
> > +		regmap_fields_write(gen->regs[reg], rsnd_mod_id(mod), data);
> > +	else
> > +		regmap_field_write(gen->regs[reg], data);
> > +}
> 
> Ah, sorry - I see you are actually using fields_enable().  I must've
> searched for the wrong thing.  However looking at this I'm not sure that
> this is a good use anyway, it seems like the caller should know if the
> register it is writing to is in one of the repeated blocks.  Can you
> provide a bit more detail as to what's going on here?

Hmm...
rsnd_write/read() care about it (block/non-block),
and caller don't care it, is nice point of this function...

For example, SSI device have many ports (0-8),
but ADG is only 1 device.
On this driver, all devices are using rsnd_write/read() to
access register.

I can re-check it, but it will be next week
Thank you

Best regards
--
Kuninori Morimoto
 

  reply	other threads:[~2013-09-17 13:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30  4:31 [PATCH 0/4] add regmap_filelds and use it on Renesas Sound driver Kuninori Morimoto
2013-08-30  4:33 ` [PATCH 1/4] regmap: add regmap_field_update_bits() Kuninori Morimoto
2013-08-30  4:34 ` [PATCH 2/4] regmap: Add regmap_fields APIs Kuninori Morimoto
2013-09-02  2:36   ` Kuninori Morimoto
2013-08-30  4:34 ` [PATCH 3/4] ASoC: rsnd: gen: rsnd_gen_ops cares .probe and .remove Kuninori Morimoto
2013-08-30  4:35 ` [PATCH 4/4] ASoC: rsnd: use regmap instead of original register mapping method Kuninori Morimoto
2013-09-02  3:24 ` [PATCH v2 0/4] add regmap_filelds and use it on Renesas Sound driver Kuninori Morimoto
2013-09-02  3:24   ` [PATCH v2 1/4] regmap: add regmap_field_update_bits() Kuninori Morimoto
2013-09-03 11:20     ` Mark Brown
2013-09-02  3:30   ` [PATCH v2 2/4] regmap: Add regmap_fields APIs Kuninori Morimoto
2013-09-17 12:48     ` Mark Brown
2013-09-02  3:31   ` [PATCH v2 3/4] ASoC: rsnd: gen: rsnd_gen_ops cares .probe and .remove Kuninori Morimoto
2013-09-17 12:58     ` Mark Brown
2013-09-02  3:32   ` [PATCH v2 4/4] ASoC: rsnd: use regmap instead of original register mapping method Kuninori Morimoto
2013-09-17 13:04     ` Mark Brown
2013-09-17 13:23       ` Kuninori Morimoto [this message]
2013-09-17 13:35         ` Mark Brown
2013-09-24  6:10           ` [PATCH v3 0/2] " Kuninori Morimoto
2013-09-24  6:12             ` [PATCH 1/2] ASoC: rsnd: remove rsnd_priv_read/write/bset() Kuninori Morimoto
2013-09-24 18:53               ` Mark Brown
2013-09-24  6:12             ` [PATCH 2/2] ASoC: rsnd: use regmap instead of original register mapping method Kuninori Morimoto

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=uioxzfuoi.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®