| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* |
| 3 | * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | #ifndef _QCOM_PBS_H |
| 7 | #define _QCOM_PBS_H |
| 8 | |
| 9 | #include <linux/errno.h> |
| 10 | #include <linux/types.h> |
| 11 | |
| 12 | struct device_node; |
| 13 | struct pbs_dev; |
| 14 | |
| 15 | #if IS_ENABLED(CONFIG_QCOM_PBS) |
| 16 | int qcom_pbs_trigger_event(struct pbs_dev *pbs, u8 bitmap); |
| 17 | struct pbs_dev *get_pbs_client_device(struct device *client_dev); |
| 18 | #else |
| 19 | static inline int qcom_pbs_trigger_event(struct pbs_dev *pbs, u8 bitmap) |
| 20 | { |
| 21 | return -ENODEV; |
| 22 | } |
| 23 | |
| 24 | static inline struct pbs_dev *get_pbs_client_device(struct device *client_dev) |
| 25 | { |
| 26 | return ERR_PTR(-ENODEV); |
| 27 | } |
| 28 | #endif |
| 29 | |
| 30 | #endif |
| 31 | |