summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/include/mach/tegra_dc_ext.h
blob: 521039283d8c72f29e29b0038830b98342150a02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
 * arch/arm/mach-tegra/include/mach/tegra_dc_ext.h
 *
 * Copyright (C) 2011, NVIDIA Corporation
 *
 * Author: Robert Morell <rmorell@nvidia.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * 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 __MACH_TEGRA_DC_EXT_H
#define __MACH_TEGRA_DC_EXT_H

#include <linux/nvhost.h>

struct tegra_dc_ext;

#ifdef CONFIG_TEGRA_DC_EXTENSIONS
int __init tegra_dc_ext_module_init(void);
void __exit tegra_dc_ext_module_exit(void);

struct tegra_dc_ext *tegra_dc_ext_register(struct nvhost_device *ndev,
					   struct tegra_dc *dc);
void tegra_dc_ext_unregister(struct tegra_dc_ext *dc_ext);

/* called by display controller on enable/disable */
void tegra_dc_ext_enable(struct tegra_dc_ext *dc_ext);
void tegra_dc_ext_disable(struct tegra_dc_ext *dc_ext);

int tegra_dc_ext_process_hotplug(int output);

#else /* CONFIG_TEGRA_DC_EXTENSIONS */

static inline
int tegra_dc_ext_module_init(void)
{
	return 0;
}
static inline
void tegra_dc_ext_module_exit(void)
{
}

static inline
struct tegra_dc_ext *tegra_dc_ext_register(struct nvhost_device *ndev,
					   struct tegra_dc *dc)
{
	return NULL;
}
static inline
void tegra_dc_ext_unregister(struct tegra_dc_ext *dc_ext)
{
}
static inline
void tegra_dc_ext_enable(struct tegra_dc_ext *dc_ext)
{
}
static inline
void tegra_dc_ext_disable(struct tegra_dc_ext *dc_ext)
{
}
static inline
int tegra_dc_ext_process_hotplug(int output)
{
	return 0;
}
#endif /* CONFIG_TEGRA_DC_EXTENSIONS */

#endif /* __MACH_TEGRA_DC_EXT_H */