Files
chandu078 7a75304a35 Add 'qcom/opensource/graphics-kernel/' from commit '4a6a6259032c8feb4ed968070728e9ded2391fb5'
git-subtree-dir: qcom/opensource/graphics-kernel
git-subtree-mainline: 05d3c2a233
git-subtree-split: 4a6a625903
2025-08-03 09:16:50 +05:30

32 lines
856 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*/
#ifndef _KGSL_SYSFS_H_
#define _KGSL_SYSFS_H_
struct kgsl_device;
/**
* struct kgsl_gpu_sysfs_attr - Attribute definition for sysfs objects in the
* /sys/kernel/gpu kobject
*/
struct kgsl_gpu_sysfs_attr {
/** @attr: Attribute for the sysfs node */
struct attribute attr;
/** @show: Show function for the node */
ssize_t (*show)(struct kgsl_device *device, char *buf);
/** @store: Store function for the node */
ssize_t (*store)(struct kgsl_device *device, const char *buf,
size_t count);
};
#define GPU_SYSFS_ATTR(_name, _mode, _show, _store) \
const struct kgsl_gpu_sysfs_attr gpu_sysfs_attr_##_name = { \
.attr = { .name = __stringify(_name), .mode = _mode }, \
.show = _show, \
.store = _store, \
}
#endif