mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
synaptics_mmi: DSI bound suspend/resume
DSI framework can send notifications from multiple channels. Add device tree option to bind suspend/resume notifier to certain DSI channel. This change applies to both: FB and DRM Change-Id: Ie305914b8409415f6cf43182892fb52cfc524d3a Signed-off-by: Konstantin Makariev <hcv867@motorola.com> Reviewed-on: https://gerrit.mot.com/1214307 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Ryan Lattrel <ryanl@motorola.com> Reviewed-by: Konstantin Makariev <kmakariev@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
fd0b77602a
commit
66ae30dd9c
2 changed files with 14 additions and 2 deletions
|
|
@ -1744,6 +1744,11 @@ static struct synaptics_dsx_platform_data *
|
|||
pr_notice("pm qos latency is %d\n",
|
||||
rmi4_data->pm_qos_latency);
|
||||
|
||||
retval = of_property_read_u32(np, "synaptics,control-dsi",
|
||||
&rmi4_data->ctrl_dsi);
|
||||
if (!retval)
|
||||
pr_notice("control DSI %d\n", rmi4_data->ctrl_dsi);
|
||||
|
||||
return pdata;
|
||||
}
|
||||
#else
|
||||
|
|
@ -7563,6 +7568,9 @@ static int synaptics_dsx_panel_cb(struct notifier_block *nb,
|
|||
struct synaptics_rmi4_data *rmi4_data =
|
||||
container_of(nb, struct synaptics_rmi4_data, panel_nb);
|
||||
|
||||
if (!evdata || (evdata->id != rmi4_data->ctrl_dsi))
|
||||
return 0;
|
||||
|
||||
if ((event == MSM_DRM_EARLY_EVENT_BLANK || event == MSM_DRM_EVENT_BLANK) &&
|
||||
evdata && evdata->data && rmi4_data) {
|
||||
int *blank = evdata->data;
|
||||
|
|
@ -7589,9 +7597,12 @@ static int synaptics_dsx_panel_cb(struct notifier_block *nb,
|
|||
struct synaptics_rmi4_data *rmi4_data =
|
||||
container_of(nb, struct synaptics_rmi4_data, panel_nb);
|
||||
|
||||
if (!evdata || !evdata->info ||
|
||||
(evdata->info->node != rmi4_data->ctrl_dsi))
|
||||
return 0;
|
||||
|
||||
if ((event == FB_EARLY_EVENT_BLANK || event == FB_EVENT_BLANK) &&
|
||||
evdata && evdata->info && evdata->info->node == 0 &&
|
||||
evdata->data && rmi4_data) {
|
||||
evdata && evdata->data && rmi4_data) {
|
||||
int *blank = evdata->data;
|
||||
pr_debug("fb notification: event = %lu blank = %d\n", event, *blank);
|
||||
/* entering suspend upon early blank event */
|
||||
|
|
|
|||
|
|
@ -494,6 +494,7 @@ struct synaptics_rmi4_data {
|
|||
unsigned int active_fn_intr_mask;
|
||||
int state;
|
||||
int irq;
|
||||
int ctrl_dsi;
|
||||
int sensor_max_x;
|
||||
int sensor_max_y;
|
||||
bool irq_enabled;
|
||||
|
|
|
|||
Loading…
Reference in a new issue