devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hartmut Knaack <knaack.h@gmx.de>
To: Stanimir Varbanov <svarbanov@mm-sol.com>,
	"Ivan T. Ivanov" <iivanov@mm-sol.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Pawel Moll <pawel.moll@arm.com>, Rob Herring <robh+dt@kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Grant Likely <grant.likely@linaro.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Angelo Compagnucci <angelo.compagnucci@gmail.com>,
	Doug Anderson <dianders@chromium.org>,
	Fugang Duan <B38611@freescale.com>,
	Johannes Thumshirn <johannes.thumshirn@men.de>,
	Jean Delvare <jdelvare@suse.de>,
	Philippe Reynes <tremyfr@yahoo.fr>,
	Lee Jones <lee.jones@linaro.org>,
	Josh Cartwright <joshc@codeaurora.org>,
	Stephen Boyd <sboyd@codeaurora.org>, David Collins <collinsd@c>
Subject: Re: [PATCH v3 1/2] iio: vadc: Qualcomm SPMI PMIC voltage ADC driver
Date: Mon, 13 Oct 2014 00:14:12 +0200	[thread overview]
Message-ID: <543AFD34.5060602@gmx.de> (raw)
In-Reply-To: <54243533.7080809@mm-sol.com>

Stanimir Varbanov schrieb am 25.09.2014 17:30:
> Hi Ivan,
> 
> On 09/25/2014 03:47 PM, Ivan T. Ivanov wrote:
>>
>> Hi Stan, few comment bellow.
>>
>> On Wed, 2014-09-24 at 15:56 +0300, Stanimir Varbanov wrote:
>>> The voltage ADC is peripheral of Qualcomm SPMI PMIC chips. It has
>>> 15bits resolution and register space inside PMIC accessible across
>>> SPMI bus.
>>>
>>> The vadc driver registers itself through IIO interface.
>>>
>>> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
>>> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
>>> ---
>>>  drivers/iio/adc/Kconfig                       |   10 +
>>>  drivers/iio/adc/Makefile                      |    1 +
>>>  drivers/iio/adc/qcom-spmi-vadc.c              | 1029 +++++++++++++++++++++++++
>>>  include/dt-bindings/iio/qcom,spmi-pmic-vadc.h |  119 +++
>>>  4 files changed, 1159 insertions(+), 0 deletions(-)
>>>  create mode 100644 drivers/iio/adc/qcom-spmi-vadc.c
>>>  create mode 100644 include/dt-bindings/iio/qcom,spmi-pmic-vadc.h
>>>
>>> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
>>> index 11b048a..ec48360 100644
>>> --- a/drivers/iio/adc/Kconfig
>>> +++ b/drivers/iio/adc/Kconfig
>>> @@ -206,6 +206,16 @@ config NAU7802
>>>  	  To compile this driver as a module, choose M here: the
>>>  	  module will be called nau7802.
>>>  
>>> +config QCOM_SPMI_VADC
>>> +	tristate "Qualcomm SPMI PMIC voltage ADC"
>>> +	depends on SPMI
>>
>> + select REGMAP_SPMI
> 
> I'd suggest MFD_SPMI_PMIC symbol of the parent driver instead? The
> parent MFD PMIC driver already selects REGMAP_SPMI and depends on SPMI.
> 
>>
>> <snip>
>>
>>> +
>>> +static int vadc_read(struct vadc_priv *vadc, u16 offset, u8 *data)
>>> +{
>>> +	return regmap_bulk_read(vadc->regmap, vadc->base + offset, data, 1);
>>
>> just regmap_read() ?
> 
> No, regmap_read() expects unsigned int *val as an argument hence I will
> need temporary variable. I had a comment to rework this on the first
> version of the patchset.
> 
>>
>>> +}
>>> +
>>
>> General comment, most of the dev_dbg looks like legitimate dev_err's to me.
> 
> I've decided to not flood console with messages. If someone wants to
> debug why the driver doesn't probed he can define DEBUG.
> 
I would also say that whenever you return an error code, it would be a good idea to replace the dev_dbg with dev_err. It should just rarely occur to have such errors, and if memory consumption is no issue, then I don't see a valid reason to go the full way of recompiling, getting the new kernel(-module) on the device and maybe even reboot.

  parent reply	other threads:[~2014-10-12 22:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 12:56 [PATCH v3 0/2] Intial support for voltage ADC Stanimir Varbanov
     [not found] ` <1411563415-11933-1-git-send-email-svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-09-24 12:56   ` [PATCH v3 1/2] iio: vadc: Qualcomm SPMI PMIC voltage ADC driver Stanimir Varbanov
     [not found]     ` <1411563415-11933-2-git-send-email-svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-09-25 12:47       ` Ivan T. Ivanov
2014-09-25 15:30         ` Stanimir Varbanov
     [not found]           ` <54243533.7080809-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-09-25 19:27             ` Ivan T. Ivanov
2014-10-12 22:14           ` Hartmut Knaack [this message]
2014-10-02  9:29       ` Ivan T. Ivanov
     [not found]         ` <542D1B11.8070600-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-10-02 12:08           ` Ivan T. Ivanov
2014-10-04 11:51             ` Jonathan Cameron
     [not found]               ` <542FDF41.2040106-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-10-07 11:57                 ` Ivan T. Ivanov
2014-10-16 13:58                 ` Ivan T. Ivanov
2014-10-12 22:07     ` Hartmut Knaack
2014-10-14  9:36       ` Stanimir Varbanov
2014-09-24 12:56   ` [PATCH v3 2/2] DT: iio: vadc: document dt binding Stanimir Varbanov
2014-09-27  9:43     ` Jonathan Cameron
2014-10-11 23:05     ` Hartmut Knaack
2014-10-14  5:28       ` Stanimir Varbanov
     [not found]     ` <1411563415-11933-3-git-send-email-svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-10-13 15:00       ` Mark Rutland
2014-10-14  9:27         ` Stanimir Varbanov
     [not found]           ` <543CEC7F.50208-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-10-31 14:40             ` Ivan T. Ivanov

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=543AFD34.5060602@gmx.de \
    --to=knaack.h@gmx.de \
    --cc=B38611@freescale.com \
    --cc=angelo.compagnucci@gmail.com \
    --cc=arnd@arndb.de \
    --cc=collinsd@c \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=iivanov@mm-sol.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jdelvare@suse.de \
    --cc=jic23@kernel.org \
    --cc=johannes.thumshirn@men.de \
    --cc=joshc@codeaurora.org \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.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=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=svarbanov@mm-sol.com \
    --cc=tremyfr@yahoo.fr \
    /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).