From patchwork Tue May 7 08:23:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Nyekjaer X-Patchwork-Id: 10932541 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AF7F314DB for ; Tue, 7 May 2019 08:23:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A13B1286CC for ; Tue, 7 May 2019 08:23:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 953CA28927; Tue, 7 May 2019 08:23:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 444E5286CC for ; Tue, 7 May 2019 08:23:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726175AbfEGIXU (ORCPT ); Tue, 7 May 2019 04:23:20 -0400 Received: from first.geanix.com ([116.203.34.67]:42566 "EHLO first.geanix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbfEGIXU (ORCPT ); Tue, 7 May 2019 04:23:20 -0400 Received: from zen.localdomain (unknown [85.184.147.232]) by first.geanix.com (Postfix) with ESMTPSA id D73B79EE; Tue, 7 May 2019 08:22:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1557217360; bh=NrfwDtp6F2bgm/6UPCb/JSu6blnlk9a81UTHq+Kuq2o=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=aGEGeC6OVJLN3T4KqbdBwh3/g323Hz+aRm2JcXIsudsTN0cwRhN8xAZ0vX1LzN7Nr nelTbgU0vI7dZMxp6pZi3WNUKqokfXDqIx86iUzzPWcTMcDbKd2DRkqhtZFVLCq8tC 5zqphpj3GVbvTBw4JUpplgcCNDljyBVbtBbSYDCcgwaTxFu34NnlOM2vD5IrWzvd1s CNxIuOBCO9eK81bTOsnL8FFLbpPzI1E1RUiD67Sn/x/vPGKfUUhKO3cbKpsKFGvbzP VhoMhJLAdh2AFZzRS4ohoIYB5u3RI9dEMn9U6AyGKnb3zrID99D012KOiMSOWpOwb2 5DliLtvsh+S3Q== From: Sean Nyekjaer To: linux-iio@vger.kernel.org, jic23@kernel.org Cc: Sean Nyekjaer Subject: [PATCH 2/2] iio: adc: ti-ads8688: fix timestamp is not updated in buffer Date: Tue, 7 May 2019 10:23:04 +0200 Message-Id: <20190507082304.11692-2-sean@geanix.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190507082304.11692-1-sean@geanix.com> References: <20190507082304.11692-1-sean@geanix.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When using the hrtimer iio trigger timestamp isn't updated. If we use iio_get_time_ns it is updated correctly. Fixes: 2a86487786b5c ("iio: adc: ti-ads8688: add trigger and buffer support") Signed-off-by: Sean Nyekjaer --- drivers/iio/adc/ti-ads8688.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c index d9c354dbd7e4..304cad3dddc6 100644 --- a/drivers/iio/adc/ti-ads8688.c +++ b/drivers/iio/adc/ti-ads8688.c @@ -396,7 +396,7 @@ static irqreturn_t ads8688_trigger_handler(int irq, void *p) } iio_push_to_buffers_with_timestamp(indio_dev, buffer, - pf->timestamp); + iio_get_time_ns(indio_dev)); iio_trigger_notify_done(indio_dev->trig);