1 From 09be1a39e685d8c5edd471fd1cac9a8f8280d2de Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Tue, 8 Nov 2022 22:17:34 +0100
4 Subject: [PATCH] clk: qcom: kpss-xcc: register it as clk provider
6 krait-cc use this driver for the secondary mux. Register it as a clk
7 provider to correctly use this clk in other drivers.
9 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 Signed-off-by: Bjorn Andersson <andersson@kernel.org>
11 Link: https://lore.kernel.org/r/20221108211734.3707-1-ansuelsmth@gmail.com
13 drivers/clk/qcom/kpss-xcc.c | 13 +++++++++----
14 1 file changed, 9 insertions(+), 4 deletions(-)
16 --- a/drivers/clk/qcom/kpss-xcc.c
17 +++ b/drivers/clk/qcom/kpss-xcc.c
18 @@ -31,12 +31,13 @@ MODULE_DEVICE_TABLE(of, kpss_xcc_match_t
20 static int kpss_xcc_driver_probe(struct platform_device *pdev)
22 + struct device *dev = &pdev->dev;
23 const struct of_device_id *id;
28 - id = of_match_device(kpss_xcc_match_table, &pdev->dev);
29 + id = of_match_device(kpss_xcc_match_table, dev);
33 @@ -45,7 +46,7 @@ static int kpss_xcc_driver_probe(struct
37 - if (of_property_read_string_index(pdev->dev.of_node,
38 + if (of_property_read_string_index(dev->of_node,
42 @@ -55,12 +56,16 @@ static int kpss_xcc_driver_probe(struct
46 - hw = devm_clk_hw_register_mux_parent_data_table(&pdev->dev, name, aux_parents,
47 + hw = devm_clk_hw_register_mux_parent_data_table(dev, name, aux_parents,
48 ARRAY_SIZE(aux_parents), 0,
50 0, aux_parent_map, NULL);
54 - return PTR_ERR_OR_ZERO(hw);
55 + of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, hw);
60 static struct platform_driver kpss_xcc_driver = {