Lines Matching +full:- +full:thermal

1 // SPDX-License-Identifier: GPL-2.0
7 * Thermal subsystem testing facility.
9 * This facility allows the thermal core functionality to be exercised in a
12 * It resides in the "thermal-testing" directory under the debugfs root and
14 * representing a thermal testing facility command.
18 * The "addtz" command causes a new test thermal zone template to be created,
21 * # echo addtz > /sys/kernel/debug/thermal-testing/command
23 * That template will be represented as a subdirectory in the "thermal-testing"
26 * # ls /sys/kernel/debug/thermal-testing/
29 * The thermal zone template can be populated with trip points with the help of
32 * # echo tzaddtrip:0 > /sys/kernel/debug/thermal-testing/command
34 * which causes a trip point template to be added to the test thermal zone
35 * template 0 (represented by the tz0 subdirectory in "thermal-testing").
37 * # ls /sys/kernel/debug/thermal-testing/tz0
45 * The initial temperature of a thermal zone based on a template can be set by
46 * writing to the "init_temp" file in its directory under "thermal-testing", for
49 * echo 50000 > /sys/kernel/debug/thermal-testing/tz0/init_temp
52 * thermal zone based on a given template with the thermal core, for example
54 * # echo tzreg:0 > /sys/kernel/debug/thermal-testing/command
56 * In this case, test thermal zone template 0 is used for registering a new
57 * thermal zone and the set of trip point templates associated with it is used
58 * for populating the new thermal zone's trip points table. The type of the new
59 * thermal zone is "test_tz".
61 * The temperature and hysteresis of all of the trip points in that new thermal
64 * The current temperature of the new thermal zone can be set by writing to the
65 * "temp" file in the corresponding thermal zone template's directory under
66 * "thermal-testing", for example
68 * echo 10000 > /sys/kernel/debug/thermal-testing/tz0/temp
70 * which will also trigger a temperature update for this zone in the thermal
74 * When it is not needed any more, a test thermal zone template can be deleted
77 * # echo deltz:0 > /sys/kernel/debug/thermal-testing/command
79 * which will also unregister the thermal zone based on it, if present.
82 #define pr_fmt(fmt) "thermal-testing: " fmt
135 ret = -EINVAL; in tt_command_exec()
151 return -ENOMEM; in tt_command_process()
154 return -EFAULT; in tt_command_process()
170 return -EINVAL; in tt_command_process()
176 struct dentry *dentry = file->f_path.dentry; in tt_command_write()
180 return -EINVAL; in tt_command_write()
183 return -E2BIG; in tt_command_write()
204 d_testing = debugfs_create_dir("thermal-testing", NULL); in thermal_testing_init()
220 MODULE_DESCRIPTION("Thermal core testing facility");