4 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 #ifndef __POWER_STATE_MANAGER_H__
20 #define __POWER_STATE_MANAGER_H__
23 #include <libsyscommon/ini-parser.h>
25 #include "shared/log.h"
35 extern char *psm_name[PSM_MAX];
43 typedef void (*psm_transfunc) (const struct trans_info *info);
44 void power_state_manager_init(void *data);
46 static inline enum psm_state convert_action_string_to_psm_state(const char *str)
48 if (MATCH(str, "start"))
50 else if (MATCH(str, "sleep"))
52 else if (MATCH(str, "normal"))
54 else if (MATCH(str, "poweroff"))
57 _W("Invalid psm_state=%s", str);
62 #endif //__POWER_STATE_MANAGER_H__