Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1684254

Re: [PATCH 1/2] regulator: cpcap: Fix standby mode

From Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] regulator: cpcap: Fix standby mode
Date 2017-07-10 15:50 +0200
Message-ID <u1Hex-5Fo-11@gated-at.bofh.it> (permalink)
References <u0HJE-uJ-7@gated-at.bofh.it> <u0HJE-uJ-5@gated-at.bofh.it> <u1FZa-4Yg-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi,

On Mon, Jul 10, 2017 at 01:23:45PM +0100, Mark Brown wrote:
> On Fri, Jul 07, 2017 at 10:08:12PM +0200, Sebastian Reichel wrote:
> 
> > While working on the audio-codec I noticed, that the
> > low power mode of the regulators are not properly
> > supported. This fixes the issue for vaudio.
> 
> In what way is it not properly supported and how does this change ensure
> that it is properly supported?
> 
> > +static unsigned int cpcap_map_mode(unsigned int mode)
> > +{
> > +	switch (mode) {
> > +	case CPCAP_BIT_AUDIO_LOW_PWR:
> > +		return REGULATOR_MODE_STANDBY;
> > +	default:
> > +		return REGULATOR_MODE_NORMAL;
> > +	}
> > +}
> 
> This function is being added but is never referenced AFAICT, it should
> either be removed or used.

You probably skipped over the patch to fast, it is referenced in the
patch section before the one adding the function:

+               .of_map_mode = cpcap_map_mode,                          \

> If it is being used it should be changed so that it doesn't accept
> the default case but instead accepts only specific values so that
> the mapping of modes to regulator modes stays 1:1, unknown modes
> should error out.

Fair point.

-- Sebastian

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] regulator: cpcap: Fix standby mode Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-07 22:10 +0200
  Re: [PATCH 1/2] regulator: cpcap: Fix standby mode Tony Lindgren <tony@atomide.com> - 2017-07-08 07:40 +0200
  Re: [PATCH 1/2] regulator: cpcap: Fix standby mode Mark Brown <broonie@kernel.org> - 2017-07-10 14:30 +0200
    Re: [PATCH 1/2] regulator: cpcap: Fix standby mode Tony Lindgren <tony@atomide.com> - 2017-07-10 15:50 +0200
    Re: [PATCH 1/2] regulator: cpcap: Fix standby mode Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-10 15:50 +0200

csiph-web