linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jishnu Prakash <jprakash@codeaurora.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: agross@kernel.org, bjorn.andersson@linaro.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	mka@chromium.org, linus.walleij@linaro.org,
	Jonathan.Cameron@huawei.com, andy.shevchenko@gmail.com,
	amit.kucheria@verdurent.com, smohanad@codeaurora.org,
	kgunda@codeaurora.org, aghayal@codeaurora.org,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-arm-msm-owner@vger.kernel.org
Subject: Re: [PATCH V5 3/5] iio: adc: Add support for PMIC7 ADC
Date: Thu, 28 May 2020 22:17:58 +0530	[thread overview]
Message-ID: <795197a7-a43f-a2b6-9096-8ceb3ea7946c@codeaurora.org> (raw)
In-Reply-To: <20200524125925.41102b3b@archlinux>

Hi Jonathan,

On 5/24/2020 5:29 PM, Jonathan Cameron wrote:
> On Fri, 22 May 2020 19:54:10 +0530
> 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.
>>
>> Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
>> ---
>>   drivers/iio/adc/qcom-spmi-adc5.c   | 231 ++++++++++++++++++++++++++++++--
>>   drivers/iio/adc/qcom-vadc-common.c | 260 +++++++++++++++++++++++++++++++++++++
>>   drivers/iio/adc/qcom-vadc-common.h |  14 ++
>>   3 files changed, 496 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
>> index 21fdcde..e1482fd 100644
>> --- a/drivers/iio/adc/qcom-spmi-adc5.c
>> +++ b/drivers/iio/adc/qcom-spmi-adc5.c
>> @@ -1,6 +1,6 @@
>>   // SPDX-License-Identifier: GPL-2.0
>>   /*
>> - * Copyright (c) 2018, The Linux Foundation. All rights reserved.
>> + * Copyright (c) 2018, 2020, The Linux Foundation. All rights reserved.
> ...
>> @@ -110,6 +120,7 @@ struct adc5_channel_prop {
>>   	enum adc5_cal_method	cal_method;
>>   	enum adc5_cal_val	cal_val;
>>   	unsigned int		decimation;
>> +	unsigned int		sid;
>>   	unsigned int		prescale;
>>   	unsigned int		hw_settle_time;
>>   	unsigned int		avg_samples;
>> @@ -140,6 +151,7 @@ struct adc5_chip {
>>   	bool			poll_eoc;
>>   	struct completion	complete;
>>   	struct mutex		lock;
>> +	int			irq_eoc;
> This is introduced but doesn't seem to be used...
I'll remove it in the next post.
>
>>   	const struct adc5_data	*data;
>>   };
>>   
>> @@ -155,6 +167,8 @@ static const struct vadc_prescale_ratio adc5_prescale_ratios[] = {
>>   	{.num =  1, .den = 16}
>>   };
>>   
> ...
>
>>   static int adc5_prescaling_from_dt(u32 num, u32 den)
>>   {
>>   	unsigned int pre;
>> @@ -285,7 +304,7 @@ static int adc5_configure(struct adc5_chip *adc,
>>   
>>   	/* Read registers 0x42 through 0x46 */
>>   	ret = adc5_read(adc, ADC5_USR_DIG_PARAM, buf, sizeof(buf));
>> -	if (ret < 0)
>> +	if (ret)
>>   		return ret;
> As Andy mentioned, this is better in a separate patch. It's just adding
> noise to this patch which is actually doing things...
I'll split it out into a separate patch in the next post.
>
>>   
>>   	/* Digital param selection */
>> @@ -314,6 +333,47 @@ static int adc5_configure(struct adc5_chip *adc,
>>   	return adc5_write(adc, ADC5_USR_DIG_PARAM, buf, sizeof(buf));
>>   }
>>   
> Thanks,
>
> Jonathan

  reply	other threads:[~2020-05-28 16:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1590157452-27179-1-git-send-email-jprakash@codeaurora.org>
2020-05-22 14:24 ` [PATCH V5 1/5] iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format Jishnu Prakash
2020-05-22 14:24 ` [PATCH V5 2/5] iio: adc: Add PMIC7 ADC bindings Jishnu Prakash
2020-05-22 14:24 ` [PATCH V5 3/5] iio: adc: Add support for PMIC7 ADC Jishnu Prakash
2020-05-22 15:37   ` Andy Shevchenko
2020-05-22 15:41     ` Andy Shevchenko
2020-05-28 16:47     ` Jishnu Prakash
2020-05-24 11:59   ` Jonathan Cameron
2020-05-28 16:47     ` Jishnu Prakash [this message]
2020-05-22 14:24 ` [PATCH V5 4/5] iio: adc: Update debug prints Jishnu Prakash
2020-05-22 15:39   ` Andy Shevchenko
2020-05-22 14:24 ` [PATCH V5 5/5] iio: adc: Clean up ADC code common to PMIC5 and PMIC7 Jishnu Prakash
2020-05-22 15:41   ` Andy Shevchenko
2020-05-28 16:49     ` Jishnu Prakash
2020-05-24 12:04   ` Jonathan Cameron
2020-05-28 16:50     ` 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=795197a7-a43f-a2b6-9096-8ceb3ea7946c@codeaurora.org \
    --to=jprakash@codeaurora.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=aghayal@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=amit.kucheria@verdurent.com \
    --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=mka@chromium.org \
    --cc=pmeerw@pmeerw.net \
    --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).