All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: Jeff Chang <richtek.jeff.chang@gmail.com>,
	lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	matthias.bgg@gmail.com, alsa-devel@alsa-project.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, jeff_chang@richtek.com
Subject: Re: [PATCH v6] ASoC: Add MediaTek MT6660 Speaker Amp Driver
Date: Tue, 14 Jan 2020 14:27:18 +0100	[thread overview]
Message-ID: <s5hh80ycgnd.wl-tiwai@suse.de> (raw)
In-Reply-To: <20200114124744.GT3897@sirena.org.uk>

On Tue, 14 Jan 2020 13:47:44 +0100,
Mark Brown wrote:
> 
> On Tue, Jan 14, 2020 at 08:44:22AM +0100, Takashi Iwai wrote:
> > Jeff Chang wrote:
> 
> > > +	if (ret < 0)
> > > +		return ret;
> > > +	reg_data = (u8)ret;
> > > +	if (on_off)
> > > +		reg_data &= (~0x01);
> > > +	else
> > > +		reg_data |= 0x01;
> > > +	return regmap_write(chip->regmap, MT6660_REG_SYSTEM_CTRL, reg_data);
> 
> > Hm, this looks like an open-code of forced update bits via regmap.
> > But interestingly there is no corresponding standard helper for that.
> > Essentially it should be regmap_update_bits_base() with force=1.
> 
> > Mark?
> 
> regmap_write_bits().

Oh that obvious one, thanks :)


Takashi

WARNING: multiple messages have this Message-ID (diff)
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	tiwai@suse.com, lgirdwood@gmail.com,
	Jeff Chang <richtek.jeff.chang@gmail.com>,
	jeff_chang@richtek.com, matthias.bgg@gmail.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [alsa-devel] [PATCH v6] ASoC: Add MediaTek MT6660 Speaker Amp Driver
Date: Tue, 14 Jan 2020 14:27:18 +0100	[thread overview]
Message-ID: <s5hh80ycgnd.wl-tiwai@suse.de> (raw)
In-Reply-To: <20200114124744.GT3897@sirena.org.uk>

On Tue, 14 Jan 2020 13:47:44 +0100,
Mark Brown wrote:
> 
> On Tue, Jan 14, 2020 at 08:44:22AM +0100, Takashi Iwai wrote:
> > Jeff Chang wrote:
> 
> > > +	if (ret < 0)
> > > +		return ret;
> > > +	reg_data = (u8)ret;
> > > +	if (on_off)
> > > +		reg_data &= (~0x01);
> > > +	else
> > > +		reg_data |= 0x01;
> > > +	return regmap_write(chip->regmap, MT6660_REG_SYSTEM_CTRL, reg_data);
> 
> > Hm, this looks like an open-code of forced update bits via regmap.
> > But interestingly there is no corresponding standard helper for that.
> > Essentially it should be regmap_update_bits_base() with force=1.
> 
> > Mark?
> 
> regmap_write_bits().

Oh that obvious one, thanks :)


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

WARNING: multiple messages have this Message-ID (diff)
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	tiwai@suse.com, lgirdwood@gmail.com,
	Jeff Chang <richtek.jeff.chang@gmail.com>,
	jeff_chang@richtek.com, matthias.bgg@gmail.com, perex@perex.cz,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6] ASoC: Add MediaTek MT6660 Speaker Amp Driver
Date: Tue, 14 Jan 2020 14:27:18 +0100	[thread overview]
Message-ID: <s5hh80ycgnd.wl-tiwai@suse.de> (raw)
In-Reply-To: <20200114124744.GT3897@sirena.org.uk>

On Tue, 14 Jan 2020 13:47:44 +0100,
Mark Brown wrote:
> 
> On Tue, Jan 14, 2020 at 08:44:22AM +0100, Takashi Iwai wrote:
> > Jeff Chang wrote:
> 
> > > +	if (ret < 0)
> > > +		return ret;
> > > +	reg_data = (u8)ret;
> > > +	if (on_off)
> > > +		reg_data &= (~0x01);
> > > +	else
> > > +		reg_data |= 0x01;
> > > +	return regmap_write(chip->regmap, MT6660_REG_SYSTEM_CTRL, reg_data);
> 
> > Hm, this looks like an open-code of forced update bits via regmap.
> > But interestingly there is no corresponding standard helper for that.
> > Essentially it should be regmap_update_bits_base() with force=1.
> 
> > Mark?
> 
> regmap_write_bits().

Oh that obvious one, thanks :)


Takashi

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-01-14 13:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14  2:22 [PATCH v6] ASoC: Add MediaTek MT6660 Speaker Amp Driver Jeff Chang
2020-01-14  2:22 ` Jeff Chang
2020-01-14  2:22 ` [alsa-devel] " Jeff Chang
2020-01-14  7:44 ` Takashi Iwai
2020-01-14  7:44   ` Takashi Iwai
2020-01-14  7:44   ` [alsa-devel] " Takashi Iwai
2020-01-14  9:48   ` jeff_chang(張世佳)
2020-01-14 10:12     ` Takashi Iwai
2020-01-14 10:12       ` Takashi Iwai
2020-01-14 10:12       ` [alsa-devel] " Takashi Iwai
2020-01-14 14:49       ` Mark Brown
2020-01-14 14:49         ` Mark Brown
2020-01-14 14:49         ` [alsa-devel] " Mark Brown
2020-01-14 12:47   ` Mark Brown
2020-01-14 12:47     ` Mark Brown
2020-01-14 12:47     ` [alsa-devel] " Mark Brown
2020-01-14 13:27     ` Takashi Iwai [this message]
2020-01-14 13:27       ` Takashi Iwai
2020-01-14 13:27       ` [alsa-devel] " Takashi Iwai

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=s5hh80ycgnd.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jeff_chang@richtek.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --cc=richtek.jeff.chang@gmail.com \
    --cc=tiwai@suse.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.