lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7ac6135-73b0-1087-dafa-4df558a06ef4@nvidia.com>
Date:   Tue, 7 Jan 2020 21:48:00 -0800
From:   Sowjanya Komatineni <skomatineni@...dia.com>
To:     Sameer Pujar <spujar@...dia.com>, <thierry.reding@...il.com>,
        <jonathanh@...dia.com>, <broonie@...nel.org>,
        <lgirdwood@...il.com>, <perex@...ex.cz>, <tiwai@...e.com>,
        <digetx@...il.com>, <mperttunen@...dia.com>,
        <gregkh@...uxfoundation.org>, <sboyd@...nel.org>,
        <robh+dt@...nel.org>, <mark.rutland@....com>
CC:     <pdeschrijver@...dia.com>, <pgaikwad@...dia.com>,
        <josephl@...dia.com>, <daniel.lezcano@...aro.org>,
        <mmaddireddy@...dia.com>, <markz@...dia.com>,
        <devicetree@...r.kernel.org>, <linux-clk@...r.kernel.org>,
        <linux-tegra@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 15/21] ASoC: tegra: Add fallback implementation for
 audio mclk


On 1/7/20 9:34 PM, Sameer Pujar wrote:
>
> On 1/8/2020 9:55 AM, Sowjanya Komatineni wrote:
>> mclk is from clk_out_1 which is part of Tegra PMC block and pmc clocks
>> are moved to Tegra PMC driver with pmc as clock provider and using pmc
>> clock ids.
>>
>> New device tree uses clk_out_1 from pmc clock provider.
>>
>> So, this patch adds implementation for mclk fallback to extern1 when
>> retrieving mclk returns -ENOENT to be backward compatible of new device
>> tree with older kernels.
>>
>> Tested-by: Dmitry Osipenko <digetx@...il.com>
>> Reviewed-by: Dmitry Osipenko <digetx@...il.com>
>> Signed-off-by: Sowjanya Komatineni <skomatineni@...dia.com>
>> ---
>>   sound/soc/tegra/tegra_asoc_utils.c | 11 ++++++++++-
>>   1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/tegra/tegra_asoc_utils.c 
>> b/sound/soc/tegra/tegra_asoc_utils.c
>> index 9cfebef74870..9a5f81039491 100644
>> --- a/sound/soc/tegra/tegra_asoc_utils.c
>> +++ b/sound/soc/tegra/tegra_asoc_utils.c
>> @@ -183,7 +183,16 @@ int tegra_asoc_utils_init(struct 
>> tegra_asoc_utils_data *data,
>>       data->clk_cdev1 = devm_clk_get(dev, "mclk");
>>       if (IS_ERR(data->clk_cdev1)) {
>>           dev_err(data->dev, "Can't retrieve clk cdev1\n");
>
> This error print can be moved inside below if, when this actually 
> meant to be an error condition.
>
Want to show error even if mclk retrieval returns ENOENT to clearly 
indicate mclk does not exist along with message of falling back to extern1.
>> -        return PTR_ERR(data->clk_cdev1);
>> +        if (PTR_ERR(data->clk_cdev1) != -ENOENT)
>> +            return PTR_ERR(data->clk_cdev1);
>> +        /* Fall back to extern1 */
>> +        data->clk_cdev1 = devm_clk_get(dev, "extern1");
>> +        if (IS_ERR(data->clk_cdev1)) {
>> +            dev_err(data->dev, "Can't retrieve clk extern1\n");
>> +            return PTR_ERR(data->clk_cdev1);
>> +        }
>> +
>> +        dev_err(data->dev, "Falling back to extern1\n");
>
> This can be a info print?

>>       }
>>         /*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ