From nobody Sun Feb 8 12:18:39 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (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 07F1435B144; Mon, 12 Jan 2026 13:49:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768225755; cv=none; b=CioggAJXvHgwBKO/GyqKvwWQzwiNDtKxFH4ZZVFfS9WVqb0uxjUyRdnsBXexdr+UrDd9OzER4qNuiQl90oHO+H4yV7+1ZfgKEcFPD4lbsJup624ZJlePWqPSwJcA4mp2RTH7GnLobftQ0Kmo+HhuXL2V6DWuI14970kiRRjwlAk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768225755; c=relaxed/simple; bh=s4D8kw7OoyHkWsenYF7E+9Z6vB4aK7eDBACFxTCsJgQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UDBys61DprNv3f/Wr/r4Uway6ihg9OtJfYjlZwZ09lNwq95CREsau//8SIQBBXnkSS/mdaAdMT+YWM/l8iE5I8ZMtRFcVnXDQjC6tYKbDHUAu6EvpNOLg+mi4Nk3tFLpATAOQCPJCKPexPpN4vFt3QTSH9NK5WLd5Pw+B4khht0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FEl8TskE; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FEl8TskE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1768225754; x=1799761754; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=s4D8kw7OoyHkWsenYF7E+9Z6vB4aK7eDBACFxTCsJgQ=; b=FEl8TskEboUQ3b0RkHdWWocSac6a7mTfc+L7fH7q6BJc1vjpl0p5SzO4 tHgMvG59L3bmx8SYLTauJwSTHZuBKcJagy6yRKXUoeRukt7mJpCQwR+vj LIPh7MMkP2aHdS+bC1h8cM8r6C22ESD5ToRRaDM9ZYYdgGBLFYHPTFVrd WzHEvy/lEC8aAPWswikvDkZQE+z/mvLIw6bPRGXBY8s6VqDQEOlcVN5m5 0JMmPBXARPyJ6stZ9XaXcuZVRV8oSNKab33EGoDD3wAB4oay1l4TD3FCB CAfVkN1L6TSoeqqI4iOarsohg7m24FL1OFbaxgquPL8fLT683Gi21Zt1e g==; X-CSE-ConnectionGUID: uoS8yg4FSau78+iGDXUQ5A== X-CSE-MsgGUID: peDSjD2kRx2RAPaXLlnOEg== X-IronPort-AV: E=McAfee;i="6800,10657,11669"; a="57048269" X-IronPort-AV: E=Sophos;i="6.21,221,1763452800"; d="scan'208";a="57048269" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2026 05:49:11 -0800 X-CSE-ConnectionGUID: RSGfaLd6QVqd0LuDupeO2Q== X-CSE-MsgGUID: JO2qZ07QS3e8APOkDDRiqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,221,1763452800"; d="scan'208";a="208618599" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa004.jf.intel.com with ESMTP; 12 Jan 2026 05:49:08 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id C1CDE9E; Mon, 12 Jan 2026 14:49:06 +0100 (CET) From: Andy Shevchenko To: Andi Shyti , Andy Shevchenko , Wolfram Sang , Qianfeng Rong , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org Cc: Khalil Blaiech , Asmaa Mnebhi , Andi Shyti , Qii Wang , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Patrice Chotard , Ard Biesheuvel Subject: [PATCH v1 4/7] i2c: nomadik: Use HZ_PER_GHZ constant instead of plain number Date: Mon, 12 Jan 2026 14:46:12 +0100 Message-ID: <20260112134900.4142954-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260112134900.4142954-1-andriy.shevchenko@linux.intel.com> References: <20260112134900.4142954-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use defined constant to avoid the possible mistakes and to provide an additional information on the units. While at it, drop unneeded 64-bit division, all operands fit 32-bit. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- drivers/i2c/busses/i2c-nomadik.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-noma= dik.c index 19b648fc094d..b63ee51c1652 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -31,6 +31,7 @@ #include #include #include +#include =20 #define DRIVER_NAME "nmk-i2c" =20 @@ -419,10 +420,10 @@ static void setup_i2c_controller(struct nmk_i2c_dev *= priv) * modes are 250ns, 100ns, 10ns respectively. * * As the time for one cycle T in nanoseconds is - * T =3D (1/f) * 1000000000 =3D> - * slsu =3D cycles / (1000000000 / f) + 1 + * T =3D (1/f) * HZ_PER_GHZ =3D> + * slsu =3D cycles / (HZ_PER_GHZ / f) + 1 */ - ns =3D DIV_ROUND_UP_ULL(1000000000ULL, i2c_clk); + ns =3D DIV_ROUND_UP(HZ_PER_GHZ, i2c_clk); switch (priv->sm) { case I2C_FREQ_MODE_FAST: case I2C_FREQ_MODE_FAST_PLUS: --=20 2.50.1