Skip to content

Commit 502b5a0

Browse files
author
Guenter Roeck
committed
hwmon: Add support for Lineage Compact Power Line PEM devices
This patch adds support for hardware monitoring of Lineage Compact Power Line Power Entry Modules. Reviewed-by: Tom Grennan <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
1 parent 4e9be65 commit 502b5a0

File tree

4 files changed

+678
-0
lines changed

4 files changed

+678
-0
lines changed

Documentation/hwmon/lineage-pem

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
Kernel driver lineage-pem
2+
=========================
3+
4+
Supported devices:
5+
* Lineage Compact Power Line Power Entry Modules
6+
Prefix: 'lineage-pem'
7+
Addresses scanned: -
8+
Documentation:
9+
http://www.lineagepower.com/oem/pdf/CPLI2C.pdf
10+
11+
Author: Guenter Roeck <[email protected]>
12+
13+
14+
Description
15+
-----------
16+
17+
This driver supports various Lineage Compact Power Line DC/DC and AC/DC
18+
converters such as CP1800, CP2000AC, CP2000DC, CP2100DC, and others.
19+
20+
Lineage CPL power entry modules are nominally PMBus compliant. However, most
21+
standard PMBus commands are not supported. Specifically, all hardware monitoring
22+
and status reporting commands are non-standard. For this reason, a standard
23+
PMBus driver can not be used.
24+
25+
26+
Usage Notes
27+
-----------
28+
29+
This driver does not probe for Lineage CPL devices, since there is no register
30+
which can be safely used to identify the chip. You will have to instantiate
31+
the devices explicitly.
32+
33+
Example: the following will load the driver for a Lineage PEM at address 0x40
34+
on I2C bus #1:
35+
$ modprobe lineage-pem
36+
$ echo lineage-pem 0x40 > /sys/bus/i2c/devices/i2c-1/new_device
37+
38+
All Lineage CPL power entry modules have a built-in I2C bus master selector
39+
(PCA9541). To ensure device access, this driver should only be used as client
40+
driver to the pca9541 I2C master selector driver.
41+
42+
43+
Sysfs entries
44+
-------------
45+
46+
All Lineage CPL devices report output voltage and device temperature as well as
47+
alarms for output voltage, temperature, input voltage, input current, input power,
48+
and fan status.
49+
50+
Input voltage, input current, input power, and fan speed measurement is only
51+
supported on newer devices. The driver detects if those attributes are supported,
52+
and only creates respective sysfs entries if they are.
53+
54+
in1_input Output voltage (mV)
55+
in1_min_alarm Output undervoltage alarm
56+
in1_max_alarm Output overvoltage alarm
57+
in1_crit Output voltage critical alarm
58+
59+
in2_input Input voltage (mV, optional)
60+
in2_alarm Input voltage alarm
61+
62+
curr1_input Input current (mA, optional)
63+
curr1_alarm Input overcurrent alarm
64+
65+
power1_input Input power (uW, optional)
66+
power1_alarm Input power alarm
67+
68+
fan1_input Fan 1 speed (rpm, optional)
69+
fan2_input Fan 2 speed (rpm, optional)
70+
fan3_input Fan 3 speed (rpm, optional)
71+
72+
temp1_input
73+
temp1_max
74+
temp1_crit
75+
temp1_alarm
76+
temp1_crit_alarm
77+
temp1_fault

drivers/hwmon/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,17 @@ config SENSORS_JC42
467467
This driver can also be built as a module. If so, the module
468468
will be called jc42.
469469

470+
config SENSORS_LINEAGE
471+
tristate "Lineage Compact Power Line Power Entry Module"
472+
depends on I2C && EXPERIMENTAL
473+
help
474+
If you say yes here you get support for the Lineage Compact Power Line
475+
series of DC/DC and AC/DC converters such as CP1800, CP2000AC,
476+
CP2000DC, CP2725, and others.
477+
478+
This driver can also be built as a module. If so, the module
479+
will be called lineage-pem.
480+
470481
config SENSORS_LM63
471482
tristate "National Semiconductor LM63 and LM64"
472483
depends on I2C

drivers/hwmon/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ obj-$(CONFIG_SENSORS_JC42) += jc42.o
6262
obj-$(CONFIG_SENSORS_JZ4740) += jz4740-hwmon.o
6363
obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o
6464
obj-$(CONFIG_SENSORS_K10TEMP) += k10temp.o
65+
obj-$(CONFIG_SENSORS_LINEAGE) += lineage-pem.o
6566
obj-$(CONFIG_SENSORS_LIS3LV02D) += lis3lv02d.o hp_accel.o
6667
obj-$(CONFIG_SENSORS_LIS3_SPI) += lis3lv02d.o lis3lv02d_spi.o
6768
obj-$(CONFIG_SENSORS_LIS3_I2C) += lis3lv02d.o lis3lv02d_i2c.o

0 commit comments

Comments
 (0)