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: <1411128994.3997.19.camel@iivanov-dev>
Date:	Fri, 19 Sep 2014 15:16:34 +0300
From:	"Ivan T. Ivanov" <iivanov@...sol.com>
To:	Kiran Padwal <kiran.padwal@...rtplayin.com>
Cc:	Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Jonathan Cameron <jic23@...nel.org>,
	Grant Likely <grant.likely@...aro.org>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Hartmut Knaack <knaack.h@....de>,
	Lee Jones <lee.jones@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-iio@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH] iio: iadc: Qualcomm SPMI PMIC current ADC driver


Hi Kiran,

On Fri, 2014-09-19 at 15:49 +0530, Kiran Padwal wrote:
> Hi Ivan,
> 
> On Thursday 18 September 2014 06:45 PM, Ivan T. Ivanov wrote:
> > The current ADC is peripheral of Qualcomm SPMI PMIC chips. It has
> > 16 bits resolution and register space inside PMIC accessible across
> > SPMI bus.
> > 
> > The driver registers itself through IIO interface.
> > 
> > Signed-off-by: Ivan T. Ivanov <iivanov@...sol.com>
> > ---
> >  .../devicetree/bindings/iio/adc/qcom,spmi-iadc.txt |  61 ++
> 
> <snip>
> 
> > diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> > index 11b048a..77274e4 100644
> > --- a/drivers/iio/adc/Kconfig
> > +++ b/drivers/iio/adc/Kconfig
> > @@ -279,4 +279,15 @@ config XILINX_XADC
> >  	  The driver can also be build as a module. If so, the module will be called
> >  	  xilinx-xadc.
> >  
> > +config QCOM_SPMI_IADC
> > +	tristate "Qualcomm SPMI PMIC current ADC"
> > +	select REGMAP_SPMI
> > +	depends on IIO
> 
> May be you need to add "SPMI" in depends on because without enabling that it breaks.

Right. 

> 
> > +	help
> > +	  This is the IIO Current ADC driver for Qualcomm QPNP IADC Chip.
> > +
> > +	  The driver supports single mode operation to read from upto seven channel
> > +	  configuration that include reading the external/internal Rsense, CSP_EX,
> > +	  CSN_EX pair along with the gain and offset calibration.
> > +
> >  endmenu
> 
> <snip>
> 
> > +
> > +	return iadc_write(iadc, IADC_EN_CTL1, data);
> > +}
> > +
> > +static void iadc_status_show(struct iadc_chip *iadc)
> > +{
> > +	u8 mode, sta1, chan, dig, en, req;
> 
> During compilation, getting a waring as below for all variables,
> 
> rivers/iio/adc/qcom-spmi-iadc.c: In function ‘iadc_poll_wait_eoc’:
> drivers/iio/adc/qcom-spmi-iadc.c:227:10: warning: ‘en’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>   dev_warn(iadc->dev,
>           ^
> 

Right. I am not sure why I am not getting this warning.

> > +	int ret;
> > +
> > +	ret = iadc_read(iadc, IADC_MODE_CTL, &mode);
> > +	if (ret < 0)
> > +		return;
> > +
> > +	ret = iadc_read(iadc, IADC_DIG_PARAM, &dig);
> 

Thank you for review.

Regards,
Ivan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ