Skip to content

Commit 151768f

Browse files
committed
Merge branches 'clk-x86', 'clk-stm', 'clk-amlogic' and 'clk-allwinner' into clk-next
* clk-x86: clk: x86: Fix clk_gate_flags for RV_CLK_GATE clk: x86: Use dynamic con_id string during clk registration ACPI: APD: Add a fmw property clk-name drivers: acpi: acpi_apd: Remove unused device property "is-rv" x86: clk: clk-fch: Add support for newer family of AMD's SOC clk: Introduce clk-tps68470 driver platform/x86: int3472: Deal with probe ordering issues platform/x86: int3472: Pass tps68470_regulator_platform_data to the tps68470-regulator MFD-cell platform/x86: int3472: Pass tps68470_clk_platform_data to the tps68470-regulator MFD-cell platform/x86: int3472: Add get_sensor_adev_and_name() helper platform/x86: int3472: Split into 2 drivers platform_data: Add linux/platform_data/tps68470.h file i2c: acpi: Add i2c_acpi_new_device_by_fwnode() function i2c: acpi: Use acpi_dev_ready_for_enumeration() helper ACPI: delay enumeration of devices with a _DEP pointing to an INT3472 device * clk-stm: clk: stm32: Fix ltdc's clock turn off by clk_disable_unused() after system enter shell * clk-amlogic: clk: meson: gxbb: Fix the SDM_EN bit for MPLL0 on GXBB * clk-allwinner: clk: sunxi-ng: Add support for the D1 SoC clocks clk: sunxi-ng: gate: Add macros for gates with fixed dividers clk: sunxi-ng: mux: Add macros using clk_parent_data and clk_hw clk: sunxi-ng: mp: Add macros using clk_parent_data and clk_hw clk: sunxi-ng: div: Add macros using clk_parent_data and clk_hw dt-bindings: clk: Add compatibles for D1 CCUs clk: sunxi-ng: Allow the CCU core to be built as a module clk: sunxi-ng: Convert early providers to platform drivers clk: sunxi-ng: Allow drivers to be built as modules clk: sunxi-ng: Export symbols used by CCU drivers
5 parents 270bbc7 + 1fdaaa1 + 6fc058a + c1001a6 + 4f1e19b commit 151768f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3369
-438
lines changed

Documentation/devicetree/bindings/clock/allwinner,sun4i-a10-ccu.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ properties:
3434
- allwinner,sun8i-v3-ccu
3535
- allwinner,sun8i-v3s-ccu
3636
- allwinner,sun9i-a80-ccu
37+
- allwinner,sun20i-d1-ccu
38+
- allwinner,sun20i-d1-r-ccu
3739
- allwinner,sun50i-a64-ccu
3840
- allwinner,sun50i-a64-r-ccu
3941
- allwinner,sun50i-a100-ccu
@@ -79,6 +81,7 @@ if:
7981
enum:
8082
- allwinner,sun8i-a83t-r-ccu
8183
- allwinner,sun8i-h3-r-ccu
84+
- allwinner,sun20i-d1-r-ccu
8285
- allwinner,sun50i-a64-r-ccu
8386
- allwinner,sun50i-a100-r-ccu
8487
- allwinner,sun50i-h6-r-ccu
@@ -99,6 +102,7 @@ else:
99102
properties:
100103
compatible:
101104
enum:
105+
- allwinner,sun20i-d1-ccu
102106
- allwinner,sun50i-a100-ccu
103107
- allwinner,sun50i-h6-ccu
104108
- allwinner,sun50i-h616-ccu

drivers/acpi/acpi_apd.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,15 @@ static int fch_misc_setup(struct apd_private_data *pdata)
8787
if (ret < 0)
8888
return -ENOENT;
8989

90-
if (!acpi_dev_get_property(adev, "is-rv", ACPI_TYPE_INTEGER, &obj))
91-
clk_data->is_rv = obj->integer.value;
90+
if (!acpi_dev_get_property(adev, "clk-name", ACPI_TYPE_STRING, &obj)) {
91+
clk_data->name = devm_kzalloc(&adev->dev, obj->string.length,
92+
GFP_KERNEL);
93+
94+
strcpy(clk_data->name, obj->string.pointer);
95+
} else {
96+
/* Set default name to mclk if entry missing in firmware */
97+
clk_data->name = "mclk";
98+
}
9299

93100
list_for_each_entry(rentry, &resource_list, node) {
94101
clk_data->base = devm_ioremap(&adev->dev, rentry->res->start,

drivers/acpi/scan.c

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,12 @@ static const char * const acpi_ignore_dep_ids[] = {
797797
NULL
798798
};
799799

800+
/* List of HIDs for which we honor deps of matching ACPI devs, when checking _DEP lists. */
801+
static const char * const acpi_honor_dep_ids[] = {
802+
"INT3472", /* Camera sensor PMIC / clk and regulator info */
803+
NULL
804+
};
805+
800806
static struct acpi_device *acpi_bus_get_parent(acpi_handle handle)
801807
{
802808
struct acpi_device *device = NULL;
@@ -1762,8 +1768,12 @@ static void acpi_scan_dep_init(struct acpi_device *adev)
17621768
struct acpi_dep_data *dep;
17631769

17641770
list_for_each_entry(dep, &acpi_dep_list, node) {
1765-
if (dep->consumer == adev->handle)
1771+
if (dep->consumer == adev->handle) {
1772+
if (dep->honor_dep)
1773+
adev->flags.honor_deps = 1;
1774+
17661775
adev->dep_unmet++;
1776+
}
17671777
}
17681778
}
17691779

@@ -1967,7 +1977,7 @@ static u32 acpi_scan_check_dep(acpi_handle handle, bool check_dep)
19671977
for (count = 0, i = 0; i < dep_devices.count; i++) {
19681978
struct acpi_device_info *info;
19691979
struct acpi_dep_data *dep;
1970-
bool skip;
1980+
bool skip, honor_dep;
19711981

19721982
status = acpi_get_object_info(dep_devices.handles[i], &info);
19731983
if (ACPI_FAILURE(status)) {
@@ -1976,6 +1986,7 @@ static u32 acpi_scan_check_dep(acpi_handle handle, bool check_dep)
19761986
}
19771987

19781988
skip = acpi_info_matches_ids(info, acpi_ignore_dep_ids);
1989+
honor_dep = acpi_info_matches_ids(info, acpi_honor_dep_ids);
19791990
kfree(info);
19801991

19811992
if (skip)
@@ -1989,6 +2000,7 @@ static u32 acpi_scan_check_dep(acpi_handle handle, bool check_dep)
19892000

19902001
dep->supplier = dep_devices.handles[i];
19912002
dep->consumer = handle;
2003+
dep->honor_dep = honor_dep;
19922004

19932005
mutex_lock(&acpi_dep_list_lock);
19942006
list_add_tail(&dep->node , &acpi_dep_list);
@@ -2155,8 +2167,8 @@ static void acpi_bus_attach(struct acpi_device *device, bool first_pass)
21552167
register_dock_dependent_device(device, ejd);
21562168

21572169
acpi_bus_get_status(device);
2158-
/* Skip devices that are not present. */
2159-
if (!acpi_device_is_present(device)) {
2170+
/* Skip devices that are not ready for enumeration (e.g. not present) */
2171+
if (!acpi_dev_ready_for_enumeration(device)) {
21602172
device->flags.initialized = false;
21612173
acpi_device_clear_enumerated(device);
21622174
device->flags.power_manageable = 0;
@@ -2318,6 +2330,23 @@ void acpi_dev_clear_dependencies(struct acpi_device *supplier)
23182330
}
23192331
EXPORT_SYMBOL_GPL(acpi_dev_clear_dependencies);
23202332

2333+
/**
2334+
* acpi_dev_ready_for_enumeration - Check if the ACPI device is ready for enumeration
2335+
* @device: Pointer to the &struct acpi_device to check
2336+
*
2337+
* Check if the device is present and has no unmet dependencies.
2338+
*
2339+
* Return true if the device is ready for enumeratino. Otherwise, return false.
2340+
*/
2341+
bool acpi_dev_ready_for_enumeration(const struct acpi_device *device)
2342+
{
2343+
if (device->flags.honor_deps && device->dep_unmet)
2344+
return false;
2345+
2346+
return acpi_device_is_present(device);
2347+
}
2348+
EXPORT_SYMBOL_GPL(acpi_dev_ready_for_enumeration);
2349+
23212350
/**
23222351
* acpi_dev_get_first_consumer_dev - Return ACPI device dependent on @supplier
23232352
* @supplier: Pointer to the dependee device

drivers/clk/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@ config COMMON_CLK_CDCE706
169169
help
170170
This driver supports TI CDCE706 programmable 3-PLL clock synthesizer.
171171

172+
config COMMON_CLK_TPS68470
173+
tristate "Clock Driver for TI TPS68470 PMIC"
174+
depends on I2C
175+
depends on INTEL_SKL_INT3472 || COMPILE_TEST
176+
select REGMAP_I2C
177+
help
178+
This driver supports the clocks provided by the TPS68470 PMIC.
179+
172180
config COMMON_CLK_CDCE925
173181
tristate "Clock driver for TI CDCE913/925/937/949 devices"
174182
depends on I2C

drivers/clk/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ obj-$(CONFIG_COMMON_CLK_SI570) += clk-si570.o
6464
obj-$(CONFIG_COMMON_CLK_STM32F) += clk-stm32f4.o
6565
obj-$(CONFIG_COMMON_CLK_STM32H7) += clk-stm32h7.o
6666
obj-$(CONFIG_COMMON_CLK_STM32MP157) += clk-stm32mp1.o
67+
obj-$(CONFIG_COMMON_CLK_TPS68470) += clk-tps68470.o
6768
obj-$(CONFIG_CLK_TWL6040) += clk-twl6040.o
6869
obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o
6970
obj-$(CONFIG_COMMON_CLK_VC5) += clk-versaclock5.o
@@ -111,7 +112,7 @@ obj-$(CONFIG_PLAT_SPEAR) += spear/
111112
obj-y += sprd/
112113
obj-$(CONFIG_ARCH_STI) += st/
113114
obj-$(CONFIG_ARCH_SUNXI) += sunxi/
114-
obj-$(CONFIG_SUNXI_CCU) += sunxi-ng/
115+
obj-y += sunxi-ng/
115116
obj-$(CONFIG_ARCH_TEGRA) += tegra/
116117
obj-y += ti/
117118
obj-$(CONFIG_CLK_UNIPHIER) += uniphier/

drivers/clk/clk-stm32f4.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ static const struct stm32f4_gate_data stm32f429_gates[] __initconst = {
129129
{ STM32F4_RCC_APB2ENR, 20, "spi5", "apb2_div" },
130130
{ STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" },
131131
{ STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" },
132-
{ STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" },
133132
};
134133

135134
static const struct stm32f4_gate_data stm32f469_gates[] __initconst = {
@@ -211,7 +210,6 @@ static const struct stm32f4_gate_data stm32f469_gates[] __initconst = {
211210
{ STM32F4_RCC_APB2ENR, 20, "spi5", "apb2_div" },
212211
{ STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" },
213212
{ STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" },
214-
{ STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" },
215213
};
216214

217215
static const struct stm32f4_gate_data stm32f746_gates[] __initconst = {
@@ -286,7 +284,6 @@ static const struct stm32f4_gate_data stm32f746_gates[] __initconst = {
286284
{ STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" },
287285
{ STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" },
288286
{ STM32F4_RCC_APB2ENR, 23, "sai2", "apb2_div" },
289-
{ STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" },
290287
};
291288

292289
static const struct stm32f4_gate_data stm32f769_gates[] __initconst = {
@@ -364,7 +361,6 @@ static const struct stm32f4_gate_data stm32f769_gates[] __initconst = {
364361
{ STM32F4_RCC_APB2ENR, 21, "spi6", "apb2_div" },
365362
{ STM32F4_RCC_APB2ENR, 22, "sai1", "apb2_div" },
366363
{ STM32F4_RCC_APB2ENR, 23, "sai2", "apb2_div" },
367-
{ STM32F4_RCC_APB2ENR, 26, "ltdc", "apb2_div" },
368364
{ STM32F4_RCC_APB2ENR, 30, "mdio", "apb2_div" },
369365
};
370366

0 commit comments

Comments
 (0)