From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AECADC04AB1 for ; Sat, 11 May 2019 10:24:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83B5F217D6 for ; Sat, 11 May 2019 10:24:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XqKSMs0p"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="v4U603/b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83B5F217D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Vb0qfFDOVn2S8FUGGqkGVVNVYEMB+xR89pZQYOqyvxM=; b=XqKSMs0ppAYaJF +HOIA26KoMb2eszFReSMxYS2vRz6lp4KKiGHa6QyAayn+DbaIrmK3Bqy0espC6oUESPaqizm66JyZ ojRSvq6YWUA4fOdtNLT3wE9kYSsVUOW75/vIxtS6C8vy5Z0XFVtKg33F6WzTpZ4STcHP8E1HE2wLh F6oHMJ/3eJdkvefpxNEV9yYu2XZXBRoOMsU3D3a5DwipeqZebOYvHzHc3xRcUJjHvsrwDWIxoAe0v Mg0cCmVcF96YgaiTBls+zhE3v282NpZ+m8Zohh7+5NTz74KFQPX0TXIH6PqOkZOLjz3+6Ll/z4pQA GvNNq86JuKimk5+EzcQQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPPBH-0007ve-Oc; Sat, 11 May 2019 10:24:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPPBE-0007vD-Gt for linux-arm-kernel@lists.infradead.org; Sat, 11 May 2019 10:24:37 +0000 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE1E62173B; Sat, 11 May 2019 10:24:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557570276; bh=Ol9ib5bihEYIjrd1c8mt+AxCWFeb4Ti7BaHuwJkxvQA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=v4U603/bLabnldrLM6MOiPNDVz7DK0r/MC9QoaiSqqorwz+ySd4TjrJKypZ3+bF9s Oi7pE83vuWve+W8K6qopE3LO/K10MtfkVM1TJXht3uXte67oWPnpF2vxXDyky7JEUN So9eLCXfDPm7MdKyCanuDsLdFHH6/rXp2DvYpyD8= Date: Sat, 11 May 2019 11:24:29 +0100 From: Jonathan Cameron To: Philippe Schenker Subject: Re: [PATCH 5/5] iio: stmpe-adc: Reset possible interrupts Message-ID: <20190511112429.25ddd84d@archlinux> In-Reply-To: <20190507143615.28477-5-dev@pschenker.ch> References: <20190507143615.28477-1-dev@pschenker.ch> <20190507143615.28477-5-dev@pschenker.ch> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190511_032436_582496_7CED96A7 X-CRM114-Status: GOOD ( 16.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Coquelin , Lars-Peter Clausen , Max Krummenacher , Philippe Schenker , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Agner , Marcel Ziswiler , David Laight , Peter Meerwald-Stadler , Hartmut Knaack , Lee Jones , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Alexandre Torgue Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 7 May 2019 16:36:15 +0200 Philippe Schenker wrote: > From: Philippe Schenker > > Clear any interrupt that still is on the device on every channel > this driver is activated for in probe and specific channels in > the timeout handler. > > Signed-off-by: Philippe Schenker I'm never particularly clean on blanket resets as they do tend to hide bugs. However, the probe one is something that would happen anyway if there was a 'reset' function. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > > --- > > drivers/iio/adc/stmpe-adc.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/iio/adc/stmpe-adc.c b/drivers/iio/adc/stmpe-adc.c > index cc752a47444c..a5990e9f2c80 100644 > --- a/drivers/iio/adc/stmpe-adc.c > +++ b/drivers/iio/adc/stmpe-adc.c > @@ -80,6 +80,8 @@ static int stmpe_read_voltage(struct stmpe_adc *info, > ret = wait_for_completion_timeout(&info->completion, STMPE_ADC_TIMEOUT); > > if (ret <= 0) { > + stmpe_reg_write(info->stmpe, STMPE_REG_ADC_INT_STA, > + STMPE_ADC_CH(info->channel)); > mutex_unlock(&info->lock); > return -ETIMEDOUT; > } > @@ -326,6 +328,9 @@ static int stmpe_adc_probe(struct platform_device *pdev) > stmpe_reg_write(info->stmpe, STMPE_REG_ADC_INT_EN, > ~(norequest_mask & 0xFF)); > > + stmpe_reg_write(info->stmpe, STMPE_REG_ADC_INT_STA, > + ~(norequest_mask & 0xFF)); > + > return devm_iio_device_register(&pdev->dev, indio_dev); > } > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel