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]
Date:   Mon, 6 Apr 2020 17:16:11 +0530
From:   Jishnu Prakash <jprakash@...eaurora.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     agross@...nel.org, Bjorn Andersson <bjorn.andersson@...aro.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Matthias Kaehlcke <mka@...omium.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        smohanad@...eaurora.org, kgunda@...eaurora.org,
        aghayal@...eaurora.org, Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        linux-arm-msm@...r.kernel.org,
        linux-iio <linux-iio@...r.kernel.org>,
        linux-arm-msm-owner@...r.kernel.org
Subject: Re: [PATCH 3/3] iio: adc: Add support for PMIC7 ADC

Hi Andy,

On 3/24/2020 10:03 PM, Andy Shevchenko wrote:
> On Tue, Mar 24, 2020 at 5:46 PM Jishnu Prakash <jprakash@...eaurora.org> wrote:
>> The ADC architecture on PMIC7 is changed as compared to PMIC5. The
>> major change from PMIC5 is that all SW communication to ADC goes through
>> PMK8350, which communicates with other PMICs through PBS when the ADC
>> on PMK8350 works in master mode. The SID register is used to identify the
>> PMICs with which the PBS needs to communicate. Add support for the same.
>>
>> In addition, add definitions for ADC channels and virtual channel
>> definitions per PMIC, to be used by ADC clients for PMIC7.
> ...
>
>> +#define ADC_CHANNEL_OFFSET                     0x8
>> +#define ADC_CHANNEL_MASK                       0xff
> GENMASK()
I'll fix this and the other simple changes in the next post.
>
> ...
>
>> +#define ADC_APP_SID                            0x40
>> +#define ADC_APP_SID_MASK                       0xf
> GENMASK()
>
>> +#define ADC7_CONV_TIMEOUT                      msecs_to_jiffies(10)
> Useless.
I'm not sure what you mean by this. It is used in the API 
adc7_do_conversion.
> ...
>
> + if (of_device_is_compatible(node, "qcom,spmi-adc7")) {
>> +               indio_dev->info = &adc7_info;
>> +               adc->is_pmic7 = true;
>> +       } else {
>> +               indio_dev->info = &adc5_info;
>> +       }
> Hmm... I would rather put this as driver_data in ID structure(s).
I'll remove the check for the compatible string, using driver data, in 
the next post.
>
> ...
>
>> +static int adc5_exit(struct platform_device *pdev)
>> +{
>> +       struct adc5_chip *adc = platform_get_drvdata(pdev);
>> +
>> +       mutex_destroy(&adc->lock);
> Are you sure you will have no race conditions? Does this driver use IRQs?
The driver does use an IRQ. Will fix this in the next post.
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ