[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9f2ae979-1af1-2d80-f403-9220ec5c89a2@linaro.org>
Date: Wed, 1 Aug 2018 09:57:31 +0100
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Mark Brown <broonie@...nel.org>
Cc: lee.jones@...aro.org, robh+dt@...nel.org, mark.rutland@....com,
lgirdwood@...il.com, tiwai@...e.com, bgoswami@...eaurora.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
vkoul@...nel.org, alsa-devel@...a-project.org
Subject: Re: [PATCH v2 05/10] ASoC: wcd9335: add CLASS-H Controller support
Thanks for the review,
On 31/07/18 18:05, Mark Brown wrote:
> On Fri, Jul 27, 2018 at 01:18:01PM +0100, Srinivas Kandagatla wrote:
>
>> + res_val = WCD9XXX_CLASSH_CTRL_VCL_VREF_FILT_R_0KOHM;
>> + switch (mode) {
>> + case CLS_H_NORMAL:
>> + res_val = WCD9XXX_CLASSH_CTRL_VCL_VREF_FILT_R_50KOHM;
>> + val = WCD9XXX_A_ANA_HPH_PWR_LEVEL_NORMAL;
>> + gain = DAC_GAIN_0DB;
>> + ipeak = WCD9XXX_CLASSH_CTRL_CCL_1_DELTA_IPEAK_50MA;
>> + break;
>> + case CLS_AB:
>> + val = WCD9XXX_A_ANA_HPH_PWR_LEVEL_NORMAL;
>> + gain = DAC_GAIN_0DB;
>> + ipeak = WCD9XXX_CLASSH_CTRL_CCL_1_DELTA_IPEAK_50MA;
>> + break;
>> + case CLS_H_HIFI:
>> + val = WCD9XXX_A_ANA_HPH_PWR_LEVEL_UHQA;
>> + gain = DAC_GAIN_M0P2DB;
>> + ipeak = WCD9XXX_CLASSH_CTRL_CCL_1_DELTA_IPEAK_50MA;
>> + break;
>> + case CLS_H_LP:
>> + val = WCD9XXX_A_ANA_HPH_PWR_LEVEL_LP;
>> + ipeak = WCD9XXX_CLASSH_CTRL_CCL_1_DELTA_IPEAK_30MA;
>> + break;
>> + };
>
> This is missing a default case for error checking, and you don't need
> the semicolon at the end either.
These states are validated before any calls are made to these functions.
However I agree without on default case for error checking and ;
I will fix this in next version.
thanks,
srini
>
Powered by blists - more mailing lists