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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F479C77B73 for ; Sun, 4 Jun 2023 10:42:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230253AbjFDKmR (ORCPT ); Sun, 4 Jun 2023 06:42:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbjFDKmQ (ORCPT ); Sun, 4 Jun 2023 06:42:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51F18AF; Sun, 4 Jun 2023 03:42:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DA91860E76; Sun, 4 Jun 2023 10:42:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FD6CC433D2; Sun, 4 Jun 2023 10:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685875334; bh=va3qiMMY1sl2WXpsRKVN8nbug/kGtcX+nr7kDg+fifg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=C5gTqz+dTUiA9sbBaPB31tMjyVI3oYqkqkj2BfNug3oIDBP74S0+yRfRQKdbfY0qo 7HsOkcqTP5FMuO1Oz+8EC8PDbAQG1engZywszZHEAVKFThwvZJC5O66BVrdYTuzYO0 ELoUGLdFhxxCPUMVHJJeppa8JMIz7WizyiIq50qDqL6thy66qHU0iRgQH4JEArs05j ovb4VdsrJgSL+R/9i9rUBX0AQJYDWWeX0WtrT55oeegE+ocB97PqzhZZeVX+VKgsAh 1WEeMQMo+OdtKtSH2Rq//VxGJ4GwbuQXWiBsCUT6lfrYokJtiuIUz9SC0o3JkCMWkt 0Az57aggjpb7A== Date: Sun, 4 Jun 2023 11:42:06 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: Maksim Kiselev , linux-iio@vger.kernel.org, Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Cristian Ciocaltea , Cosmin Tanislav , Miquel Raynal , ChiaEn Wu , Arnd Bergmann , Ramona Bolboaca , Caleb Connolly , ChiYuan Huang , Ibrahim Tilki , William Breathitt Gray , Leonard =?UTF-8?B?R8O2aHJz?= , Haibo Chen , Hugo Villeneuve , Mike Looijmans , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 1/3] iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Message-ID: <20230604114206.789708a2@jic23-huawei> In-Reply-To: References: <20230601223104.1243871-1-bigunclemax@gmail.com> <20230601223104.1243871-2-bigunclemax@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; 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: devicetree@vger.kernel.org > > + if (!wait_for_completion_timeout(&info->completion, > > + msecs_to_jiffies(100))) { > > Dunno if it's better to have this parameter to be defined with self-explanatory > name. Probably a response to my earlier comment. I'd agree with a good name but GPADC_TIMEOUT which was the earlier naming is less use than a value and it's not obvious what that name should be. A nice datasheet reference would be good to have though. > > > + ret = -ETIMEDOUT; > > + goto err; > > + } > > > > + if (num_channels > SUN20I_GPADC_MAX_CHANNELS) { > > + dev_err(dev, "num of channel children out of range"); > > + return -EINVAL; > > + } > > Is it really critical error? Overflow of registers - so yes. I wondered this on v1 and went digging :) Now, there are no such devices known, so meh on whether check is useful. > > ...