ODROID-COMMON: media/vout: add new kernel param 'cvbscable='

This patch is to indicate when CVBS cable is connected or not, '1' as the cable
is attached and '0' otherwise. Currently CVBS cable only can be detected by
U-boot since the detection signal can be read by ADC.

Change-Id: I8fdff0cf0a2cf2bb2a94b296a1e2e5946864513d
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
This commit is contained in:
Dongjin Kim
2019-02-20 15:49:01 +09:00
parent 97bb889f35
commit 9e5bce61e8
2 changed files with 20 additions and 0 deletions

View File

@@ -1640,6 +1640,22 @@ static int __init cvbs_performance_setup(char *line)
}
__setup("cvbsdrv=", cvbs_performance_setup);
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
static unsigned long cvbs_cable = 0;
int cvbs_cable_connected(void)
{
return (int)cvbs_cable;
}
EXPORT_SYMBOL(cvbs_cable_connected);
static int __init get_cvbs_cable(char *str)
{
return kstrtoul(str, 10, (unsigned long *)&cvbs_cable);
}
__setup("cvbscable=", get_cvbs_cable);
#endif
arch_initcall(cvbs_init_module);
module_exit(cvbs_exit_module);

View File

@@ -92,4 +92,8 @@ extern int vout2_resume(void);
extern int vout2_shutdown(void);
#endif
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
extern int cvbs_cable_connected(void);
#endif
#endif