Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp365865pxj; Thu, 10 Jun 2021 02:43:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaUjaRCqXGdKhatmeEsxSOdTnEeo55tKPWXaBQau6ZZWeEoFFebkZ3A53+vlbiTA3eT0zz X-Received: by 2002:a17:906:7d8d:: with SMTP id v13mr3617304ejo.2.1623318224668; Thu, 10 Jun 2021 02:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623318224; cv=none; d=google.com; s=arc-20160816; b=Ybka6sS6aqgdI372Gnb434H+ur2OUPqz/wN2vYEN+PKusv2uX0ETakG8W0ncFuZHot Hvm3HxRTKfxEAXwIbmnC5ezd43PpnUiEucvwhbTSIogfAw+RbWEAObX6NGRfq3eR/Kwc cyE6H+QAfNJUTy0PX4nSDaR5uMV40NsBs08b5G2n/I+0J2hQuOtfTn4fwjueOeF67plc qGpHyCOpNAqmhhBqMR92eIh9pnMU2hMnyLALiD/RQPij+HtgaIr59AYxgBXta6jxeV4V n/Tr4okfsqmHEXydQIgi7rq1Qjqla6Mrxunnsx+BPWR6KAIkgRTKgcDq34c2W5tI0/iU BAOA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=T7JPHdbBTnWkDIFoQ9fb6s8oNiLNKflGQaHkrr1VcXs=; b=zcAeSDnY8pL74NuOsJs0vVfTGI5fx/xx05EtVUr+haQj2avFtUSOcv+hAW0gNbVqTk gbGj4GKwQIv+43sMBdJ1QZdcOnGSgnjQ83quTx1oL3C2Cm4FXrJCgKg40bMVeheC5OoD 3bSH+7Q/nZbkOsImUpSnWXSP6oeb44EwlxFbCyjpEe2u9N+IVSlXXLCwz/bOajMEzQkF T0cBKrXAa23u8HpWl6CGsgt/MhMrl5sFOHjrot2i8qYOiGzLzQ8azr04Rre8tLAy/8It t0nwcAWghGJfAdHa65N9lFLI0Z+QYQ/Pif0Bg9qfkFz/L+rY6g/BifkYv+Z7RuDqxjlk 9lXA== 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 28si1667664ejk.601.2021.06.10.02.43.21; Thu, 10 Jun 2021 02:43:44 -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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230055AbhFJJnk (ORCPT + 99 others); Thu, 10 Jun 2021 05:43:40 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3193 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbhFJJni (ORCPT ); Thu, 10 Jun 2021 05:43:38 -0400 Received: from fraeml714-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4G0zDy6VvHz6M4Xm; Thu, 10 Jun 2021 17:28:50 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml714-chm.china.huawei.com (10.206.15.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 10 Jun 2021 11:41:40 +0200 Received: from localhost (10.52.126.112) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 10 Jun 2021 10:41:39 +0100 Date: Thu, 10 Jun 2021 10:41:36 +0100 From: Jonathan Cameron To: Chris Lesiak CC: Jonathan Cameron , , Subject: Re: [PATCH] iio: humidity: hdc100x: Add margin to the conversion time Message-ID: <20210610104136.00002e4e@Huawei.com> In-Reply-To: <20210609193748.1709308-1-chris.lesiak@licor.com> References: <20210609193748.1709308-1-chris.lesiak@licor.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.52.126.112] X-ClientProxiedBy: lhreml728-chm.china.huawei.com (10.201.108.79) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Jun 2021 14:37:48 -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. > > Signed-off-by: Chris Lesiak Hi Chris Could you figure out a fixes tag for this one so we can get it backported into stable? If not I can probably guess when I catch up with applying patches. Thanks, Jonathan > --- > drivers/iio/humidity/hdc100x.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c > index 2a957f19048e..91790aa8beeb 100644 > --- a/drivers/iio/humidity/hdc100x.c > +++ b/drivers/iio/humidity/hdc100x.c > @@ -166,7 +166,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] + 1000; > int ret; > __be16 val; > > @@ -316,7 +316,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] + 2000; > int ret; > > /* dual read starts at temp register */