blob: 38584afd028eff3451d2563ae0609986c8302408 [file] [log] [blame]
Jon Medhurstaaf37a32013-06-11 12:10:56 +01001/*
2 sysfs.h - part of libsensors, a library for reading Linux sensor data
3 Copyright (C) Mark M. Hoffman <mhoffman@lightlink.com>
4 Copyright (C) 2007 Jean Delvare <khali@linux-fr.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 MA 02110-1301 USA.
20*/
21
22#ifndef SENSORS_LIB_SYSFS_H
23#define SENSORS_LIB_SYSFS_H
24
25extern char sensors_sysfs_mount[];
26
27int sensors_init_sysfs(void);
28
29int sensors_read_sysfs_chips(void);
30
31int sensors_read_sysfs_bus(void);
32
33/* Read a value out of a sysfs attribute file */
34int sensors_read_sysfs_attr(const sensors_chip_name *name,
35 const sensors_subfeature *subfeature,
36 double *value);
37
38/* Write a value to a sysfs attribute file */
39int sensors_write_sysfs_attr(const sensors_chip_name *name,
40 const sensors_subfeature *subfeature,
41 double value);
42
43#endif /* !SENSORS_LIB_SYSFS_H */