Commit Graph
5249 Commits
Author SHA1 Message Date
Samuel FORESTIER 10c4f2afdf Fixes Fahrenheit missing conversion when data are JSON-formatted 2019-08-21 19:20:46 +02:00
Ondřej Lysoněk 7478a7da14 Merge pull request #192 from lucasrangit/use-toolchain-target-arch
makefile: use compiler target arch when determining what programs to compile
2019-08-08 16:25:16 +02:00
Lucas Magasweran 0863eff8fa makefile: use target arch when determining what programs to compile
To better support cross-compilation, the Makefile should detect the
compiler's target architecture instead of using `uname -m`, which
returns the host architecture. This approach uses the `gcc`/`clang`
compatible `-dumpmachine` option.

Cross-compilation worked but because of this bug, `isadump` and
`isaset` x86 ISA specific tools were built for PCC and ARM.

This run-time issue became a compile-time issue when `glibc` 2.30
removed the `sys/io.h` I/O port functions on ARM.

Also renamed `MACHINE` to `ARCH` to match cross-compiler conventions
for specifying the target architecture. For example,

`make ARCH=arm CC=arm-linux-gnueabi-gcc AR=arm-linux-gnueabi-ar`

Fixes #190

Signed-off-by: Lucas Magasweran <lucas.magasweran@ieee.org>
Reported-and-tested-by: Millhouse <milhouse@libreelec.tv>
2019-08-08 15:26:30 +02:00
Ondřej Lysoněk 5573d9d942 Merge pull request #189 from luca020400/master
Add support for Nuvoton NCT6112D/NCT6114D/NCT6116D Super IO Sensors
2019-07-30 11:37:54 +02:00
Luca Stefani 819786cb8d Add support for Nuvoton NCT6112D/NCT6114D/NCT6116D Super IO Sensors
* See https://patchwork.kernel.org/patch/11044521/#22774197 for reference
2019-07-30 11:35:58 +02:00
Ondřej Lysoněk d20ecfd4e8 Fix coding style
Let's use the kernel coding style in lm_sensors.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-07-29 10:38:22 +02:00
Ondřej Lysoněk 6e1cff65fb Merge pull request #180 from michalsimek/master
sensors: Scale voltage and current values
2019-07-29 10:32:34 +02:00
Ondřej Lysoněk eba5bf0714 sensors-detect: Reorder Nuvoton chips to match the kernel ordering
Reorder Nuvoton chips in the superio_ids_winbond array to match the
order in the kernel to make lookup easier. No functional change.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-07-29 09:57:28 +02:00
Ondřej Lysoněk 6ead226a2c sensors-detect: Update devid_mask for devices supported by nct6775
Since mainline commit 0599682b826ff7bbf, the nct6775 driver uses a
0xfff8 mask when scanning for devices. Update our detection to match
the kernel.

Fixes #188

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-07-29 09:42:40 +02:00
Ondřej Lysoněk ef0d2a393d Merge pull request #188 from luca020400/master
Add new Nuvoton Super IO Sensors
2019-07-29 09:33:05 +02:00
Luca Stefani 079064472f Add support for Nuvoton NCT6798D Super IO Sensors 2019-07-26 14:56:12 +02:00
Luca Stefani ed56004740 Add support for Nuvoton NCT6797D Super IO Sensors 2019-07-25 23:52:47 +02:00
Ondřej Lysoněk 00e7d37b35 sensors-detect: Add detection of AMD family 17h, model 70h
k10temp support was added in groeck/hwmon-next commit
22cac1016a4831922d2.

Fixes #187

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-07-23 11:54:22 +02:00
Ondřej Lysoněk 7daa6c5ed5 Merge pull request #181 from Leo-PL/X7DCL_fix_VTT
configs: fix Supermicro X7DCL VTT limits
2019-07-05 12:29:31 +02:00
Ondřej Lysoněk 77a75f1e02 Merge pull request #182 from Prism019/patch-1
Add driver for Fintek F75387SG/RG to sensors-detect
2019-07-05 12:15:21 +02:00
Prism Tutaj d03b3e3156 Add driver for Fintek F75387SG/RG to sensors-detect
Support for the Fintek F75387SG/RG was added to driver f75375s back in 2013.
2019-06-24 01:19:25 -05:00
Lech Perczak f371624531 configs: fix Supermicro X7DCL VTT limits
According to:
"Quad-Core Intel® Xeon(R) Processor 5400 Series Electrical Specifications"
(table 2-12), FSB termination voltage of the CPUs (VTT) is 1.1V +/-5%.
Initial configuration set it to 1.2V - fix that.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2019-06-23 23:57:23 +02:00
Michal Simek 1b8b1bce9e sensors: Scale voltage and current values
scale_value is generic function for scaling values. There is a lower
resolution then json format provides for voltage and current.
The patch is calling scale_value() and showing values with higher
resolution.
For example on Xilinx ZynqMP platform:
ina226-i2c-3-41
Adapter: i2c-0-mux (chan_id 0)
in0:           2.00 mV
in1:         848.00 mV
power1:      287.50 mW
curr1:       330.00 mA

Signed-off-by: Michal Simek <monstr@monstr.eu>
2019-06-20 13:31:52 +02:00
Ondřej Lysoněk 2c8cca3d6c sensors: json: Do not print a stray comma
Previously, if an error happened when reading the value of a subfeature,
subCnt would get incremented and a stray comma would get printed in the
following iteration, even though nothing was printed in the previous
iteration. This would produce a syntactically incorrect JSON.

This is based on a patch from the su8 user on GitHub.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-05-05 11:43:44 +02:00
Ondřej Lysoněk 50f227dafe sensors: json: Skip printing an unnecessary newline
Don't print a newline if no features were printed.

This is based on a patch from the su8 user on GitHub.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-05-05 11:43:44 +02:00
Ondřej Lysoněk 1020728a96 Merge pull request #173 from hygonsoc/master
sensors-detect: Add Hygon SoC driver detect support
2019-04-08 10:35:15 +02:00
hygonsoc 19fb506ef0 Add Hygon SoC driver detect support to use k10temp driver
Signed-off-by: hygonsoc <hygonsoc@gmail.com>
2019-04-08 11:39:11 +08:00
Ondřej Lysoněk 7812be2efe Merge pull request #161 from karolszklarski/master
Adding AVERAGE option to fancontrol
2019-04-01 12:55:03 +02:00
Ondřej Lysoněk bd1292cc1a Merge pull request #162 from jonasmalacofilho/conf-asus-prime-z370-a
configs: Add ASUS PRIME Z370-A motherboard
2019-03-31 10:43:13 +02:00
Ondřej Lysoněk 1a404a661c Merge pull request #157 from Leo-PL/X7DCL
configs: add Supermicro X7DCL
2019-03-31 10:13:02 +02:00
Jonas Malaco 87f64e08d0 configs: Add ASUS PRIME Z370-A motherboard
Tested with i7-8700K and two UEFI versions.
2019-01-30 02:07:31 -02:00
Karol Szklarski b2039f04e1 Adding AVERAGE option to fancontrol 2019-01-26 22:12:15 +01:00
Ondřej Lysoněk a60d30785e sensors-detect: Add detection of AMD Family 16h Model 30h power sensors
Support in fam15h_power was added in mainline commit 0bd52941586b3.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-01-23 11:04:04 +01:00
Ondřej Lysoněk 6a585cf1e1 sensors-detect: Update AMD Family 15h power sensors detection
Bring Family 15h power sensors detection up to date with the mainline
fam15h_power driver.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-01-23 11:04:04 +01:00
Lech Perczak 5a20b0c61d configs: add Supermicro X7DCL
Add configuration for Supermicro X7DCL motherboard.
Based on slightly modified setup of X7DBE from this repo.
Runtime tested on X7DCL-3 rev. 1.1a

So far there is only support for onboard sensors,
no support for PSU failure yet, nor external PMBus sensors.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2019-01-11 22:16:43 +01:00
Ondřej Lysoněk 782a2124b6 sensors-detect: Add detection of AMD Family 17h model 30h
Kernel support was added in mainline commit 210ba1201ff95.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-01-10 15:09:24 +01:00
Ondřej Lysoněk 097432dd01 Merge pull request #124 from lucasrangit/sensord-oneline
sensord: add oneline sensor log output option
2018-12-30 14:59:29 +01:00
Ondřej Lysoněk 84f773b3ec lm_sensors.lsm: Update the Maintained-by field
It's time to accept it.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-23 20:17:56 +01:00
Ondřej Lysoněk 7029800ddc Update version.h after the release
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-23 19:54:45 +01:00
Ondřej Lysoněk e8afbda10f 3.5.0 release
soname was bumped due to commit dcf23676cc which introduced an ABI
change.

Fixes #29

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
V3-5-0
2018-11-23 18:05:48 +01:00
Ondřej Lysoněk f22b411652 Clarify how to update SENSORS_API_VERSION
My understanding is that SENSORS_API_VERSION should be the same
as $(LIBMAINVER)$(LIBMINORVER) in lib/Module.mk. This means that
the first digit of SENSORS_API_VERSION needs to be incremented whenever
API *or* ABI changes, because we have to increment LIBMAINVER even if
only ABI changes to avoid program breakage.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-23 17:23:56 +01:00
Ondřej Lysoněk c56c90156d Update CHANGES
Update CHANGES with respect to commits d4cb932567 and 7e976f1325.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-23 12:19:08 +01:00
Ondřej Lysoněk 7e976f1325 libsensors: Treat devices without a known ancestor bus as virtual
Currently only hwmon devices that don't have a parent device are treated
as virtual. Let's extend the concept to hwmon devices, that don't have
a *recognized ancestor* device (hwmon devices that according to the kernel
don't reside on a bus that we recognize). This change is meant to address
cases where a hwmon device has a thermal class device for a parent, but
the thermal class device doesn't have a parent device.

These kind of hwmon devices started appearing in the 4.19 kernel
due to commit f6b6b52ef7a54160c0. It was not reported as a kernel
regression and fixed in the kernel, because according to
Documentation/admin-guide/sysfs-rules.rst, the change was OK to make
(it says "Position of devices along device chain can change").

Fixes #139

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-23 12:17:01 +01:00
Ondřej Lysoněk d4cb932567 libsensors: Consider all ancestor devices when determining bus type
Go through all ancestor devices of a hwmon device until we find a device
that resides on a bus that we recognize. This change is meant to address
hwmon devices that don't reside directly on a bus, but have another
device in the middle of the hiearchy. For example:
ACPI device -> thermal device -> hwmon device

These kind of hwmon devices started appearing in the 4.19 kernel
due to commit f6b6b52ef7a54160c0. It was not reported as a kernel
regression and fixed in the kernel, because according to
Documentation/admin-guide/sysfs-rules.rst, the change was OK to make
(it says "Position of devices along device chain can change").

Fixes #133

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-23 12:16:52 +01:00
Ondřej Lysoněk 567e6a3b36 libsensors: Pass a resolved device path to sensors_read_one_sysfs_chip
According to Documentation/admin-guide/sysfs-rules.rst, the "device"
link "must never appear in any path as an element". This patch makes
lm_sensors respect that.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-23 11:33:05 +01:00
Ondřej Lysoněk 6ac43308b5 libsensors: Rename a local variable
Rename a local variable to make it consistent with other parts of the
code. The variable is called (more descriptively) "dev_name"
in sensors_read_one_sysfs_chip(), so let's rename it to that.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-23 11:33:05 +01:00
Ondřej Lysoněk 0fbfc3b6e0 libsensors: Refactor bus type identification into a separate function
Refactor bus type identification into a separate function in order to
make the code more readable and easier to maintain.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-23 11:33:05 +01:00
Ondřej Lysoněk 0cb449735f libsensors: Refactor device classification into a separate function
Refactor device classification into a separate function in order to
make the code more readable and easier to maintain.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-23 11:33:05 +01:00
Ondřej Lysoněk 874ab9548d Merge pull request #143 from doctor64/asus_p8z68-v_lx
configs: Add ASUS P8Z68-V LX board
2018-11-19 18:03:23 +01:00
Alex Cherkayev e9e108316a configs: Add ASUS P8Z68-V LX board 2018-11-18 22:21:40 +02:00
Ondřej Lysoněk e4ff9c375e Update CHANGES
Add missing entries to the CHANGES file. Here's the list of relevant
commits:
* musl C library support: 8fb3922219
* F71868A hardwired inputs: dfa4518962
* fancontrol: save original pwm values: 34627e4666
* vt1211_pwm: use bash instead of sh: 06a57f6d54
* coverity scan fixes: 3b548b74ae, 40aa494c02, fb595f55d1,
  e0c146763b
* support for power min, lcrit, min_alarm, lcrit_alarm: dcf23676cc
* NCT6796D hardwired inputs: 64e13d5998
* Add the find-driver script: c755805cef

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-07 18:51:23 +01:00
Ondřej Lysoněk 012d76b978 README: Link to the lm_sensors website on hwmon wiki
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-07 18:03:23 +01:00
Ondřej Lysoněk 1f1f8c8a81 Merge pull request #140 from Camille019/patch-1
sensors: Fix power_common_sensors[] list
2018-11-05 10:31:48 +01:00
Camille019 c3dc727f5f sensors: Fix power_common_sensors[] list 2018-11-04 01:24:24 +01:00
Ondřej Lysoněk c755805cef Add the find-driver script
The script is meant to identify the driver and kernel module responsible
for exporting a given hardware monitoring chip.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-10-05 17:59:30 +02:00