android_kernel_xiaomi_sm8450/include/soc/qcom/rpm-notifier.h
Raghavendra Kakarla b12441b932 soc: qcom: Add RPM SMD Driver
This is a snapshot of the RPM-SMD driver functionality as of
'commit 0453f0e705df8b("move rpm-smd initcall to
postcore_initcall_sync")' on msm-4.14 branch.

Change-Id: Ie70bca9c28ae2339b45715f7d82839f39e733832
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
2020-04-26 15:47:13 +05:30

57 lines
1.4 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
*/
#ifndef __ARCH_ARM_MACH_MSM_RPM_NOTIF_H
#define __ARCH_ARM_MACH_MSM_RPM_NOTIF_H
struct msm_rpm_notifier_data {
uint32_t rsc_type;
uint32_t rsc_id;
uint32_t key;
uint32_t size;
uint8_t *value;
};
/**
* msm_rpm_register_notifier - Register for sleep set notifications
*
* @nb - notifier block to register
*
* return 0 on success, errno on failure.
*/
int msm_rpm_register_notifier(struct notifier_block *nb);
/**
* msm_rpm_unregister_notifier - Unregister previously registered notifications
*
* @nb - notifier block to unregister
*
* return 0 on success, errno on failure.
*/
int msm_rpm_unregister_notifier(struct notifier_block *nb);
/**
* msm_rpm_enter_sleep - Notify RPM driver to prepare for entering sleep
*
* @bool - flag to enable print contents of sleep buffer.
* @cpumask - cpumask of next wakeup cpu
*
* return 0 on success errno on failure.
*/
int msm_rpm_enter_sleep(bool print, const struct cpumask *cpumask);
/**
* msm_rpm_exit_sleep - Notify RPM driver about resuming from power collapse
*/
void msm_rpm_exit_sleep(void);
/**
* msm_rpm_waiting_for_ack - Indicate if there is RPM message
* pending acknowledgment.
* returns true for pending messages and false otherwise
*/
bool msm_rpm_waiting_for_ack(void);
#endif /*__ARCH_ARM_MACH_MSM_RPM_NOTIF_H */