From: Joe Perches <joe@perches.com>
To: Lukasz Majewski <lukma@denx.de>, Lee Jones <lee.jones@linaro.org>
Cc: linux-kernel@vger.kernel.org, Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH] mfd: mc13xxx: Add mc34708 adc support
Date: Wed, 11 Apr 2018 08:57:17 -0700 [thread overview]
Message-ID: <2f5a6878bf17e9cfa78de3c5b2ae52c1e8995bb1.camel@perches.com> (raw)
In-Reply-To: <20180411140929.30357-1-lukma@denx.de>
On Wed, 2018-04-11 at 16:09 +0200, Lukasz Majewski wrote:
> From: Sascha Hauer <s.hauer@pengutronix.de>
>
> The mc34708 has an improved adc. The older variants will always convert
> a fixed order of channels. The mc34708 can do up to eight conversions
> in arbitrary channel order. Currently this extended feature is not
> supported. We only support touchscreen conversions now, which will
> be sampled in a data format compatible to the older chips in order
> to keep the API between the mfd and the touchscreen driver.
[]
> diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
[]
> +static int mc34708_adc_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
> + unsigned int channel, u8 ato, bool atox,
> + unsigned int *sample)
> +{
> + int ret, i;
[]
> + if (mc13xxx->adcflags & MC13XXX_ADC_WORKING) {
> + ret = -EBUSY;
> + goto out;
> + }
This doesn't work.
> []
> + mc13xxx_irq_free(mc13xxx, MC34708_IRQ_TSDONE, &adcdone_data);
> +
> + if (!ret) {
> + ret = -ETIMEDOUT;
> + goto out;
> + }
[]
> +out:
> + ret = mc13xxx_reg_write(mc13xxx, MC13XXX_ADC0, old_adc0);
ret is reassigned here, so the ret = -<FOO>
uses above don't do what is expected.
> +
> + mc13xxx->adcflags &= ~MC13XXX_ADC_WORKING;
> + mc13xxx_unlock(mc13xxx);
> +
> + return ret;
> +}
next prev parent reply other threads:[~2018-04-11 15:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 14:09 Lukasz Majewski
2018-04-11 15:57 ` Joe Perches [this message]
2018-04-12 14:45 ` Lukasz Majewski
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=2f5a6878bf17e9cfa78de3c5b2ae52c1e8995bb1.camel@perches.com \
--to=joe@perches.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukma@denx.de \
--cc=s.hauer@pengutronix.de \
/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
all inboxes | Powered by JetHome®