| Top |
This library provides helpers to access sysfs features. Right now it only
provides basic support for like igt_sysfs_open().
char * igt_sysfs_path (int device,char *path,int pathlen);
This finds the sysfs directory corresponding to device
.
int
igt_sysfs_open (int device);
This opens the sysfs directory corresponding to device for use
with igt_sysfs_set() and igt_sysfs_get().
char * igt_sysfs_gt_path (int device,int gt,char *path,int pathlen);
This finds the sysfs directory corresponding to device
and gt
. If the gt
specific directory is not available and gt is 0, path is filled with sysfs
base directory.
int igt_sysfs_gt_open (int device,int gt);
This opens the sysfs gt directory corresponding to device and gt for use
with igt_sysfs_set() and igt_sysfs_get().
int
igt_sysfs_get_num_gt (int device);
Reads number of GT sysfs entries. Asserts for atleast one GT entry. (see igt_sysfs_gt_path).
bool igt_sysfs_has_attr (int dir,const char *attr);
This checks if specified attr exists in device sysfs directory.
const char * igt_sysfs_dir_id_to_name (int dir,enum i915_attr_id id);
Returns attribute name corresponding to attribute id in either the per-gt or legacy per-device sysfs
const char * igt_sysfs_path_id_to_name (const char *path,enum i915_attr_id id);
Returns attribute name corresponding to attribute id in either the per-gt or legacy per-device sysfs
int igt_sysfs_read (int dir,const char *attr,void *data,int len);
This reads len
bytes from the sysfs file to data
dir |
directory for the device from |
|
attr |
name of the sysfs node to open |
|
data |
the block to read into |
|
len |
the maximum length to read |
int igt_sysfs_write (int dir,const char *attr,const void *data,int len);
This writes len
bytes from data
to the sysfs file.
dir |
directory for the device from |
|
attr |
name of the sysfs node to open |
|
data |
the block to write from |
|
len |
the length to write |
bool igt_sysfs_set (int dir,const char *attr,const char *value);
This writes the value to the sysfs file.
dir |
directory for the device from |
|
attr |
name of the sysfs node to open |
|
value |
the string to write |
char * igt_sysfs_get (int dir,const char *attr);
This reads the value from the sysfs file.
int igt_sysfs_scanf (int dir,const char *attr,const char *fmt,...);
scanf() wrapper for sysfs.
dir |
directory for the device from |
|
attr |
name of the sysfs node to open |
|
fmt |
scanf format string |
|
... |
Additional paramaters to store the scaned input values |
int igt_sysfs_vprintf (int dir,const char *attr,const char *fmt,va_list ap);
int igt_sysfs_printf (int dir,const char *attr,const char *fmt,...);
printf() wrapper for sysfs.
dir |
directory for the device from |
|
attr |
name of the sysfs node to open |
|
fmt |
printf format string |
|
... |
Additional paramaters to store the scaned input values |
uint32_t igt_sysfs_get_u32 (int dir,const char *attr);
Convenience wrapper to read a unsigned 32bit integer from a sysfs file.
bool igt_sysfs_set_u32 (int dir,const char *attr,uint32_t value);
Convenience wrapper to write a unsigned 32bit integer to a sysfs file.
dir |
directory for the device from |
|
attr |
name of the sysfs node to open |
|
value |
value to set |
uint64_t igt_sysfs_get_u64 (int dir,const char *attr);
Convenience wrapper to read a unsigned 64bit integer from a sysfs file.
bool igt_sysfs_set_u64 (int dir,const char *attr,uint64_t value);
Convenience wrapper to write a unsigned 64bit integer to a sysfs file.
dir |
directory for the device from |
|
attr |
name of the sysfs node to open |
|
value |
value to set |
bool igt_sysfs_get_boolean (int dir,const char *attr);
Convenience wrapper to read a boolean sysfs file.
bool igt_sysfs_set_boolean (int dir,const char *attr,bool value);
Convenience wrapper to write a boolean sysfs file.
dir |
directory for the device from |
|
attr |
name of the sysfs node to open |
|
value |
value to set |
void
bind_fbcon (bool enable);
This functions enables/disables the text console running on top of the framebuffer device.
void
kick_snd_hda_intel (void);
This functions unbinds the snd_hda_intel driver so the module cand be unloaded.