panel_notifier: Add new panel notify event type, after panel reset, before sending panel on init commands. Change-Id: I9cc37530ca610060fd122da52bd2edba995ceee4 Signed-off-by: wangyq13 <wangyq13@lenovo.com> Reviewed-on: https://gerrit.mot.com/1651425 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Dezhen Hou <houdz1@motorola.com> Submit-Approved: Jira Key
68 lines
1.6 KiB
C
68 lines
1.6 KiB
C
/* Copyright (c) 2016, Motorola Mobility, LLC.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
#ifndef __PANEL_NOTIFIER_H__
|
|
#define __PANEL_NOTIFIER_H__
|
|
|
|
#include <linux/notifier.h>
|
|
|
|
enum panel_event {
|
|
PANEL_EVENT_PRE_DISPLAY_OFF,
|
|
PANEL_EVENT_PRE_DISPLAY_ON,
|
|
PANEL_EVENT_DISPLAY_OFF,
|
|
PANEL_EVENT_DISPLAY_ON,
|
|
PANEL_EVENT_DISPLAY_ON_PREPARE,
|
|
};
|
|
|
|
#ifdef CONFIG_PANEL_NOTIFICATIONS
|
|
|
|
#define MAX_PANEL_IDX 2
|
|
enum touch_panel_id {
|
|
TOUCH_PANEL_IDX_PRIMARY = 0,
|
|
TOUCH_PANEL_MAX_IDX,
|
|
};
|
|
|
|
int panel_register_notifier(struct notifier_block *nb);
|
|
int panel_unregister_notifier(struct notifier_block *nb);
|
|
int panel_notify(unsigned int event, void *data);
|
|
int touch_set_state(int state, int panel_idx);
|
|
int check_touch_state(int *state, int panel_idx);
|
|
|
|
#else
|
|
|
|
#include <linux/errno.h>
|
|
static inline int panel_register_notifier(struct notifier_block *nb)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
static inline int panel_unregister_notifier(struct notifier_block *nb)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
static inline int panel_notify(unsigned int event, void *data)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
static inline int touch_set_state(int state, int panel_idx);
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
static inline int check_touch_state(int *state, int panel_idx);
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
|
|
#endif
|
|
#endif
|