Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2261036pxv; Sat, 24 Jul 2021 10:13:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzKdkWSbT1gP+NNflOMTrRoxisvb7+tCVgkTYxcO32z2inkZlrcnYv9C3R5V7wQaCGyO8Z X-Received: by 2002:a17:906:17c2:: with SMTP id u2mr9788943eje.117.1627146807827; Sat, 24 Jul 2021 10:13:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627146807; cv=none; d=google.com; s=arc-20160816; b=NFJECWpMV/6kZ+FFnI18EUhLi0O4UogtOT/i9/8zQWUNkX0WO1orHJjq3z+P9jZ3DP tNphnaWXC9WaU86N0LZXev6T579uwnCNWX2Hs0P35BjBwDfereTzF8Wz4RtNdigzZ5Qm HVKwxLpRGE4xsruZC80Vv/AlOcr2jAwOj/S6muXdOeSQiCY+Y+GDzRyc8aetluu91p8Q oYTimbxoGuS59cO0Pt+baxEJdbB6I6xRE7QEQ3nT93cQTx7MXCRjjNdXatThPbOKL9us Vz8cethXpDNxGdK1BxVgg0CH1KjLDShxZyI0viCMCzdmkcEt7CsVeHK2KfpqAsvfodmX tb0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=4WO9hwUCr6fwo7bCg9mV2OJ7bKCwTEKUCrYPO2DN6xI=; b=I5RR6oLBi76O/hjoYElQl0q54Ex3Ri0OmakQMsZUJ3ZXou099jBjaw6e/jFyVJRokE mFlny36TrkWT28DV3cfc+136FJTrfjvOPbX1CpU2khrgB2ELEHbLUTYtv0uVuP4XKqh3 Dv9tdivD4Ars0SpPOsH6FcfJ03G7GHiO/7jD98D1HW5Ql4E7X0cDH4xVXbzpzaQohVy5 +dPOmDub9jofaXZnyH1bS2699C05ttvtbVtST48sWbcYxWK3u6W0LMuxudoBTTy60q+7 gU9aom3myOlG8n2Pd2czaRzlb5wbfSJ/8Cc4g4ZfbbIDY5fs8c/W2NpQog+GYAMrO747 374w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e2si3145041eds.340.2021.07.24.10.13.03; Sat, 24 Jul 2021 10:13:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbhGXQar (ORCPT + 99 others); Sat, 24 Jul 2021 12:30:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:58700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbhGXQaq (ORCPT ); Sat, 24 Jul 2021 12:30:46 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (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 57E7660E91; Sat, 24 Jul 2021 17:11:15 +0000 (UTC) Date: Sat, 24 Jul 2021 18:13:47 +0100 From: Jonathan Cameron To: Matt Ranostay Cc: Chris Lesiak , "open list:IIO SUBSYSTEM AND DRIVERS" , open list Subject: Re: [PATCH v3] iio: humidity: hdc100x: Add margin to the conversion time Message-ID: <20210724181347.2bb349db@jic23-huawei> In-Reply-To: References: <20210614141820.2034827-1-chris.lesiak@licor.com> <20210616134335.76715e55@jic23-huawei> <20210718155152.66f791bc@jic23-huawei> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 18 Jul 2021 14:31:28 -0700 Matt Ranostay wrote: > On Sun, Jul 18, 2021 at 7:49 AM Jonathan Cameron wrote: > > > > On Wed, 16 Jun 2021 13:43:35 +0100 > > Jonathan Cameron wrote: > > > > > On Mon, 14 Jun 2021 09:18:20 -0500 > > > Chris Lesiak wrote: > > > > > > > The datasheets have the following note for the conversion time > > > > specification: "This parameter is specified by design and/or > > > > characterization and it is not tested in production." > > > > > > > > Parts have been seen that require more time to do 14-bit conversions for > > > > the relative humidity channel. The result is ENXIO due to the address > > > > phase of a transfer not getting an ACK. > > > > > > > > Delay an additional 1 ms per conversion to allow for additional margin. > > > > > > > > Fixes: 4839367d99e3 ("iio: humidity: add HDC100x support") > > > > Signed-off-by: Chris Lesiak > > > > > > +CC Matt as this is one of his drivers. > > > > @Matt. Ping. > > > > > > > > Looks good to me. > > Looks good to me as well. > > Acked-by: Matt Ranostay Thanks. Applied to the fixes-togreg branch of iio.git and marked for stable. Jonathan > > > > > > > > --- > > > > drivers/iio/humidity/hdc100x.c | 6 ++++-- > > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c > > > > index 2a957f19048e..9e0fce917ce4 100644 > > > > --- a/drivers/iio/humidity/hdc100x.c > > > > +++ b/drivers/iio/humidity/hdc100x.c > > > > @@ -25,6 +25,8 @@ > > > > #include > > > > #include > > > > > > > > +#include > > > > + > > > > #define HDC100X_REG_TEMP 0x00 > > > > #define HDC100X_REG_HUMIDITY 0x01 > > > > > > > > @@ -166,7 +168,7 @@ static int hdc100x_get_measurement(struct hdc100x_data *data, > > > > struct iio_chan_spec const *chan) > > > > { > > > > struct i2c_client *client = data->client; > > > > - int delay = data->adc_int_us[chan->address]; > > > > + int delay = data->adc_int_us[chan->address] + 1*USEC_PER_MSEC; > > > > int ret; > > > > __be16 val; > > > > > > > > @@ -316,7 +318,7 @@ static irqreturn_t hdc100x_trigger_handler(int irq, void *p) > > > > struct iio_dev *indio_dev = pf->indio_dev; > > > > struct hdc100x_data *data = iio_priv(indio_dev); > > > > struct i2c_client *client = data->client; > > > > - int delay = data->adc_int_us[0] + data->adc_int_us[1]; > > > > + int delay = data->adc_int_us[0] + data->adc_int_us[1] + 2*USEC_PER_MSEC; > > > > int ret; > > > > > > > > /* dual read starts at temp register */ > > > > >