include: linux: add ebc.h
Change-Id: Id475a878e770f37f9110391d8864f8fcccbd3bfa Signed-off-by: Zorro Liu <lyx@rock-chips.com>
This commit is contained in:
parent
32d4d06685
commit
97872f0a58
2 changed files with 43 additions and 29 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#ifndef __EBC_DEV_H__
|
||||
#define __EBC_DEV_H__
|
||||
|
||||
#include <linux/ebc.h>
|
||||
#include <linux/notifier.h>
|
||||
|
||||
/*
|
||||
|
|
@ -25,14 +26,6 @@
|
|||
#define EBC_SUCCESS (0)
|
||||
#define EBC_ERROR (-1)
|
||||
|
||||
/*
|
||||
* ebc status notify
|
||||
*/
|
||||
#define EBC_OFF (0)
|
||||
#define EBC_ON (1)
|
||||
#define EBC_FB_BLANK (2)
|
||||
#define EBC_FB_UNBLANK (3)
|
||||
|
||||
/*
|
||||
* ebc system ioctl command
|
||||
*/
|
||||
|
|
@ -90,25 +83,4 @@ struct ebc_buf_info {
|
|||
int height_mm;
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_ROCKCHIP_EBC_DEV)
|
||||
int ebc_register_notifier(struct notifier_block *nb);
|
||||
int ebc_unregister_notifier(struct notifier_block *nb);
|
||||
int ebc_notify(unsigned long event);
|
||||
#else
|
||||
static inline int ebc_register_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int ebc_unregister_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int ebc_notify(unsigned long event)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
42
include/linux/ebc.h
Normal file
42
include/linux/ebc.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2024 Rockchip Electronics Co. Ltd.
|
||||
*
|
||||
* Author: Zorro Liu <zorro.liu@rock-chips.com>
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_EBC_H__
|
||||
#define __LINUX_EBC_H__
|
||||
|
||||
#include <linux/notifier.h>
|
||||
|
||||
/*
|
||||
* ebc status notify
|
||||
*/
|
||||
#define EBC_OFF (0)
|
||||
#define EBC_ON (1)
|
||||
#define EBC_FB_BLANK (2)
|
||||
#define EBC_FB_UNBLANK (3)
|
||||
|
||||
#if IS_REACHABLE(CONFIG_ROCKCHIP_EBC_DEV)
|
||||
int ebc_register_notifier(struct notifier_block *nb);
|
||||
int ebc_unregister_notifier(struct notifier_block *nb);
|
||||
int ebc_notify(unsigned long event);
|
||||
#else
|
||||
static inline int ebc_register_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int ebc_unregister_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int ebc_notify(unsigned long event)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue