4 * Copyright (c) 2012 - 2013 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.
20 #ifndef __DEVICE_HANDLER_H__
21 #define __DEVICE_HANDLER_H__
30 enum device_change_type {
31 DEVICE_CHANGE_ABNORMAL = 0,
32 DEVICE_CHANGE_NORMAL = 1,
35 enum charge_full_type {
36 CHARGING_NOT_FULL = 0,
39 enum charge_now_type {
40 CHARGER_ABNORMAL = -1,
41 CHARGER_DISCHARGING = 0,
64 enum battery_noti_type {
65 DEVICE_NOTI_BATT_CHARGE = 0,
67 DEVICE_NOTI_BATT_FULL,
71 enum battery_noti_status {
81 struct battery_status {
92 struct battery_status battery;
94 #define CONNECTED(val) ((val) != 0)
96 /* Battery functions */
97 void lowbat_monitor(void *data);
99 int extcon_set_count(int index);
101 int get_usb_state_direct(void);
103 void sync_cradle_status(void);
105 #endif /* __DEVICE_HANDLER_H__ */