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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54F50C7EE29 for ; Sun, 4 Jun 2023 10:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OLfB6wIqIo4ovrgUgvU6EW6nMJu5RWYXghDibfQ8L50=; b=H5P5nIDXWDQeSz oC6/p/BNrgAxNB2eyD1qV4D5gJgoGjFSzeOIfhBtWR+kI56UwwqIOKjQkzjMeDRX1f4ZzHymk2/Ku B4BUTkzcTj0UV1ZG9f0PmxnrtNLgIAjVH9U2Wv6k/2vLsE3SpXpCXgz7XxreYQfGf7f/YY7ZHfOCA ByczGaZHuJLiVGhE/WgDtE/W3AgLYR27hIJ7HdUgQXmT34okrok3ODHx5sBKtH3wxoi4UmHNuU5W1 5UpH9zAgvUyKjIAvpY9B+pe+7gb0vd3VgdfoAWfV3s7vjRKY7QKc0UZnWQXaebSHwPWvgIREAcjYS W5U6DfutLG/V2XhXcEjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q5lBj-00Bwxx-2i; Sun, 04 Jun 2023 10:42:19 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q5lBg-00Bwuy-2C; Sun, 04 Jun 2023 10:42:17 +0000 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 D7A21601D0; 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230604_034216_841522_A3522680 X-CRM114-Status: GOOD ( 15.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. > > ... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel