Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp146045rdb; Thu, 16 Nov 2023 14:38:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjXIFp9TcBeojvIDXW9zvsJdbP2qUMInrhVonpt4ZGg8hpX1kTAHDwmxVennk5/4V2DTjd X-Received: by 2002:a05:6e02:1786:b0:359:cbd5:c512 with SMTP id y6-20020a056e02178600b00359cbd5c512mr26451161ilu.17.1700174317849; Thu, 16 Nov 2023 14:38:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700174317; cv=none; d=google.com; s=arc-20160816; b=L7T7uqAC6vd57gI81tQBFaDgnshTBeAkmutdXq/zI8rrCSTIuER92oCTe5AkbGiqC1 saevB5PEjC8IDpxXPaKJ9strFCBCfkxN0A0yrtE+Hkeqt+GXepfD4eB10+9Wloi9Gh8r IkHNzU+zFUYlWUpUS0mO6YLP+KFtVPbbDKhy+hf5YgPwpl3GtolugaOl8L7ak3rYQ+x6 FAJySxqNgkAZaLpKf9uHQ/VB2AzWNzXgLjsrbQBcIsYkIGdh93MXqVVi6DrOGMs77a4Y dGviQnNJ6EAjNISWqeaP6AfRzKp6g9jkjF4YG2fNFsKQYUwFx055Md4PmCCELabiVhGq s3Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xuF2C8TJoQo2qBcUEs/xMXKLb/wi1r/KhlqS7IpgHyw=; fh=dBSj1Anongxm3AqEVsAoqej2eyguUa3eeydsriREnjo=; b=AfXQmi5aHYeUcvVmyIbS+3UffImlLqjBhDqm4kYG9XMs93E4Sb66x+KtHFs0yiVPva TJAddDAU5Gcxf3lRBlkgaIvnwVkPWVQH79NSRapZoZ8YXz+JBXEvw7WMYarH5lun0Tla R4HLPJVB727RkL+ZKDZ0SAma5PP1vZcZRTEhqJ5/RBV1YmUdMuxIkwewTBh+SqA9fR19 SaC+u9h8Fe6BdZ/b6tIAx4E/wWjOFWCEyHtWLyntX75WwlbGPHu4dWyFqhzpuBb7aUhQ GC7NIHol1jdQfRV3y0PT6+sGvAuoerlBhFnN66zi/m5BSk+VD1l2RsdCAa3SRtGpwka7 /7Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=wPvRW8it; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id y5-20020a633205000000b005bdbda280c2si424301pgy.364.2023.11.16.14.38.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 14:38:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=wPvRW8it; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 1664B809C19A; Thu, 16 Nov 2023 14:38:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229783AbjKPWi2 (ORCPT + 99 others); Thu, 16 Nov 2023 17:38:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbjKPWi1 (ORCPT ); Thu, 16 Nov 2023 17:38:27 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79E38127; Thu, 16 Nov 2023 14:38:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=xuF2C8TJoQo2qBcUEs/xMXKLb/wi1r/KhlqS7IpgHyw=; b=wPvRW8itCui06NIV77eqBmTEPN NhCEInIkOCMV8sZZNNf1trGFQZSVV2CWaqEYMlmV/CbRBLqs3+SNgJfqUgHYaStxCepL5rD5NEpsQ Sr6U2kCZAYezeBxgUKSDFCiHexDLzOrca+0ADevRFm/1LkdhQ38oc8lRmWztGfqojBc0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r3kzw-000OSv-5i; Thu, 16 Nov 2023 23:38:08 +0100 Date: Thu, 16 Nov 2023 23:38:08 +0100 From: Andrew Lunn To: Kory Maincent Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH net-next 9/9] net: pse-pd: Add PD692x0 PSE controller driver Message-ID: <47d42d52-943c-467d-bcc0-fcb274f69841@lunn.ch> References: <20231116-feature_poe-v1-0-be48044bf249@bootlin.com> <20231116-feature_poe-v1-9-be48044bf249@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231116-feature_poe-v1-9-be48044bf249@bootlin.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 16 Nov 2023 14:38:35 -0800 (PST) > +static int pd692x0_send_msg(struct pd692x0_priv *priv, struct pd692x0_msg *msg) > +{ > + const struct i2c_client *client = priv->client; > + int ret; > + > + if (msg->content.key == PD692X0_KEY_CMD && priv->last_cmd_key) { > + while (time_is_after_jiffies(msecs_to_jiffies(30) + priv->last_cmd_key_time)) > + usleep_range(1000, 2000); That is a bit odd. Could you not just calculate how long a sleep is needed, rather than loop? Andrew