lkml.org 
[lkml]   [2017]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] regulator: cpcap: Fix standby mode
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. 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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-07-10 14:24    [W:0.061 / U:1.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site