mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clk-scpi: Modify to recall scpi_clocks_probe
@ 2022-11-25  2:35 Wang Honghui
  2022-11-25  9:45 ` Sudeep Holla
  2022-11-25 18:37 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Wang Honghui @ 2022-11-25  2:35 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Jassi Brar, linux-arm-kernel,
	linux-kernel

Modify to recall scpi_clocks_probe
and add to support Phytium FT2000/4 CPUs

Signed-off-by: Wang Honghui <honghui.wang@ucas.com.cn>
---
 drivers/clk/clk-scpi.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c
index a39af7616b13..fbc624c5a94a 100644
--- a/drivers/clk/clk-scpi.c
+++ b/drivers/clk/clk-scpi.c
@@ -268,8 +268,10 @@ static int scpi_clocks_probe(struct platform_device *pdev)
 	struct device_node *child, *np = dev->of_node;
 	const struct of_device_id *match;
 
+	/* Wang Honghui modified, the func will not be recalled
+	 * if return -EIO, but will if return -EPROBE_DEFER */
 	if (!get_scpi_ops())
-		return -ENXIO;
+		return -EPROBE_DEFER;
 
 	for_each_available_child_of_node(np, child) {
 		match = of_match_node(scpi_clk_match, child);
@@ -299,10 +301,18 @@ static const struct of_device_id scpi_clocks_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, scpi_clocks_ids);
 
+/* Wang Honghui add to support Phytium FT2000/4 CPUs */
+static const struct acpi_device_id scpi_cpufreq_acpi_match[] = {
+        { .id = "PHYT8001" },
+        { }
+};
+MODULE_DEVICE_TABLE(acpi, scpi_clock_acpi_match);
+
 static struct platform_driver scpi_clocks_driver = {
 	.driver	= {
 		.name = "scpi_clocks",
 		.of_match_table = scpi_clocks_ids,
+		.acpi_match_table = scpi_cpufreq_acpi_match,
 	},
 	.probe = scpi_clocks_probe,
 	.remove = scpi_clocks_remove,
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-25 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25  2:35 [PATCH] clk-scpi: Modify to recall scpi_clocks_probe Wang Honghui
2022-11-25  9:45 ` Sudeep Holla
2022-11-25 18:37 ` kernel test robot

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®