diff options
| author | Anjelique Melendez <[email protected]> | 2024-02-01 12:44:24 -0800 |
|---|---|---|
| committer | Bjorn Andersson <[email protected]> | 2024-02-01 16:26:55 -0600 |
| commit | 5b2dd77be1d85ac3a8be3749f5605bf0830e2998 (patch) | |
| tree | 132b560e0bb1172dabceaeed190e6d8156ace4a9 /include/linux | |
| parent | 641fde51bdb26c09ea8cdbd82084e93bd88d1fcb (diff) | |
soc: qcom: add QCOM PBS driver
Add the Qualcomm PBS (Programmable Boot Sequencer) driver. The QCOM PBS
driver supports configuring software PBS trigger events through PBS RAM
on Qualcomm Technologies, Inc (QTI) PMICs.
Signed-off-by: Anjelique Melendez <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/soc/qcom/qcom-pbs.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/soc/qcom/qcom-pbs.h b/include/linux/soc/qcom/qcom-pbs.h new file mode 100644 index 000000000000..8a46209ccf13 --- /dev/null +++ b/include/linux/soc/qcom/qcom-pbs.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#ifndef _QCOM_PBS_H +#define _QCOM_PBS_H + +#include <linux/errno.h> +#include <linux/types.h> + +struct device_node; +struct pbs_dev; + +#if IS_ENABLED(CONFIG_QCOM_PBS) +int qcom_pbs_trigger_event(struct pbs_dev *pbs, u8 bitmap); +struct pbs_dev *get_pbs_client_device(struct device *client_dev); +#else +static inline int qcom_pbs_trigger_event(struct pbs_dev *pbs, u8 bitmap) +{ + return -ENODEV; +} + +static inline struct pbs_dev *get_pbs_client_device(struct device *client_dev) +{ + return ERR_PTR(-ENODEV); +} +#endif + +#endif |