1
0
mirror of https://github.com/physwizz/a155-U-u1.git synced 2025-09-16 03:59:21 +00:00
Files
physwizz 99537be4e2 first
2024-03-11 06:53:12 +11:00

39 lines
1.2 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* cpufreq-dbg-lite.c - eem debug driver
*
* Copyright (c) 2020 MediaTek Inc.
* Tungchen Shih <tungchen.shih@mediatek.com>
*/
#define PROC_FOPS_RW(name)\
static int name ## _proc_open(struct inode *inode, struct file *file)\
{\
return single_open(file, name ## _proc_show, PDE_DATA(inode));\
} \
static const struct proc_ops name ## _proc_fops = {\
.proc_open = name ## _proc_open,\
.proc_read = seq_read,\
.proc_lseek = seq_lseek,\
.proc_release = single_release,\
.proc_write = name ## _proc_write,\
}
#define PROC_FOPS_RO(name)\
static int name##_proc_open(struct inode *inode, struct file *file)\
{\
return single_open(file, name##_proc_show, PDE_DATA(inode));\
} \
static const struct proc_ops name##_proc_fops = {\
.proc_open = name##_proc_open,\
.proc_read = seq_read,\
.proc_lseek = seq_lseek,\
.proc_release = single_release,\
}
#define PROC_ENTRY(name) {__stringify(name), &name ## _proc_fops}
#define PROC_ENTRY_DATA(name) \
{__stringify(name), &name ## _proc_fops, g_ ## name}
extern int mtk_eem_init(struct platform_device *pdev);
extern int mtk_devinfo_init(struct platform_device *pdev);