blob: 70fae94f888198cfd4dd7351e99c8b19b2ba164b [file] [log] [blame]
Ajay Singh Parmar67835fa2013-08-25 00:54:42 -07001/* include/linux/msm_hdmi.h
2 *
3 * Copyright (c) 2014 The Linux Foundation. All rights reserved.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14#ifndef _MSM_HDMI_H_
15#define _MSM_HDMI_H_
16
17/*
18 * HDMI cable notify handler sturcture.
19 * link A link for the linked list
20 * status Current status of HDMI cable connection
21 * hpd_notify Callback function to provide cable status
22 */
23struct hdmi_cable_notify {
24 struct list_head link;
25 int status;
26 void (*hpd_notify) (struct hdmi_cable_notify *h);
27};
28
29#ifdef CONFIG_FB_MSM_MDSS_HDMI_PANEL
30/*
31 * Register for HDMI cable connect or disconnect notification.
32 * @param handler callback handler for notification
33 * @return negative value as error otherwise current status of cable
34 */
35int register_hdmi_cable_notification(
36 struct hdmi_cable_notify *handler);
37
38/*
39 * Un-register for HDMI cable connect or disconnect notification.
40 * @param handler callback handler for notification
41 * @return negative value as error
42 */
43int unregister_hdmi_cable_notification(
44 struct hdmi_cable_notify *handler);
45#else
46int register_hdmi_cable_notification(
47 struct hdmi_cable_notify *handler) {
48 return 0;
49}
50
51int unregister_hdmi_cable_notification(
52 struct hdmi_cable_notify *handler) {
53 return 0;
54}
55#endif /* CONFIG_FB_MSM_MDSS_HDMI_PANEL */
56
57#endif /*_MSM_HDMI_H_*/