zephyr/drivers/power_domain/Kconfig
Albert Jakieła 06cfbd4159 drivers: power_domain: Introduce a gpio monitor driver
Power rails of some peripherals are controlled externally.
This is a case in embedded controllers, where the power of
some I2C devices are managed by the main application
processor.

To ensure that zephyr drivers access the devices where is
powered on, introduce a "monitoring" power domain. It works
by registering interrupt handler with gpio a pin, so that
when power state changes, it will notify relevant drivers.

Additionaly add CONFIG_POWER_DOMAIN_INIT_PRIORITY to replace
harcoded init priority.

Fixes: #51349

Signed-off-by: Albert Jakieła <jakiela@google.com>
2023-11-01 10:57:17 +00:00

45 lines
1,019 B
Plaintext

# Copyright (c) 2022, CSIRO.
# SPDX-License-Identifier: Apache-2.0
menuconfig POWER_DOMAIN
bool "Power domain drivers"
help
Include drivers for power domains in system config
if POWER_DOMAIN
module = POWER_DOMAIN
module-str = power_domain
source "subsys/logging/Kconfig.template.log_config"
config POWER_DOMAIN_INIT_PRIORITY
int "Power domain init priority"
default 75
help
Power domain initialization priority.
config POWER_DOMAIN_GPIO
bool "GPIO controlled power domain"
default y
depends on DT_HAS_POWER_DOMAIN_GPIO_ENABLED
depends on GPIO
depends on TIMEOUT_64BIT
select DEVICE_DEPS
config POWER_DOMAIN_INTEL_ADSP
bool "Use Intel ADSP power gating mechanisms"
default y
depends on DT_HAS_INTEL_ADSP_POWER_DOMAIN_ENABLED
select DEVICE_DEPS
help
Include Intel ADSP power domain control mechanisms
config POWER_DOMAIN_GPIO_MONITOR
bool "GPIO monitor for sensing power on rail"
default y
depends on DT_HAS_POWER_DOMAIN_GPIO_MONITOR_ENABLED
depends on GPIO
select DEVICE_DEPS
endif