Lines Matching +full:clk +full:- +full:source
1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/clk-provider.h>
15 #include <linux/platform_data/clk-fch.h>
23 * struct apd_device_desc - a descriptor for apd device
24 * @fixed_clk_rate: fixed rate input clock source for acpi device;
25 * 0 means no fixed rate input clock source
26 * @properties: build-in properties of the device such as UART
38 struct clk *clk; member
48 const struct apd_device_desc *dev_desc = pdata->dev_desc; in acpi_apd_setup()
49 struct clk *clk; in acpi_apd_setup() local
51 if (dev_desc->fixed_clk_rate) { in acpi_apd_setup()
52 clk = clk_register_fixed_rate(&pdata->adev->dev, in acpi_apd_setup()
53 dev_name(&pdata->adev->dev), in acpi_apd_setup()
54 NULL, 0, dev_desc->fixed_clk_rate); in acpi_apd_setup()
55 clk_register_clkdev(clk, NULL, dev_name(&pdata->adev->dev)); in acpi_apd_setup()
56 pdata->clk = clk; in acpi_apd_setup()
72 struct acpi_device *adev = pdata->adev; in fch_misc_setup()
80 clk_data = devm_kzalloc(&adev->dev, sizeof(*clk_data), GFP_KERNEL); in fch_misc_setup()
82 return -ENOMEM; in fch_misc_setup()
88 return -ENOENT; in fch_misc_setup()
90 if (!acpi_dev_get_property(adev, "is-rv", ACPI_TYPE_INTEGER, &obj)) in fch_misc_setup()
91 clk_data->is_rv = obj->integer.value; in fch_misc_setup()
94 clk_data->base = devm_ioremap(&adev->dev, rentry->res->start, in fch_misc_setup()
95 resource_size(rentry->res)); in fch_misc_setup()
101 clkdev = platform_device_register_data(&adev->dev, "clk-fch", in fch_misc_setup()
118 PROPERTY_ENTRY_U32("reg-io-width", 4),
119 PROPERTY_ENTRY_U32("reg-shift", 2),
120 PROPERTY_ENTRY_BOOL("snps,uart-16550-compatible"),
186 const struct apd_device_desc *dev_desc = (void *)id->driver_data; in acpi_apd_create_device()
198 return -ENOMEM; in acpi_apd_create_device()
200 pdata->adev = adev; in acpi_apd_create_device()
201 pdata->dev_desc = dev_desc; in acpi_apd_create_device()
203 if (dev_desc->setup) { in acpi_apd_create_device()
204 ret = dev_desc->setup(pdata); in acpi_apd_create_device()
209 adev->driver_data = pdata; in acpi_apd_create_device()
210 pdev = acpi_create_platform_device(adev, dev_desc->properties); in acpi_apd_create_device()
215 adev->driver_data = NULL; in acpi_apd_create_device()