dai: intel: dmic: Refactor power management initialization
This patch refactors the power management initialization for the DMIC driver across ACE15, ACE20, and ACE30 generations to align with the recommended practices outlined in the documentation. The changes include: 1. Replacing the conditional initialization of power management state with a call to `pm_device_driver_init` in the `dai_dmic_initialize_device` function. 2. Adding the `zephyr,pm-device-runtime-auto` property to the DMIC nodes in the device tree files for ACE15, ACE20, and ACE30. These changes ensure that the DMIC driver is initialized with the appropriate power management state and that runtime power management is automatically enabled based on the device tree configuration. The functionality of the power management state remains unchanged, ensuring consistent behavior. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This commit is contained in:
parent
fa4a9db7a3
commit
618e83e721
5 changed files with 9 additions and 6 deletions
|
@ -895,13 +895,8 @@ static int dai_dmic_initialize_device(const struct device *dev)
|
|||
dai_dmic_irq_handler,
|
||||
DEVICE_DT_INST_GET(0),
|
||||
0);
|
||||
if (pm_device_on_power_domain(dev)) {
|
||||
pm_device_init_off(dev);
|
||||
} else {
|
||||
pm_device_init_suspended(dev);
|
||||
}
|
||||
|
||||
return pm_device_runtime_enable(dev);
|
||||
return pm_device_driver_init(dev, dmic_pm_action);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -156,6 +156,7 @@
|
|||
interrupts = <0x08 0 0>;
|
||||
interrupt-parent = <&ace_intc>;
|
||||
power-domains = <&hub_ulp_domain>;
|
||||
zephyr,pm-device-runtime-auto;
|
||||
};
|
||||
|
||||
dmic1: dmic1@10000 {
|
||||
|
@ -166,6 +167,7 @@
|
|||
interrupts = <0x09 0 0>;
|
||||
interrupt-parent = <&ace_intc>;
|
||||
power-domains = <&hub_ulp_domain>;
|
||||
zephyr,pm-device-runtime-auto;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -180,6 +180,7 @@
|
|||
fifo = <0x0008>;
|
||||
interrupts = <0x08 0 0>;
|
||||
interrupt-parent = <&ace_intc>;
|
||||
zephyr,pm-device-runtime-auto;
|
||||
};
|
||||
|
||||
dmic1: dai-dmic1@10100 {
|
||||
|
@ -189,6 +190,7 @@
|
|||
fifo = <0x0108>;
|
||||
interrupts = <0x08 0 0>;
|
||||
interrupt-parent = <&ace_intc>;
|
||||
zephyr,pm-device-runtime-auto;
|
||||
};
|
||||
|
||||
dmicvss: dmicvss@16000 {
|
||||
|
|
|
@ -170,6 +170,7 @@
|
|||
interrupts = <0x08 0 0>;
|
||||
interrupt-parent = <&ace_intc>;
|
||||
power-domains = <&hub_ulp_domain>;
|
||||
zephyr,pm-device-runtime-auto;
|
||||
};
|
||||
|
||||
dmic1: dai-dmic1@10100 {
|
||||
|
@ -180,6 +181,7 @@
|
|||
interrupts = <0x08 0 0>;
|
||||
interrupt-parent = <&ace_intc>;
|
||||
power-domains = <&hub_ulp_domain>;
|
||||
zephyr,pm-device-runtime-auto;
|
||||
};
|
||||
|
||||
dmicvss: dmicvss@16000 {
|
||||
|
|
|
@ -175,6 +175,7 @@
|
|||
interrupts = <0x08 0 0>;
|
||||
interrupt-parent = <&ace_intc>;
|
||||
power-domains = <&hub_ulp_domain>;
|
||||
zephyr,pm-device-runtime-auto;
|
||||
};
|
||||
|
||||
dmic1: dai-dmic1@10100 {
|
||||
|
@ -185,6 +186,7 @@
|
|||
interrupts = <0x08 0 0>;
|
||||
interrupt-parent = <&ace_intc>;
|
||||
power-domains = <&hub_ulp_domain>;
|
||||
zephyr,pm-device-runtime-auto;
|
||||
};
|
||||
|
||||
dmicvss: dmicvss@16000 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue