Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1256878rdb; Fri, 16 Feb 2024 09:45:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUuLwpEgVRgRZ1wNVhSFFMB+Dn1xgKBDOAs3eZsWr550oG+ghbJB4PMRSw+1C2qZfxX8ZpwECUdCRs6UxQwg9dPA3Fqu+IcW8FDU9v43A== X-Google-Smtp-Source: AGHT+IGl+iXZ03+XXmLTcx5AkHYRr9LBHMU6w0QsOpir2m395hBB7pSq4M0xhh5Z1oVg8ziWQuAf X-Received: by 2002:a17:90a:a00a:b0:298:b9f7:83f7 with SMTP id q10-20020a17090aa00a00b00298b9f783f7mr4804594pjp.24.1708105519930; Fri, 16 Feb 2024 09:45:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708105519; cv=pass; d=google.com; s=arc-20160816; b=Szb7XdpD7dwnKaEo1D/SSM6wQ/eKO7JGhKNzKnt0Ul56VXOu8ziU8Ka7tia1GQQRK9 qdRhq86IUxYfs4/AhCX+LMs0eKO+ynpXbu3UIBsodexepJmO1IhdEnMgZjWKHyAzYBkc twNd1jrCM8KCWpZQGkDkIKoDCKQlK2acvSCsb2EUFG53QtlbRxrjMuYkzGFUa4ppLTUn b1MkQqfGw1qT0ubyw5XVnL0eBM/wc49UOdM1wcGdJxmA062S3f6hPNxKkakDXY4px/8N uYyDe4CFy4Uco6muQQziym6pPr5MCOOL0TkVJ+tap2WseM7cfnVy161pA8viqJ7OQ8xH dEyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=HO7d/iDiv/SBxU7X/bkcNuot1Koh33KNVjEjUKi1wpc=; fh=/WAW0kHmC+WLM6YUJuXIzGFzD/xv9rymtzYVEgWBqIA=; b=e3bjAV/h1aG94C/Zz8+VUti3rogaGPKzd1fO6yqZViB+yDaUqD8tF6CFvfqaahkT2j suRbIXqzLASze7AtkWmyJHsYMUsdVBdZObs9t2OcsMoAC4pjsU+KG+hPIu88N4oB77vb 6Nr7ycJncEw0hKFRKh3M334BvHi63hFc6a8J6xw0TVG9wvtT3Hqiye1uKvbn4rWl4T+j LB2hYooXFbEExi9x1AQIiWN9UdjHzqSEwyeuyrJzf7+b6OePfW4DMHWXckHTtgGTU4UO dmch/pPH0MFBiuvRuYWsongTIvYpPiqWKipkyV/i07tIaZJDJpBPEaZ/2YvStDOIpwEe FevQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n0LjRmmr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69059-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id pb1-20020a17090b3c0100b00298c162334dsi269375pjb.94.2024.02.16.09.45.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 09:45:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n0LjRmmr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69059-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 90B9CB216B4 for ; Fri, 16 Feb 2024 17:19:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 405C0131750; Fri, 16 Feb 2024 17:19:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="n0LjRmmr" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DB9A130E2E; Fri, 16 Feb 2024 17:19:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708103976; cv=none; b=OQqyLtfaSCkNKTnAnTvHMyvaJi+2Bgtaco5FD8ov+2dC6+LpQszxJT2oX/4istq8d95873TjmQtpmWic+hWUnWCxyDi3xdwuzeuZPocqohPybztTR91qJXC6PWDyuS737/ZmZMB4t3mbCuhrq/9c0xddyflO23onETLdQsbs//I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708103976; c=relaxed/simple; bh=jajtT3fYHh89nUBt1oc4FBYREo5Q6SP3UVEpUB3mdy4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XgwyLfiWiJpQeoyXwy5rBUMfGWkUCwG/uVx8AEQ6nu1tAwJJDIiivDLv0Y2x03wGw+uloayFHkq+a46ENVPnGCzJzh8ntPNOW557hweugCHoCMe41u6/sGD9v86AJQfylI6sZ0Lp/gYBIEks8JurHPR1ITNsHQXaI2IHRuYMSTw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n0LjRmmr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46519C433F1; Fri, 16 Feb 2024 17:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708103975; bh=jajtT3fYHh89nUBt1oc4FBYREo5Q6SP3UVEpUB3mdy4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=n0LjRmmrxZpNVzyFYsGwbD2p2LVFKzK/EygU0fH5X81lxXU83MhmJtw7YY11T+2B8 w+VDan533UAdx4NDrW7mkty+fbRZxfLmmS0QdpY3lcDpDnaJfKM/dtk/HKlu+wqUTU nJGYtVNdtePqCm5Sk1K8Lv6AhXjZFnoxAvLUuwTdGEAECQtquMC0AVmdXtWvnt92xh s5g9MWKeoVymdPNgdozymbdVy+i+VPygj5fgTbh0Kz7Eu6iiseEdh3zp3peKzTfZ43 v2SzrAbPVxyASWWglWdBtB7tD3GgxC62grBFCHGKQSKvyiHR0EluWK29qTXj4CghR3 IQQRHnrI5QJ6A== Date: Fri, 16 Feb 2024 17:19:21 +0000 From: Jonathan Cameron To: Mike Looijmans Cc: Andy Shevchenko , devicetree@vger.kernel.org, linux-iio@vger.kernel.org, Arnd Bergmann , Lars-Peter Clausen , Liam Beguin , Liam Girdwood , Maksim Kiselev , Marcus Folkesson , Marius Cristea , Mark Brown , Niklas Schnelle , Okan Sahin , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/2] iio: adc: ti-ads1298: Add driver Message-ID: <20240216171921.5a6b6b20@jic23-huawei> In-Reply-To: References: X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 16 Feb 2024 17:07:49 +0100 Mike Looijmans wrote: > On 16-02-2024 16:53, Andy Shevchenko wrote: > > ... > > + if (reset_gpio) { > + /* > + * Deassert reset now that clock and power are active. > + * Minimum reset pulsewidth is 2 clock cycles. > + */ > + udelay(ADS1298_CLOCKS_TO_USECS(2)); > > This is sleeping context and you are calling unsleeping function. I haven't > checked the macro implementation and I have no idea what is the maximum it may > give, but making code robust just use fsleep() call. > > It'll actually delay for 1 us (the "clock" is ~2MHz). So fsleep will compile to udelay anyway, which is fine, fsleep might get smarter in future and this would then profit. > > > > + gpiod_set_value_cansleep(reset_gpio, 0); > + } else { > + ret = ads1298_write_cmd(priv, ADS1298_CMD_RESET); > + if (ret) > + return dev_err_probe(dev, ret, "RESET failed\n"); > + } > + /* Wait 18 clock cycles for reset command to complete */ > + udelay(ADS1298_CLOCKS_TO_USECS(18)); > > Ditto. > > ... > > > If it's the only issue I think Jonathan can modify when applying > (no new patch version would be needed). > > That'd be nice. ok. As this is still the top of my tree I'll just tweak it. Does anyone else read fsleep as femtosecond sleep every time? :) Maybe computers will go that fast one day. Jonathan > > > -- > Mike Looijmans > System Expert > > TOPIC Embedded Products B.V. > Materiaalweg 4, 5681 RJ Best > The Netherlands > > T: +31 (0) 499 33 69 69 > E: mike.looijmans@topic.nl > W: www.topic.nl > >