android_kernel_samsung_sm86.../qcom/opensource/graphics-kernel/kgsl_sysfs.h
David Wronek 880d405719 Add 'qcom/opensource/graphics-kernel/' from commit 'b4fdc4c04295ac59109ae19d64747522740c3f14'
git-subtree-dir: qcom/opensource/graphics-kernel
git-subtree-mainline: 992813d9c1
git-subtree-split: b4fdc4c042
Change-Id:
repo: https://git.codelinaro.org/clo/la/platform/vendor/qcom/opensource/graphics-kernel
tag: GRAPHICS.LA.14.0.r1-07700-lanai.0
2024-10-06 16:44:56 +02:00

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