- When TV goes into BACKGROUND SUSPEND mode by a sensor (BLE, Light,
Motion), power plugin should check which sensors are enabled then
execute PRESENCE detection with other sensors.
Then if all sensors detect PRESENCE, then wake up TV goes into NORMAL
mode as well.
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
FUNC_EXIT;
}
+static unsigned int get_avaliable_sensors_callback(void)
+{
+ unsigned int sensors;
+ FUNC_ENTRY;
+
+ sensors = _uam_pm_get_avaliable_sensors();
+
+ FUNC_EXIT;
+ return sensors;
+}
+
int _uam_ppm_handler_init(void)
{
__uam_clear_ppm_reqs();
uap_callbacks_t power_cbs = {
.check_presence_cb = do_presence_check_callback,
- .stop_presence_cb = stop_presence_check_callback
+ .stop_presence_cb = stop_presence_check_callback,
+ .get_available_sensors_cb = get_avaliable_sensors_callback
};
*/
typedef void (*stop_presence_check)(uas_plugin_id_e ids);
+/*
+ * DIRECTION: power-plugin --> ua-manager
+ * Get available sensor list (bitmask)
+ */
+typedef unsigned int (*get_available_sensors)(void);
+
/* Power plug-in callback structure */
typedef struct {
do_presence_check check_presence_cb;
stop_presence_check stop_presence_cb;
+ get_available_sensors get_available_sensors_cb;
} uap_callbacks_t;
typedef struct {