Received: by 10.192.165.156 with SMTP id m28csp2051491imm; Thu, 12 Apr 2018 07:51:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/uqHa+grR78V1ncEJVf6ph+XCQmOJ4Ta1RjRgnar1OkKFX+HzTTghEHpGvTnbj30VQu6yp X-Received: by 2002:a17:902:8606:: with SMTP id f6-v6mr1431186plo.258.1523544711628; Thu, 12 Apr 2018 07:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523544711; cv=none; d=google.com; s=arc-20160816; b=wjTN0X4aVUGQGGlacwxodHLvGcOM1dE8PdJiQV2wE5FJ0Nr6bcZMhnwn+5MgzkCtKX Qt1HmyXjAqh6jxp66fM2uUYf6imuOFJOwfFtrY077dE8EsIrDPzLxUhMKkWAc3Tl9XMM LEEn4uJiXBRJghCmNa6K6SRgOXugflKB5MW1EocIxyPMJvu5gPIOwbhywbxmMzqS70zq dXyUFPQPhqNcQwH2I0ra2RHLEXigfEwv2jK+RfGGp2fgqiLiJKuBRzvemZf8PW7Zb9vf aKF4+JGkLQ9lG1/92Q1na3m0WwaYC5b5Np9NslTxMa8uzyFMyeqjIHOxnllCetHrPYAs zb/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=1nWIRSK28UZfYsNdiiO4LN2iJqVlsTYSu3zMiz2QCsU=; b=MWRhJgL4uvEVwdVHb6fcZnF87mcEMoIrP2harppqPS0L9fYoTW1Df96UtyhrosH+OM bkAwd7N0cnT9b+AyG0ndKU4EmoA9yrHxA1OaXlbXGCjtowVqNZtU5G/Z0b3ipvtsuI5J iswQ//rxRA0sh0IccMPLA2Z/uDLoJBWZQIamXiDw4+KE3PgULPdp8hMILDCmpKCWAqvZ ONU1j5Ceavw30yEpoFBS57XJQHgzoZBp4tlLiNQwfWSsXAUCVZjpGTaxlQjap5BkZwOp MTMnfNc31kXfpLu7b64jLkJAUCSO5qwVcQtY6AApc4OtwKbg3WLzw/X7G6ZsUofRBEa2 AaXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37-v6si3416222plq.288.2018.04.12.07.51.14; Thu, 12 Apr 2018 07:51:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752956AbeDLOpN (ORCPT + 99 others); Thu, 12 Apr 2018 10:45:13 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:51478 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752908AbeDLOpL (ORCPT ); Thu, 12 Apr 2018 10:45:11 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 40MNx10sn1z1qymY; Thu, 12 Apr 2018 16:45:09 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 40MNx10XbZz1qqlD; Thu, 12 Apr 2018 16:45:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id KzvotsMosqrO; Thu, 12 Apr 2018 16:45:08 +0200 (CEST) X-Auth-Info: WQSodfbMSr+KfVe5APJB6gNL6NlLNGGy/AnwnqlQNcI= Received: from jawa (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 12 Apr 2018 16:45:07 +0200 (CEST) Date: Thu, 12 Apr 2018 16:45:01 +0200 From: Lukasz Majewski To: Joe Perches Cc: Lee Jones , linux-kernel@vger.kernel.org, Sascha Hauer Subject: Re: [PATCH] mfd: mc13xxx: Add mc34708 adc support Message-ID: <20180412164501.66b50f81@jawa> In-Reply-To: <2f5a6878bf17e9cfa78de3c5b2ae52c1e8995bb1.camel@perches.com> References: <20180411140929.30357-1-lukma@denx.de> <2f5a6878bf17e9cfa78de3c5b2ae52c1e8995bb1.camel@perches.com> Organization: denx.de X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/AeRPRXKhF9dReqGEQvnuF_q"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/AeRPRXKhF9dReqGEQvnuF_q Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Joe, > On Wed, 2018-04-11 at 16:09 +0200, Lukasz Majewski wrote: > > From: Sascha Hauer > >=20 > > 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. =20 > [] > > diff --git a/drivers/mfd/mc13xxx-core.c > > b/drivers/mfd/mc13xxx-core.c =20 > [] > > +static int mc34708_adc_conversion(struct mc13xxx *mc13xxx, > > unsigned int mode, > > + unsigned int channel, u8 ato, bool atox, > > + unsigned int *sample) > > +{ > > + int ret, i; =20 > [] > > + if (mc13xxx->adcflags & MC13XXX_ADC_WORKING) { > > + ret =3D -EBUSY; > > + goto out; > > + } =20 >=20 > This doesn't work. >=20 > > [] > > + mc13xxx_irq_free(mc13xxx, MC34708_IRQ_TSDONE, > > &adcdone_data); + > > + if (!ret) { > > + ret =3D -ETIMEDOUT; > > + goto out; > > + } =20 > [] > > +out: > > + ret =3D mc13xxx_reg_write(mc13xxx, MC13XXX_ADC0, old_adc0); =20 >=20 > ret is reassigned here, so the ret =3D - > uses above don't do what is expected. Right. Thanks for spotting this. I will fix it in v2. >=20 > > + > > + mc13xxx->adcflags &=3D ~MC13XXX_ADC_WORKING; > > + mc13xxx_unlock(mc13xxx); > > + > > + return ret; > > +} =20 >=20 Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de --Sig_/AeRPRXKhF9dReqGEQvnuF_q Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAlrPcO0ACgkQAR8vZIA0 zr0sjQf+KlaH2c6P+Z5CPbxHMOVbFzsN31RewwIEYWwoBbhktbrYT+ghR47Eq411 foX4R0Zc6aJnoQc1L5cYeLg1upyaTBM4hRl0aXXCuT9J6iYlOH7fMvH+AgdzoH4a dkRAOE2exrnjeV/5HQiZwsJAeMGWZAP9seWRFAmv2YeChuii3rhLAF1EFPgyvexr okfWXxqZ99lbfGQkSPaQDiowwWOMYW/wVdm9Jxpxn72i6bGFR8O4p+J1Y1vRFD8y OiqVMhUh0wSnZbGR6okb5GhfSboi8CCb7QZMWQbqh/lzEQNQTQcwDAqCbL4C5w7S ei15ycCo747iHicC9BbETpbIKVeWnw== =MHVE -----END PGP SIGNATURE----- --Sig_/AeRPRXKhF9dReqGEQvnuF_q--