All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Welling <mwelling-EkmVulN54Sk@public.gmane.org>
To: Sricharan <sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: 'Wolfram Sang' <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	'Daniel Baluta'
	<daniel.baluta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	'Jonathan Cameron'
	<jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	'Hartmut Knaack' <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
	'Lars-Peter Clausen'
	<lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	'Peter Meerwald-Stadler'
	<pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>,
	'Linux Kernel Mailing List'
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	'Lucas De Marchi'
	<lucas.demarchi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	'Andy Gross' <agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	'Pramod Gurav'
	<pramod.gurav-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>,
	'Bjorn Andersson'
	<bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>,
	'Guenter Roeck' <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
	eibach-dJ+jgKLZIg4@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v4] iio: adc: Add TI ADS1015 ADC driver support
Date: Mon, 8 Feb 2016 13:16:58 -0600	[thread overview]
Message-ID: <20160208191658.GA23145@deathstar> (raw)
In-Reply-To: <01fd01d162a4$8e28c450$aa7a4cf0$@codeaurora.org>

On Tue, Feb 09, 2016 at 12:41:35AM +0530, Sricharan wrote:
> Hi,
> 
> > -----Original Message-----
> > From: Michael Welling [mailto:mwelling79-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] On Behalf Of Michael
> > Welling
> > Sent: Monday, February 08, 2016 10:07 PM
> > To: Wolfram Sang
> > Cc: Daniel Baluta; Jonathan Cameron; Hartmut Knaack; Lars-Peter Clausen;
> > Peter Meerwald-Stadler; Linux Kernel Mailing List;
> linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org;
> > Lucas De Marchi; Andy Gross; Pramod Gurav; Bjorn Andersson; Guenter
> > Roeck; eibach-dJ+jgKLZIg4@public.gmane.org; Sricharan R; linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > Subject: Re: [PATCH v4] iio: adc: Add TI ADS1015 ADC driver support
> > 
> > On Mon, Feb 08, 2016 at 11:25:00AM +0100, Wolfram Sang wrote:
> > > On Fri, Feb 05, 2016 at 06:32:45PM -0600, Michael Welling wrote:
> > > > On Fri, Feb 05, 2016 at 09:32:34PM +0200, Daniel Baluta wrote:
> > > > > >> +static int ads1015_read_raw(struct iio_dev *indio_dev,
> > > > > >> +                         struct iio_chan_spec const *chan, int
> *val,
> > > > > >> +                         int *val2, long mask) {
> > > > > >> +     int ret, idx;
> > > > > >> +     struct ads1015_data *data = iio_priv(indio_dev);
> > > > > >> +
> > > > > >> +     mutex_lock(&data->lock);
> > > > > >> +     switch (mask) {
> > > > > >> +     case IIO_CHAN_INFO_RAW:
> > > > > >> +             if (iio_buffer_enabled(indio_dev)) {
> > > > > >> +                     ret = -EBUSY;
> > > > > >> +                     break;
> > > > > >> +             }
> > > > > >> +
> > > > > >> +             ret = ads1015_set_power_state(data, true);
> > > > > >> +             if (ret < 0)
> > > > > >> +                     break;
> > > > > >
> > > > > > Just tested the driver on a Dragonboard 410C with a robotics
> > > > > > mezzanine that I designed.
> > > > > >
> > > > > > The above ads1015_set_power_state(data, true) is always returning
> -
> > EINVAL.
> > > > > >
> > > > > > Any ideas why that would be happening?
> > > > > > I think it may be the return from pm_runtime_get_sync?
> > > > >
> > > > > Can you confirm that pm_runtime_get_sync fails? Using some printk?
> > > > >
> > > > > Also adding printks in suspend/resume function would be helpful.
> > > > > Do you have CONFIG_PM enabled?
> > > > >
> > > >
> > > > Indeed it is the pm_runtime_get_sync that fails with a -EINVAL.
> > > >
> > > > > >
> > > > > > When I comment out the break the readings come back but are not
> > updated continually.
> > > > > > If I read in_voltage0-voltage1_raw then in_voltage0_raw the value
> is
> > updated.
> > > > >
> > > > > I guess this is normal if set_power_state fails.
> > > >
> > > > The hwmod driver works fine BTW.
> > > >
> > > > My guess is there is an issue with the qup i2c driver seeing as it
> > > > has worked on other system without issue.
> > > >
> > > > CC'd some the latest developer on the qup i2c driver.
> > > >
> > > > I2C guys have any ideas on this?
> > > >
> > >
> > > Adding some more people who recently worked on this. Might be nice to
> > > know which kernel version you are using.
> > >
>  Which i2c bus is this connected to ? I can give a try with 410c to see why
> pm_runtime_get_sync from qup
>  fails.

It is on the lowspeed header. Here is my devicetree entry:

                 i2c@78b6000 {
                 /* On Low speed expansion */
                         label = "LS-I2C0";
                         status = "okay";
 
                         pca: pca@40 {
                                 compatible = "nxp,pca9685-pwm";
                                 #pwm-cells = <2>;
                                 reg = <0x40>;
                         };
 
                         adc: adc@48 {
                                 compatible = "ti,ads1015";
                                 reg = <0x48>;
                         };
                 };

> 
> Regards,
>   Sricharan
> 
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Michael Welling <mwelling@ieee.org>
To: Sricharan <sricharan@codeaurora.org>
Cc: 'Wolfram Sang' <wsa@the-dreams.de>,
	'Daniel Baluta' <daniel.baluta@intel.com>,
	'Jonathan Cameron' <jic23@kernel.org>,
	'Hartmut Knaack' <knaack.h@gmx.de>,
	'Lars-Peter Clausen' <lars@metafoo.de>,
	'Peter Meerwald-Stadler' <pmeerw@pmeerw.net>,
	'Linux Kernel Mailing List' <linux-kernel@vger.kernel.org>,
	linux-iio@vger.kernel.org,
	'Lucas De Marchi' <lucas.demarchi@intel.com>,
	'Andy Gross' <agross@codeaurora.org>,
	'Pramod Gurav' <pramod.gurav@smartplayin.com>,
	'Bjorn Andersson' <bjorn.andersson@sonymobile.com>,
	'Guenter Roeck' <linux@roeck-us.net>,
	eibach@gdsys.de, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v4] iio: adc: Add TI ADS1015 ADC driver support
Date: Mon, 8 Feb 2016 13:16:58 -0600	[thread overview]
Message-ID: <20160208191658.GA23145@deathstar> (raw)
In-Reply-To: <01fd01d162a4$8e28c450$aa7a4cf0$@codeaurora.org>

On Tue, Feb 09, 2016 at 12:41:35AM +0530, Sricharan wrote:
> Hi,
> 
> > -----Original Message-----
> > From: Michael Welling [mailto:mwelling79@gmail.com] On Behalf Of Michael
> > Welling
> > Sent: Monday, February 08, 2016 10:07 PM
> > To: Wolfram Sang
> > Cc: Daniel Baluta; Jonathan Cameron; Hartmut Knaack; Lars-Peter Clausen;
> > Peter Meerwald-Stadler; Linux Kernel Mailing List;
> linux-iio@vger.kernel.org;
> > Lucas De Marchi; Andy Gross; Pramod Gurav; Bjorn Andersson; Guenter
> > Roeck; eibach@gdsys.de; Sricharan R; linux-arm-msm@vger.kernel.org
> > Subject: Re: [PATCH v4] iio: adc: Add TI ADS1015 ADC driver support
> > 
> > On Mon, Feb 08, 2016 at 11:25:00AM +0100, Wolfram Sang wrote:
> > > On Fri, Feb 05, 2016 at 06:32:45PM -0600, Michael Welling wrote:
> > > > On Fri, Feb 05, 2016 at 09:32:34PM +0200, Daniel Baluta wrote:
> > > > > >> +static int ads1015_read_raw(struct iio_dev *indio_dev,
> > > > > >> +                         struct iio_chan_spec const *chan, int
> *val,
> > > > > >> +                         int *val2, long mask) {
> > > > > >> +     int ret, idx;
> > > > > >> +     struct ads1015_data *data = iio_priv(indio_dev);
> > > > > >> +
> > > > > >> +     mutex_lock(&data->lock);
> > > > > >> +     switch (mask) {
> > > > > >> +     case IIO_CHAN_INFO_RAW:
> > > > > >> +             if (iio_buffer_enabled(indio_dev)) {
> > > > > >> +                     ret = -EBUSY;
> > > > > >> +                     break;
> > > > > >> +             }
> > > > > >> +
> > > > > >> +             ret = ads1015_set_power_state(data, true);
> > > > > >> +             if (ret < 0)
> > > > > >> +                     break;
> > > > > >
> > > > > > Just tested the driver on a Dragonboard 410C with a robotics
> > > > > > mezzanine that I designed.
> > > > > >
> > > > > > The above ads1015_set_power_state(data, true) is always returning
> -
> > EINVAL.
> > > > > >
> > > > > > Any ideas why that would be happening?
> > > > > > I think it may be the return from pm_runtime_get_sync?
> > > > >
> > > > > Can you confirm that pm_runtime_get_sync fails? Using some printk?
> > > > >
> > > > > Also adding printks in suspend/resume function would be helpful.
> > > > > Do you have CONFIG_PM enabled?
> > > > >
> > > >
> > > > Indeed it is the pm_runtime_get_sync that fails with a -EINVAL.
> > > >
> > > > > >
> > > > > > When I comment out the break the readings come back but are not
> > updated continually.
> > > > > > If I read in_voltage0-voltage1_raw then in_voltage0_raw the value
> is
> > updated.
> > > > >
> > > > > I guess this is normal if set_power_state fails.
> > > >
> > > > The hwmod driver works fine BTW.
> > > >
> > > > My guess is there is an issue with the qup i2c driver seeing as it
> > > > has worked on other system without issue.
> > > >
> > > > CC'd some the latest developer on the qup i2c driver.
> > > >
> > > > I2C guys have any ideas on this?
> > > >
> > >
> > > Adding some more people who recently worked on this. Might be nice to
> > > know which kernel version you are using.
> > >
>  Which i2c bus is this connected to ? I can give a try with 410c to see why
> pm_runtime_get_sync from qup
>  fails.

It is on the lowspeed header. Here is my devicetree entry:

                 i2c@78b6000 {
                 /* On Low speed expansion */
                         label = "LS-I2C0";
                         status = "okay";
 
                         pca: pca@40 {
                                 compatible = "nxp,pca9685-pwm";
                                 #pwm-cells = <2>;
                                 reg = <0x40>;
                         };
 
                         adc: adc@48 {
                                 compatible = "ti,ads1015";
                                 reg = <0x48>;
                         };
                 };

> 
> Regards,
>   Sricharan
> 
> 
> 

  reply	other threads:[~2016-02-08 19:16 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05 13:17 [PATCH v4] iio: adc: Add TI ADS1015 ADC driver support Daniel Baluta
2016-02-05 17:25 ` Michael Welling
2016-02-05 19:32   ` Daniel Baluta
2016-02-05 19:50     ` Michael Welling
2016-02-06  0:32     ` Michael Welling
2016-02-08 10:25       ` Wolfram Sang
2016-02-08 14:44         ` Daniel Baluta
     [not found]           ` <CAEnQRZAQjhQRdzYUvo=aKgQScAyGUgp8Ni7nx9cEo1XhN_8Xyw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-08 15:03             ` Daniel Baluta
2016-02-08 15:03               ` Daniel Baluta
2016-02-08 16:37           ` Michael Welling
2016-02-08 16:36         ` Michael Welling
2016-02-08 16:36           ` Michael Welling
2016-02-08 19:11           ` Sricharan
2016-02-08 19:11             ` Sricharan
2016-02-08 19:16             ` Michael Welling [this message]
2016-02-08 19:16               ` Michael Welling
2016-02-08 20:00               ` Wolfram Sang
2016-02-08 20:00                 ` Wolfram Sang
2016-02-08 20:06                 ` Michael Welling
2016-02-08 20:06                   ` Michael Welling
2016-02-10 12:22               ` Sricharan
2016-02-10 12:22                 ` Sricharan
2016-02-10 12:56                 ` Daniel Baluta
     [not found]                   ` <CAEnQRZCzkq5wFsS7Ydby+bsFJTbGVq=AX9TLkkhfMKOG8gAZHA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-10 15:09                     ` Sricharan
2016-02-10 15:09                       ` Sricharan
2016-02-10 16:36                       ` Michael Welling
2016-02-10 16:36                         ` Michael Welling
2016-02-17 23:53                         ` Michael Welling
2016-02-18  8:45                           ` Sricharan
2016-02-18  8:45                             ` Sricharan
2016-02-05 21:02 ` Lucas De Marchi
2016-02-05 21:44   ` Daniel Baluta
2016-02-06 10:52     ` Jonathan Cameron
2016-02-06 11:05 ` Jonathan Cameron
2016-02-06 11:07   ` Jonathan Cameron
2016-03-01  0:50 ` Michael Welling
2016-03-01  1:09   ` Lucas De Marchi
2016-03-01  1:16     ` Michael Welling
2016-03-01  1:33     ` Michael Welling
2016-03-01  2:42     ` Michael Welling
2016-03-01  8:35       ` jic23
2016-03-01 16:02         ` Michael Welling
2016-03-01 17:24           ` Jonathan Cameron
2016-03-01 11:28       ` Daniel Baluta
2016-03-01 15:57         ` Michael Welling

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=20160208191658.GA23145@deathstar \
    --to=mwelling-ekmvuln54sk@public.gmane.org \
    --cc=agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
    --cc=daniel.baluta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=eibach-dJ+jgKLZIg4@public.gmane.org \
    --cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lucas.demarchi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
    --cc=pramod.gurav-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org \
    --cc=sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.