From: "Michał Mirosław" <mirqus@gmail.com> To: Jonathan Cameron <jic23@kernel.org> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>, Lars-Peter Clausen <lars@metafoo.de>, Brian Lilly <brian@crystalfontz.com>, linux-iio@vger.kernel.org, Brent-Crosby <brent@crystalfontz.com>, Jim Wall <jimwall@q.com>, Hector Palacios <hector.palacios@digi.com>, Alexandre Belloni <alexandre.belloni@free-electrons.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH] iio: mxs-lradc: compute temperature from channel 8 and 9 Date: Sat, 30 Nov 2013 13:24:23 +0100 [thread overview] Message-ID: <CAHXqBF++HsFLG84vQjWeb=QmgE4yjJqYEj_zLS34m2WMDJ2CRA@mail.gmail.com> (raw) In-Reply-To: <5299D7D1.3050801@kernel.org> 2013/11/30 Jonathan Cameron <jic23@kernel.org>: > On 11/30/13 12:15, Jonathan Cameron wrote: >> On 11/19/13 10:36, Maxime Ripard wrote: >>> From: Alexandre Belloni <alexandre.belloni@free-electrons.com> >>> >>> The mxs LRADC is able to read an internal die temperature sensor. The >>> temperature has to be calculated from the value read on channel 8 and c= hannel 9. >>> To be able to expose the result to hwmon, implement iio channel 8 as >>> (channel 9 - channel 8). Then, implement IIO_CHAN_INFO_SCALE and >>> IIO_CHAN_INFO_OFFSET so that it can be processed by hwmon through the i= n kernel >>> provider/consumer mechanism. >>> >>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> >>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> >>> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> >> As this is still in staging, I think we can get away with the resulting >> ABI change from this patch. >> >> Applied to the togreg branch of iio.git >> >> Thanks, >> >> Jonathan > Having said that, there is an odd bit inline that I've just dropped whils= t > applying the patch. Shout if I've done this wrong. >>> --- >>> drivers/staging/iio/adc/mxs-lradc.c | 91 +++++++++++++++++++++++++++++= ++------ >>> 1 file changed, 78 insertions(+), 13 deletions(-) >>> >>> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/= adc/mxs-lradc.c >>> index a08c1736458b..fec76090dae5 100644 >>> --- a/drivers/staging/iio/adc/mxs-lradc.c >>> +++ b/drivers/staging/iio/adc/mxs-lradc.c >>> @@ -231,20 +231,11 @@ struct mxs_lradc { >>> /* >>> * Raw I/O operations >>> */ >>> -static int mxs_lradc_read_raw(struct iio_dev *iio_dev, >>> - const struct iio_chan_spec *chan, >>> - int *val, int *val2, long m) >>> +static int mxs_lradc_read_single(struct iio_dev *iio_dev, int chan, in= t *val) [...] >>> @@ -269,7 +260,7 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_d= ev, [...] >>> - writel(chan->channel, lradc->base + LRADC_CTRL4 + STMP_OFFSET_REG_= SET); >>> + writel(chan, lradc->base + LRADC_CTRL4 + STMP_OFFSET_REG_SET); > > This doesn't make any sense. I'm guessing it drifted in from a different= patch? 'chan' changed type here, and the function got a new name. I would assume thant this won't build if you dropped the part above. Best Regards, Micha=C5=82 Miros=C5=82aw
WARNING: multiple messages have this Message-ID (diff)
From: mirqus@gmail.com (Michał Mirosław) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] iio: mxs-lradc: compute temperature from channel 8 and 9 Date: Sat, 30 Nov 2013 13:24:23 +0100 [thread overview] Message-ID: <CAHXqBF++HsFLG84vQjWeb=QmgE4yjJqYEj_zLS34m2WMDJ2CRA@mail.gmail.com> (raw) In-Reply-To: <5299D7D1.3050801@kernel.org> 2013/11/30 Jonathan Cameron <jic23@kernel.org>: > On 11/30/13 12:15, Jonathan Cameron wrote: >> On 11/19/13 10:36, Maxime Ripard wrote: >>> From: Alexandre Belloni <alexandre.belloni@free-electrons.com> >>> >>> The mxs LRADC is able to read an internal die temperature sensor. The >>> temperature has to be calculated from the value read on channel 8 and channel 9. >>> To be able to expose the result to hwmon, implement iio channel 8 as >>> (channel 9 - channel 8). Then, implement IIO_CHAN_INFO_SCALE and >>> IIO_CHAN_INFO_OFFSET so that it can be processed by hwmon through the in kernel >>> provider/consumer mechanism. >>> >>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> >>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> >>> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> >> As this is still in staging, I think we can get away with the resulting >> ABI change from this patch. >> >> Applied to the togreg branch of iio.git >> >> Thanks, >> >> Jonathan > Having said that, there is an odd bit inline that I've just dropped whilst > applying the patch. Shout if I've done this wrong. >>> --- >>> drivers/staging/iio/adc/mxs-lradc.c | 91 +++++++++++++++++++++++++++++++------ >>> 1 file changed, 78 insertions(+), 13 deletions(-) >>> >>> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c >>> index a08c1736458b..fec76090dae5 100644 >>> --- a/drivers/staging/iio/adc/mxs-lradc.c >>> +++ b/drivers/staging/iio/adc/mxs-lradc.c >>> @@ -231,20 +231,11 @@ struct mxs_lradc { >>> /* >>> * Raw I/O operations >>> */ >>> -static int mxs_lradc_read_raw(struct iio_dev *iio_dev, >>> - const struct iio_chan_spec *chan, >>> - int *val, int *val2, long m) >>> +static int mxs_lradc_read_single(struct iio_dev *iio_dev, int chan, int *val) [...] >>> @@ -269,7 +260,7 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev, [...] >>> - writel(chan->channel, lradc->base + LRADC_CTRL4 + STMP_OFFSET_REG_SET); >>> + writel(chan, lradc->base + LRADC_CTRL4 + STMP_OFFSET_REG_SET); > > This doesn't make any sense. I'm guessing it drifted in from a different patch? 'chan' changed type here, and the function got a new name. I would assume thant this won't build if you dropped the part above. Best Regards, Micha? Miros?aw
next prev parent reply other threads:[~2013-11-30 12:24 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-19 10:36 [PATCH] iio: mxs-lradc: compute temperature from channel 8 and 9 Maxime Ripard 2013-11-19 10:36 ` Maxime Ripard 2013-11-19 10:51 ` Peter Meerwald 2013-11-19 10:51 ` Peter Meerwald 2013-11-19 11:31 ` Lars-Peter Clausen 2013-11-19 11:31 ` Lars-Peter Clausen 2013-11-30 12:15 ` Jonathan Cameron 2013-11-30 12:15 ` Jonathan Cameron 2013-11-30 12:19 ` Jonathan Cameron 2013-11-30 12:19 ` Jonathan Cameron 2013-11-30 12:24 ` Michał Mirosław [this message] 2013-11-30 12:24 ` Michał Mirosław 2013-11-30 12:27 ` Jonathan Cameron 2013-11-30 12:27 ` Jonathan Cameron 2013-11-30 12:29 ` Jonathan Cameron 2013-11-30 12:29 ` Jonathan Cameron 2013-11-30 13:37 ` Maxime Ripard 2013-11-30 13:37 ` Maxime Ripard
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='CAHXqBF++HsFLG84vQjWeb=QmgE4yjJqYEj_zLS34m2WMDJ2CRA@mail.gmail.com' \ --to=mirqus@gmail.com \ --cc=alexandre.belloni@free-electrons.com \ --cc=brent@crystalfontz.com \ --cc=brian@crystalfontz.com \ --cc=hector.palacios@digi.com \ --cc=jic23@kernel.org \ --cc=jimwall@q.com \ --cc=lars@metafoo.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-iio@vger.kernel.org \ --cc=maxime.ripard@free-electrons.com \ /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: linkBe 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.