From: Jishnu Prakash <jprakash@codeaurora.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: agross@kernel.org, Bjorn Andersson <bjorn.andersson@linaro.org>,
devicetree <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Matthias Kaehlcke <mka@chromium.org>,
Linus Walleij <linus.walleij@linaro.org>,
Stephen Boyd <sboyd@codeaurora.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
smohanad@codeaurora.org, kgunda@codeaurora.org,
aghayal@codeaurora.org, Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-arm-msm@vger.kernel.org,
linux-iio <linux-iio@vger.kernel.org>,
linux-arm-msm-owner@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: adc: Add support for PMIC7 ADC
Date: Mon, 6 Apr 2020 17:16:11 +0530 [thread overview]
Message-ID: <6bf90d8c-48e6-9a07-7688-aa3890ebcd0d@codeaurora.org> (raw)
In-Reply-To: <CAHp75Vfk1DZ+bz6h_prm6Tp7kXos6jio5JCpg6=wvGRmDPTBsw@mail.gmail.com>
Hi Andy,
On 3/24/2020 10:03 PM, Andy Shevchenko wrote:
> On Tue, Mar 24, 2020 at 5:46 PM Jishnu Prakash <jprakash@codeaurora.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.
>
>
next prev parent reply other threads:[~2020-04-06 11:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 15:44 [PATCH 0/3] iio: adc: Add support for QCOM SPMI PMIC7 ADC Jishnu Prakash
2020-03-24 15:44 ` [PATCH 1/3] iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format Jishnu Prakash
2020-03-28 16:51 ` Jonathan Cameron
2020-04-06 11:41 ` Jishnu Prakash
2020-03-30 15:38 ` Rob Herring
2020-04-06 11:43 ` Jishnu Prakash
2020-04-03 12:04 ` Amit Kucheria
2020-04-06 11:44 ` Jishnu Prakash
2020-04-14 9:09 ` Amit Kucheria
2020-03-24 15:44 ` [PATCH 2/3] iio: adc: Add PMIC7 ADC bindings Jishnu Prakash
2020-03-28 16:54 ` Jonathan Cameron
2020-04-06 11:45 ` Jishnu Prakash
2020-04-06 16:05 ` Jonathan Cameron
2020-04-03 12:11 ` Amit Kucheria
2020-04-06 11:45 ` Jishnu Prakash
2020-03-24 15:44 ` [PATCH 3/3] iio: adc: Add support for PMIC7 ADC Jishnu Prakash
2020-03-24 16:33 ` Andy Shevchenko
2020-04-06 11:46 ` Jishnu Prakash [this message]
2020-03-28 17:04 ` Jonathan Cameron
2020-04-06 11:46 ` Jishnu Prakash
2020-03-31 20:06 ` Rob Herring
2020-04-06 11:47 ` Jishnu Prakash
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6bf90d8c-48e6-9a07-7688-aa3890ebcd0d@codeaurora.org \
--to=jprakash@codeaurora.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=aghayal@codeaurora.org \
--cc=agross@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=kgunda@codeaurora.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm-owner@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mka@chromium.org \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=smohanad@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).