From: "clarke.li" <clarke.li@hj-micro.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
Andi Shyti <andi.shyti@kernel.org>
Cc: linux-acpi@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Len Brown <lenb@kernel.org>,
andy.xu@hj-micro.com, peter.du@hj-micro.com,
Hongnan Li <clarke.li@hj-micro.com>
Subject: [PATCH v4 1/2] ACPI: APD: Convert fixed clock rates to use HZ_PER_MHZ
Date: Thu, 13 Aug 2026 14:30:04 +0800 [thread overview]
Message-ID: <20260813063005.42925-1-clarke.li@hj-micro.com> (raw)
In-Reply-To: <20260722073031.1078080-1-clarke.li@hj-micro.com>
From: Hongnan Li <clarke.li@hj-micro.com>
Use HZ_PER_MHZ multiplier for fixed_clk_rate values to
improve readability.
Signed-off-by: Hongnan Li <clarke.li@hj-micro.com>
---
drivers/acpi/acpi_apd.c | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 008bd0552cb7..275027ebd01f 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -14,6 +14,7 @@
#include <linux/io.h>
#include <linux/platform_data/clk-fch.h>
#include <linux/platform_device.h>
+#include <linux/units.h>
#include "internal.h"
@@ -110,17 +111,17 @@ static int fch_misc_setup(struct apd_private_data *pdata)
static const struct apd_device_desc cz_i2c_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 133000000,
+ .fixed_clk_rate = 133 * HZ_PER_MHZ,
};
static const struct apd_device_desc wt_i2c_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 150000000,
+ .fixed_clk_rate = 150 * HZ_PER_MHZ,
};
static const struct apd_device_desc wt_i3c_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 125000000,
+ .fixed_clk_rate = 125 * HZ_PER_MHZ,
};
static struct property_entry uart_properties[] = {
@@ -132,7 +133,7 @@ static struct property_entry uart_properties[] = {
static const struct apd_device_desc cz_uart_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 48000000,
+ .fixed_clk_rate = 48 * HZ_PER_MHZ,
.properties = uart_properties,
};
@@ -144,52 +145,52 @@ static const struct apd_device_desc fch_misc_desc = {
#ifdef CONFIG_ARM64
static const struct apd_device_desc xgene_i2c_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 100000000,
+ .fixed_clk_rate = 100 * HZ_PER_MHZ,
};
static const struct apd_device_desc vulcan_spi_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 133000000,
+ .fixed_clk_rate = 133 * HZ_PER_MHZ,
};
static const struct apd_device_desc hip07_i2c_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 200000000,
+ .fixed_clk_rate = 200 * HZ_PER_MHZ,
};
static const struct apd_device_desc hip08_i2c_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 250000000,
+ .fixed_clk_rate = 250 * HZ_PER_MHZ,
};
static const struct apd_device_desc hip08_lite_i2c_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 125000000,
+ .fixed_clk_rate = 125 * HZ_PER_MHZ,
};
static const struct apd_device_desc thunderx2_i2c_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 125000000,
+ .fixed_clk_rate = 125 * HZ_PER_MHZ,
};
static const struct apd_device_desc nxp_i2c_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 350000000,
+ .fixed_clk_rate = 350 * HZ_PER_MHZ,
};
static const struct apd_device_desc hip08_spi_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 250000000,
+ .fixed_clk_rate = 250 * HZ_PER_MHZ,
};
static const struct apd_device_desc leca_spi_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 400000000,
+ .fixed_clk_rate = 400 * HZ_PER_MHZ,
};
static const struct apd_device_desc leca_i2c_desc = {
.setup = acpi_apd_setup,
- .fixed_clk_rate = 250000000,
+ .fixed_clk_rate = 250 * HZ_PER_MHZ,
};
#endif /* CONFIG_ARM64 */
--
2.55.0
next parent reply other threads:[~2026-08-13 6:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260722073031.1078080-1-clarke.li@hj-micro.com>
2026-08-13 6:30 ` clarke.li [this message]
2026-08-13 6:40 ` [PATCH v4 2/2] ACPI: APD: Add clock frequency for HJMC01 I2C controller clarke.li
2026-08-13 7:46 ` Andy Shevchenko
2026-08-13 7:35 ` [PATCH v4 1/2] ACPI: APD: Convert fixed clock rates to use HZ_PER_MHZ Andy Shevchenko
2026-08-14 20:11 ` Rafael J. Wysocki (Intel)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260813063005.42925-1-clarke.li@hj-micro.com \
--to=clarke.li@hj-micro.com \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.xu@hj-micro.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.du@hj-micro.com \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®