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>
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>
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>
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>
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>
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>
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>
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>
Input routing and scaling for this board was read from schematic of a
similar MSI MS-7B00 (B350 Gaming Pro Carbon) board.
temp5 on the MS-7B00 schematic is a thermistor under the B350 chip itself.
However, on my MS-7A34 board the reading is stuck at 23°C.
Judging from MS-7A34 board sensor readings that other people had posted
online the sensor seems to work properly for them, so I have left it
enabled.
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Input routing and scaling for this board was read from its schematic,
verified on a real specimen.
This config is likely also valid for other members of GA-F2A88XM-x family,
as differences between them seem pretty minor.
It might also be valid for GA-F2A85XM-HD3 board considering that
GA-F2A88XM-HD3 schematic has the former board name as title in many places.
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Values as per nuvoton nct6779D datasheetSection 8.5 Analog Inputs (Page 54,55).
Is based on nct6779 which uses a 2.048V input range, all inputs above that are scaled using a voltage divider.
Specific inputs like the ADC, AVCC, VBAT, 3VSB and 3VCC utilize an integrated voltage divider.
Signed-off-by: Rigo Reddig <rigo.reddig@gmail.com>
Add an option `-1`/`--oneline` that logs the updates sensor value with
the chip and adapter on the same line.
This makes it easier to parse and uniquely identify sensors without
labels, such as `temp1` in the example below.
Without `--oneline`:
```
Chip: iwlwifi-virtual-0
Adapter: Virtual device
temp1: 35.0 C
Chip: coretemp-isa-0000
Adapter: ISA adapter
Package id 0: 46.0 C
Core 0: 43.0 C
Core 1: 43.0 C
Core 2: 39.0 C
Core 3: 41.0 C
Chip: acpitz-virtual-0
Adapter: Virtual device
temp1: 25.0 C
Chip: dell_smm-virtual-0
Adapter: Virtual device
Processor Fan: 2512 RPM
Video Fan: 2498 RPM
CPU: 46.0 C
Ambient: 54.0 C
Ambient: 47.0 C
Other: 40.0 C
Chip: pch_skylake-virtual-0
Adapter: Virtual device
temp1: 66.0 C
```
With `--oneline`:
```
Chip: iwlwifi-virtual-0 Adapter: Virtual device temp1: 34.0 C
Chip: coretemp-isa-0000 Adapter: ISA adapter Package id 0: 47.0 C
Chip: coretemp-isa-0000 Adapter: ISA adapter Core 0: 42.0 C
Chip: coretemp-isa-0000 Adapter: ISA adapter Core 1: 43.0 C
Chip: coretemp-isa-0000 Adapter: ISA adapter Core 2: 39.0 C
Chip: coretemp-isa-0000 Adapter: ISA adapter Core 3: 41.0 C
Chip: acpitz-virtual-0 Adapter: Virtual device temp1: 25.0 C
Chip: dell_smm-virtual-0 Adapter: Virtual device Processor Fan: 2512 RPM
Chip: dell_smm-virtual-0 Adapter: Virtual device Video Fan: 2501 RPM
Chip: dell_smm-virtual-0 Adapter: Virtual device CPU: 46.0 C
Chip: dell_smm-virtual-0 Adapter: Virtual device Ambient: 54.0 C
Chip: dell_smm-virtual-0 Adapter: Virtual device Ambient: 48.0 C
Chip: dell_smm-virtual-0 Adapter: Virtual device Other: 40.0 C
Chip: pch_skylake-virtual-0 Adapter: Virtual device temp1: 66.0 C
```
Signed-off-by: Lucas Magasweran <lucas.magasweran@ieee.org>
It seems Nuvoton NCT6796D also has the same hardwired inputs.
This was determined experimentally on an ASUS PRIME B360M-A board.
Signed-off-by: Roy Zhang <pudh4418@gmail.com>
This reverts commit 3dc5358dcb9ae3b04e3a01173db34443f38dfe3a.
Guenter Roeck's repo got migrated to
https://github.com/lm-sensors/lm-sensors
I am the new maintainer.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
SFP modules measure the transmit power of the lazer. The sensor has
expected minimum values, and alarms when these minimams are reached.
Add support to sensors to print these.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Do command substitution in double quotes to prevent word splitting.
The issue was reported by Coverity Scan.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>