From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.171.202.116 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796220539; b=Syjw6sUGIvwxVaQtTzkLM57DtVmRSM4Wm+TS9NJrck6693RbIZmVYv2uAMCL6/RtWg3a yrO7OT3y5S5cMd/iLrLrOba4lcFBLaKpH/J7gbrhZu40Xeh65r1iumu7k1rz3XeengoTj yhQBRmbQNKHE8UJjz9b0tMTgc/pOr8XnhK0CUPa7LmJlwrU4FiHZ9QwMZcHe/7HN2cG2Q k2y0f40/iIbe940Eznz0NcbB2/oJpsQV6y5MduTZGGkNcuXyPoLe8L08lM85DftrLVg9j VYuoVmFVK6/8HGB3Ejs+27wyTyKM4O3snf1J0sfWxj4Datp+Ip9SevehmY/lFW7gdEQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796220539; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Last-TLS-Session-Version; bh=3tXiJA/ZlN2TlybYth4fl5tGqZCVr1WDwmD1xfpQqXs=; b=vBqef5aA7egaS69+PXQNWZyS1bHd5YsFv0RsvKNZau7hRxIIrPqNFKMYSHLrNJVhAVU/ yrIW12ybvnajytvye8ER0Hs8Ey36OpRvzW6teMvS/Bc6S52XW6u/NBT9RKH2MLztC4hJa 1ACgjOUeBGmbhtk9wbOdRgEZSA2ZWEInFVrltBySdZZ/Ga5AfcH8lPojmpaa4aXXrebz2 tPP6hflcJOfkeU9Umatbsxc0z4yD+MoGfyzx5YUx70XCHVJlgUh+tQNIRxNTassiahZjk RG5TyF+LpYB2Wam+7/V0BJ/L0QAdHDO87HUKAzFkARU4in0qiQKgt0AyeHlJfEIHYkg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=wA4wlxdz; arc=none smtp.remote-ip=185.171.202.116 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E622B606A333 for ; Wed, 2 Dec 2026 14:08:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E622B606A333 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=wA4wlxdz Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 97920C0133A; Wed, 2 Dec 2026 14:09:08 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 99BA16075F; Wed, 2 Dec 2026 14:08:57 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 9EE0411EA198D; Wed, 02 Dec 2026 15:08:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796220536; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=3tXiJA/ZlN2TlybYth4fl5tGqZCVr1WDwmD1xfpQqXs=; b=wA4wlxdzksvUQ5vd9qKInekMIyamQ5Oy2J8bcArHl9bwYZD/QW4PYAx1jdh9fraUQeN+rB dFAg1IMWpBF9PP6TKvCyipX6ilkKS6wmdHFqxyEBpteGiSs99BnTwItDhz1mfyIUSgPZKX NLytZtYdsPDVdr1hlazYSPNAw29mjgIcnik746uEctzh7fvAg4GsPY6Texuw1fILTfihVT CskwHmkAPDcOj9y5L+A+cVdD1CKieEcqwD5gnRJyHPb6ZS1RZvORRxOWWy0pLyd/5ANEKR NBgxfETHzMFBQbFVWqUPAtluIX1yUQXzQM6QGAIoscgdNKX/HPacliK8aWzVuQ== From: "Kory Maincent (AddSecure)" Date: Wed, 02 Dec 2026 15:08:14 +0100 Subject: [PATCH net-next 7/8] net: pse-pd: tps23881: Use fsleep instead of mdelay X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261202-feat_tps23861-v1-7-7d8320369817@bootlin.com> References: <20261202-feat_tps23861-v1-0-7d8320369817@bootlin.com> In-Reply-To: <20261202-feat_tps23861-v1-0-7d8320369817@bootlin.com> To: Oleksij Rempel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: roman@damex.org, maxime.chevallier@bootlin.com, Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Phil.Edworthy@addsecure.com, devicetree@vger.kernel.org, "Kory Maincent (AddSecure)" X-Mailer: b4 0.16.1-dev-17221 X-Last-TLS-Session-Version: TLSv1.3 The code does not run in atomic context, so busy-waiting with mdelay() is unnecessary. Use fsleep() instead, which sleeps for the requested time instead of wasting CPU cycles. Signed-off-by: Kory Maincent (AddSecure) --- drivers/net/pse-pd/tps23881.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/pse-pd/tps23881.c b/drivers/net/pse-pd/tps23881.c index a7ff69e2561b4..5736f052732a2 100644 --- a/drivers/net/pse-pd/tps23881.c +++ b/drivers/net/pse-pd/tps23881.c @@ -260,7 +260,7 @@ static int tps23881_pi_disable(struct pse_controller_dev *pcdev, int id) * configured again. According to the datasheet "It may take upwards * of 5ms after PWOFFn command for all register values to be updated" */ - mdelay(5); + fsleep(5000); /* Disable DC disconnect*/ chan = priv->port[id].chan[0]; @@ -982,7 +982,7 @@ static int tps23881_pi_get_pw_req(struct pse_controller_dev *pcdev, int id) /* For a 4-pair the classification need 5ms to be completed */ if (priv->port[id].is_4p) - mdelay(5); + fsleep(5000); chan = priv->port[id].chan[0]; reg = TPS23881_REG_DISC + (chan % 4); @@ -1121,7 +1121,7 @@ static int tps23881_flash_sram_fw(struct i2c_client *client, if (ret) return ret; - mdelay(12); + fsleep(12000); return 0; } -- 2.43.0