Commit Graph

759 Commits

Author SHA1 Message Date
Robert Marko fff7b8ab22 hwmon: add Texas Instruments TPS23861 driver
Add basic monitoring support as well as port on/off control for Texas
Instruments TPS23861 PoE PSE IC.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210121134434.2782405-2-robert.marko@sartura.hr
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-02-12 07:02:55 -08:00
Guenter Roeck 66102281f9 hwmon: (pmbus/max16601) Add support for MAX16508
MAX16508 is quite similar to MAX16601, except that it does not support
the DEFAULT_NUM_POP register and we thus can not dynamically determine
the number of populated phases.

Cc: Alex Qiu <xqiu@google.com>
Cc: Ugur Usug <Ugur.Usug@maximintegrated.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210125185327.93282-2-linux@roeck-us.net
Reviewed-by: Alex Qiu <xqiu@google.com>
Tested-by: Alex Qiu <xqiu@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-29 09:20:33 -08:00
Guenter Roeck 220c404dc7 hwmon: (pmbus/max16601) Determine and use number of populated phases
The MAX16601 can report the number of populated phases. Use this
information to only create sysfs attributes for populated phases.

Cc: Alex Qiu <xqiu@google.com>
Cc: Ugur Usug <Ugur.Usug@maximintegrated.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210125185327.93282-1-linux@roeck-us.net
Reviewed-by: Alex Qiu <xqiu@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-29 09:20:31 -08:00
Johannes Cornelis Draaijer (datdenkikniet) 8c78f0dee4 hwmon: Add AHT10 Temperature and Humidity Sensor Driver
This patch adds a hwmon driver for the AHT10 Temperature and
Humidity sensor. It has a maximum sample rate, as the datasheet
states that the chip may heat up if it is sampled more than once
every two seconds.

Has been tested a to work on a raspberrypi0w

Signed-off-by: Johannes Cornelis Draaijer (datdenkikniet) <jcdra1@gmail.com>
Link: https://lore.kernel.org/r/20210107194014.GA88780@desktop
[groeck: dropped AHT10_ADDR (unused) and use AHT10_MEAS_SIZE where
 appropriate; dropped change log]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-27 17:44:18 -08:00
Blaž Hrastnik bd433537fe hwmon: (nct6683) Support ASRock boards
Tested with ASRock X570 Phantom Gaming-ITX/TB3. It also appears
on other ASRock boards.

Signed-off-by: Blaž Hrastnik <blaz@mxxn.io>
Link: https://lore.kernel.org/r/b08d641c-3fb5-4845-85f7-e1753149cd7d@www.fastmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-27 17:44:18 -08:00
Guenter Roeck d349626b42 hwmon: (abx500) Decomission abx500 driver
This deletes the ABx500 hwmon driver, the only supported
variant being the AB8500.

This driver has been replaced by generic frameworks. By
inspecting the abx500 sysfs files we see that it contains
things such as temp1_max, temp1_max_alarm, temp1_max_hyst,
temp1_max_hyst_alarm, temp1_min, temp1_min_alarm.

It becomes obvious that the abx500.c is a reimplementation
of thermal zones. This is not very strange as the generic
thermal zones were not invented when this driver was merged
so people were rolling their own.

The ab8500.c driver contains conversion tables for handling
a thermistor on ADC channels AUX1 and AUX2.

I managed to replace the functionality of the driver with:

- Activation of the ntc_thermistor.c driver,
  CONFIG_SENSORS_NTC_THERMISTOR
- Activation of thermal zones, CONFIG_THERMAL
- In the device tree, connecting the NTC driver to the
  processed IIO channels from the AB8500 GPADC ADC forming
  two instances of NTC sensors.
- Connecting the two NTC sensors to a "chassis" thermal zone
  in the device tree and setting that to hit the CPU frequency
  at 50 degrees celsius and do a critical shutdown at 70
  degrees celsius, deploying a policy using the sensors.

After talking to the original authors we concluded that the
driver was never properly parameterized in production so
what we now have in the device tree is already puts the
thermistors to better use than what the hwmon driver did.

The two remaining channels for two battery temperatures is
already handled in the charging algorithms but can be
optionally extended to thermal zones as well if we want
these to trigger critical shutdown for the platform.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201221125521.768082-1-linus.walleij@linaro.org
[groeck: Removed documentation and fixed up Makefile, Kconfig]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-27 17:44:18 -08:00
Mauro Carvalho Chehab f6aed68e8a hwmon: (ina2) update ti,ina2xx.yaml reference in documentation
Changeset 94f1ab9445 ("dt-bindings: hwmon: convert TI INA2xx bindings to dt-schema")
renamed: Documentation/devicetree/bindings/hwmon/ina2xx.txt
to: Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml.

Update its cross-reference accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/886bd248721b146d844d46e26ddd4cd277f51446.1610535350.git.mchehab+huawei@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-21 11:27:23 -08:00
Randy Dunlap e042f151ec hwmon: (sbtsi_temp) Fix Documenation kernel-doc warning
Fix Documentation/hwmon/ kernel-doc warning in 5.11-rc1:

lnx-511-rc1/Documentation/hwmon/sbtsi_temp.rst:4: WARNING: Title underline too short.

Kernel driver sbtsi_temp
==================

Fixes: 6ec3fcf556 ("hwmon: (sbtsi) Add documentation")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Kun Yi <kunyi@google.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: linux-hwmon@vger.kernel.org
Link: https://lore.kernel.org/r/20201229035428.31270-1-rdunlap@infradead.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-30 08:05:20 -08:00
Kun Yi 6ec3fcf556 hwmon: (sbtsi) Add documentation
Document the SB-TSI sensor interface driver.

Signed-off-by: Kun Yi <kunyi@google.com>
Link: https://lore.kernel.org/r/20201211215427.3281681-3-kunyi@google.com
[groeck: Added SPDX license identifier, same as source]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-12 08:34:29 -08:00
Krzysztof Kozlowski 15d4a6f736 dt-bindings: hwmon: convert AD ADM1275 bindings to dt-schema
Convert the Analog Devices ADM1275 bindings to dt-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201117220807.208747-4-krzk@kernel.org
[groeck: Removed unnecessary type ($ref) declaration]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-11 07:42:27 -08:00
Lukas Bulwahn 966ead9153 hwmon: (pmbus/q54sj108a2) Correct title underline length
Commit b722d7b9e4da ("hwmon: (pmbus) Driver for Delta power supplies
Q54SJ108A2") provides new documentation for DELTA Q54SJ108A2NC* drivers,
but the title underline was too short.

make htmldocs warns:

  Documentation/hwmon/q54sj108a2.rst:4: WARNING: Title underline too short.

Adjust the title underline to the correct length.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/r/20201207152658.32444-1-lukas.bulwahn@gmail.com
[groeck: Adjust subject]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-11 07:42:27 -08:00
Alexandru Tachici b0bd407e94 hwmon: (ltc2992) Add support
LTC2992 is a rail-to-rail system monitor that
measures current, voltage, and power of two supplies.

Two ADCs simultaneously measure each supply’s current.
A third ADC monitors the input voltages and four
auxiliary external voltages.

Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-11 07:42:27 -08:00
xiao.ma d014538aa3 hwmon: (pmbus) Driver for Delta power supplies Q54SJ108A2
The driver supports Q54SJ108A2 series modules of Delta.
Standard attributes are in sysfs, and other attributes are in debugfs.

Signed-off-by: xiao.ma <xiao.mx.ma@deltaww.com>
Link: https://lore.kernel.org/r/20201202025900.1842-1-max701@126.com
[groeck: Replaced spaces with tabs, dropped excessive spaces,
 fixed module prefix in documentation]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-11 07:41:20 -08:00
Charles 7537862a90 hwmon: Add driver for STMicroelectronics PM6764 Voltage Regulator
Add the pmbus driver for the STMicroelectronics pm6764 voltage regulator.

the output voltage use the MFR_READ_VOUT 0xD4
vout value returned is linear11

Signed-off-by: Charles Hsu <hsu.yungteng@gmail.com>
[groeck: Fixed various compile errors; marked pm6764tr_of_match __maybe_unused]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-07 07:59:37 -08:00
David Bartley daf4fedde6 hwmon: (nct6683) Support NCT6687D.
This is found on many MSI motherboards.

Signed-off-by: David Bartley <andareed@gmail.com>
Link: https://lore.kernel.org/r/20201202025057.5492-1-andareed@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-02 17:42:24 -08:00
Tao Ren 12d36c8362 docs: hwmon: Document max127 driver
Add documentation for the max127 hardware monitoring driver.

Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20201123185658.7632-3-rentao.bupt@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-02 17:42:24 -08:00
Naveen Krishna Chatradhi 0c8bed2604 docs: hwmon: (amd_energy) update documentation
Update the supported processors and mention vulnerability fix.

Signed-off-by: Naveen Krishna Chatradhi <NaveenKrishna.Chatradhi@amd.com>
Link: https://lore.kernel.org/r/20201119184246.228322-2-NaveenKrishna.Chatradhi@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-02 17:42:23 -08:00
Wilken Gottwalt d115b51e0e hwmon: add Corsair PSU HID controller driver
The Corsair digital power supplies of the series RMi, HXi and AXi include
a small micro-controller with a lot of sensors attached. The sensors can
be accessed by an USB connector from the outside.

This micro-controller provides the data by a simple proprietary USB HID
protocol. The data consist of temperatures, current and voltage levels,
power usage, uptimes, fan speed and some more. It is also possible to
configure the PSU (fan mode, mono/multi-rail, over current protection).

This driver provides access to the sensors/statistics of the RMi and HXi
series power supplies. It does not support configuring these devices,
because there would be many ways to misconfigure or even damage the PSU.

This patch adds:
- hwmon driver corsair-psu
- hwmon documentation
- updates MAINTAINERS

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/20201027131710.GA253280@monster.powergraphx.local
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-02 17:42:23 -08:00
Bartosz Golaszewski 3bce071a30 hwmon: (pmbus) shrink code and remove pmbus_do_remove()
The only action currently performed in pmbus_do_remove() is removing the
debugfs hierarchy. We can schedule a devm action at probe time and remove
pmbus_do_remove() entirely from all pmbus drivers.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20201026105352.20359-1-brgl@bgdev.pl
[groeck: Removed references to pmbus_do_remove from documentation]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-02 17:42:23 -08:00
Mauro Carvalho Chehab 9d8c4f0c01 docs: hwmon: mp2975.rst: address some html build warnings
.../Documentation/hwmon/mp2975.rst:25: WARNING: Unexpected indentation.
    .../Documentation/hwmon/mp2975.rst:27: WARNING: Block quote ends without a blank line; unexpected unindent.
    .../Documentation/hwmon/mp2975.rst:69: WARNING: Unexpected indentation.
    .../Documentation/hwmon/mp2975.rst:70: WARNING: Block quote ends without a blank line; unexpected unindent.
    .../Documentation/hwmon/mp2975.rst:72: WARNING: Bullet list ends without a blank line; unexpected unindent.
    .../Documentation/hwmon/mp2975.rst: WARNING: document isn't included in any toctree

List blocks should have blank lines before and after them,
in order to be properly parsed.

Fixes: 4beb7a028e9f ("hwmon: (pmbus) Add support for MPS Multi-phase mp2975 controller")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/b02f98d886ab1f5af233f8999c7a15529fc52cdc.1603791716.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-10-28 11:26:10 -06:00
Mauro Carvalho Chehab 6cc6f5ad9b docs: hwmon: adm1266.rst: fix a broken reference
The reference was missing the extension, causing the
check script to complain.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/3d64372dabcdcea144cdc9972c245812ea2a84cb.1603791716.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-10-28 11:26:10 -06:00
Linus Torvalds 1a31c12371 - New Drivers
- Add support for initialising shared (between children) Regmaps
    - Add support for Kontron SL28CPLD
    - Add support for ENE KB3930 Embedded Controller
    - Add support for Intel FPGA PAC MAX 10 BMC
 
  - New Device Support
    - Add support for Power to Ricoh RN5T618
    - Add support for UART to Intel Lakefield
    - Add support for LP87524_Q1 to Texas Instruments LP87565
 
  - New Functionality
    - Device Tree; ene-kb3930, sl28cpld, syscon, lp87565, lp87524-q1
    - Use new helper dev_err_probe(); madera-core, stmfx, wcd934x
    - Use new GPIOD API; dm355evm_msp
    - Add wake-up capability; sprd-sc27xx-spi
    - Add ACPI support; kempld-core
 
  - Fix-ups
    - Trivial (spelling/whitespace); Kconfig, ab8500
    - Fix for unused variables; khadas-mcu, kempld-core
    - Remove unused header file(s); mt6360-core
    - Use correct IRQ flags in docs; act8945a, gateworks-gsc, rohm,bd70528-pmic
    - Add COMPILE_TEST support; asic3, tmio_core
    - Add dependency on I2C; SL28CPLD
 
  - Bug Fixes
    - Fix memory leak(s); sm501
    - Do not free regmap_config's 'name' until exit; syscon
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAl+GrSsACgkQUa+KL4f8
 d2FQ/w//TRSwPbXdUl+rYaDVQ9YwEk5Zi2U8EYBP8OGsKLjXs9GFkiuyQ5GwsoAd
 oD5N4Fh/QGxmdWafKXB96e/D+n4uFOOIWGCmNsE5NmvnWbjk1Jss4K4qV4IbUEW/
 KWxUCKPhaNcs7Vj9nfN5jItCPBaG6bQJ3qgFwZHSMhe/Su4izUYlLCfhhVAFkq1k
 oF2TgJCllqPl7ZY+VxDPD5ZWIBhV+NZoFVRFQ7Kvw1elmE+///nrfuii261G+iBm
 kHi3PtcRMDW0+Uo8B9I9xtLVUrfBMtm9ThOrn8JYLOaJ7RzWwwF6WayAKsNbDuDB
 CiYKHDZWS72IxfW3KfHk1AvbsUMJQX1kmDJ6lAhXHa3E55nGbX+U2FwgMnczJUuM
 7BzfD9pXp3nnfTQ6ZJtr1vGPLz3Nk7hcRlg9r+6TObIjzB+KNW/hyCYur7sX1Mbb
 wn3EZo5WhKnlcqrGhh3H0/kJDbHTIFDfNt80+bjLfIeKCQj1x6cByPWC7N6Ln4GC
 BDky88fb/Y9Q5bnvyEQDR16+QMpG3ko5lIUwt9Gtbhtt3/zjxzElxRlsq6u9scrp
 vZnnjqxSQ/9cvnwOsGMG+E8uVjZ+5lQu6Qi+0w20M4MX28hXLPQbpjAK/3uqH7Kz
 NLwiZe4dzRtVbAQ83ozGArTgvH9YZ5VOw/ieqk0aRf6mIExrENk=
 =1wSH
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Drivers:
   - Add support for initialising shared (between children) Regmaps
   - Add support for Kontron SL28CPLD
   - Add support for ENE KB3930 Embedded Controller
   - Add support for Intel FPGA PAC MAX 10 BMC

  New Device Support:
   - Add support for Power to Ricoh RN5T618
   - Add support for UART to Intel Lakefield
   - Add support for LP87524_Q1 to Texas Instruments LP87565

  New Functionality:
   - Device Tree; ene-kb3930, sl28cpld, syscon, lp87565, lp87524-q1
   - Use new helper dev_err_probe(); madera-core, stmfx, wcd934x
   - Use new GPIOD API; dm355evm_msp
   - Add wake-up capability; sprd-sc27xx-spi
   - Add ACPI support; kempld-core

  Fix-ups:
   - Trivial (spelling/whitespace); Kconfig, ab8500
   - Fix for unused variables; khadas-mcu, kempld-core
   - Remove unused header file(s); mt6360-core
   - Use correct IRQ flags in docs; act8945a, gateworks-gsc, rohm,bd70528-pmic
   - Add COMPILE_TEST support; asic3, tmio_core
   - Add dependency on I2C; SL28CPLD

  Bug Fixes:
   - Fix memory leak(s); sm501
   - Do not free regmap_config's 'name' until exit; syscon"

* tag 'mfd-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (34 commits)
  mfd: kempld-core: Fix unused variable 'kempld_acpi_table' when !ACPI
  mfd: sl28cpld: Depend on I2C
  mfd: asic3: Build if COMPILE_TEST=y
  dt-bindings: mfd: Correct interrupt flags in examples
  mfd: Add ACPI support to Kontron PLD driver
  mfd: intel-m10-bmc: Add Intel MAX 10 BMC chip support for Intel FPGA PAC
  mfd: lp87565: Add LP87524-Q1 variant
  dt-bindings: mfd: Add LP87524-Q1
  dt-bindings: mfd: lp87565: Convert to yaml
  mfd: mt6360: Remove unused include <linux/version.h>
  mfd: sm501: Fix leaks in probe()
  mfd: syscon: Don't free allocated name for regmap_config
  dt-bindings: mfd: syscon: Document Exynos3 and Exynos5433 compatibles
  dt-bindings: mfd: syscon: Merge Samsung Exynos Sysreg bindings
  dt-bindings: mfd: ab8500: Remove weird Unicode characters
  mfd: sprd: Add wakeup capability for PMIC IRQ
  mfd: intel-lpss: Add device IDs for UART ports for Lakefield
  mfd: dm355evm_msp: Convert LEDs to GPIO descriptor table
  mfd: wcd934x: Simplify with dev_err_probe()
  mfd: stmfx: Simplify with dev_err_probe()
  ...
2020-10-14 15:56:58 -07:00
Linus Torvalds c4439713e8 hwmon changes for v5.10-rc1
New driver and chip support:
 - Moortec MR75203 PVT controller
 - MPS Multi-phase mp2975 controller
 - ADM1266
 - Zen3 CPUs
 - Intel MAX 10 BMC
 
 Enhancements:
 - Support for rated attributes in hwmon core
 - MAX20730
   - Device monitoring via debugfs
   - VOUT readin adjustment vie devicetree bindings
 - LM75
   - Devicetree support
   - Regulator support
 - Improved accumulationm logic in amd_energy driver
 - Added fan sensor to gsc-hwmon driver
 - Support for simplified I2C probing
 
 Various other minor fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAl+DpLQACgkQyx8mb86f
 mYF+BQ/+NxQsQkSInPakiTq9u1rK9icxjJghn7QmVbFTym3Bzf14bvi88OUu49Cj
 10VxbwNQPGDzqWPW3cLOaATclTzAfV3Px35QM/ZiURx4WuEje8XLT/kqh9DtB4il
 OhF4q3oXiS5sk4aL6nfNAxsHAiYXpeKj0E5RV1c9chR6tUY9muMcE/DAgUOaIrrX
 G6b9o5wXX5nqwcfaoJC0T0jd6mJ3ZCBWqzoIzFoMtAzejN5XOZiQH3sSmW4ZTuVz
 GEscC7nqzabtT9R3d5NONyehi9zSJC2+1HByzmQB1/vHoV/1aUV0hq7dyEodGXEl
 W5rxIrP1KMe/vKOTg252mbQ+0aXYh0KRy5zywr8rY6G568P1bemZ7K6rH5GHm/Z9
 uGXkvhSo2TL0npAhaYvfD+/SFOgzwL5ue9bLByCzUaFClM5o4xmbRf0tKkr/5mRr
 LI1GXVMw4Ty++LpaJ6c4Qv+7XizfBIRZ/mJ4QWLpVE+R/Oj0shMrEDQgtLFyukbE
 UILkSBtADlY27RNw8K/YEr4/Q33TCLqZWMtqsKhHhOOLMTqtFyzRDx6dTainVUVA
 n4KSWDag9jtUy7WbwVuhaTd0ByOz3DVxJELb+ALjBelnwY56H7QUuXZm6uAQRrnE
 C7JZ2Ya6KUOwj1xtFan/0pemkHoqv58R4PjpQq/skajCquKk0Ow=
 =kwzT
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 "New driver and chip support:
   - Moortec MR75203 PVT controller
   - MPS Multi-phase mp2975 controller
   - ADM1266
   - Zen3 CPUs
   - Intel MAX 10 BMC

  Enhancements:
   - Support for rated attributes in hwmon core
   - MAX20730:
      - Device monitoring via debugfs
      - VOUT readin adjustment vie devicetree bindings
   - LM75:
      - Devicetree support
      - Regulator support
   - Improved accumulationm logic in amd_energy driver
   - Added fan sensor to gsc-hwmon driver
   - Support for simplified I2C probing

  Various other minor fixes and improvements"

* tag 'hwmon-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (64 commits)
  hwmon: (pmbus/max20730) adjust the vout reading given voltage divider
  dt-bindings: hwmon: max20730: adding device tree doc for max20730
  hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller
  hwmon: Add DT bindings schema for PVT controller
  dt-bindings: hwmon: Add the +vs supply to the lm75 bindings
  dt-bindings: hwmon: Convert lm75 bindings to yaml
  docs: hwmon: (ltc2945) update datasheet link
  hwmon: (mlxreg-fan) Fix double "Mellanox"
  hwmon: (pmbus/max20730) add device monitoring via debugfs
  hwmon: (pmbus/max34440) Fix OC fault limits
  hwmon: (bt1-pvt) Wait for the completion with timeout
  hwmon: (bt1-pvt) Cache current update timeout
  hwmon: (bt1-pvt) Test sensor power supply on probe
  hwmon: (lm75) Add regulator support
  hwmon: Add hwmon driver for Intel MAX 10 BMC
  dt-bindings: Add MP2975 voltage regulator device
  hwmon: (pmbus) Add support for MPS Multi-phase mp2975 controller
  hwmon: (tmp513) fix spelling typo in comments
  hwmon: (amd_energy) Update driver documentation
  hwmon: (amd_energy) Improve the accumulation logic
  ...
2020-10-13 10:15:31 -07:00
Alexandru Ardelean f6a496a5ce docs: hwmon: (ltc2945) update datasheet link
Old one isn't working anymore. Update to the latest datasheet link.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201005131226.1774081-1-alexandru.ardelean@analog.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-10-05 09:16:33 -07:00
Xu Yilun 865e4fc013 hwmon: Add hwmon driver for Intel MAX 10 BMC
This patch adds hwmon functionality for Intel MAX 10 BMC chip. This BMC
chip connects to a set of sensor chips to monitor current, voltage,
thermal and power of different components on board. The BMC firmware is
responsible for sensor data sampling and recording in shared registers.
Host driver reads the sensor data from these shared registers and
exposes them to users as hwmon interfaces.

Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Wu Hao <hao.wu@intel.com>
Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/1600669071-26235-3-git-send-email-yilun.xu@intel.com
[groeck: Adjusted subject]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-10-04 08:40:10 -07:00
Vadim Pasternak 2c6fcbb211 hwmon: (pmbus) Add support for MPS Multi-phase mp2975 controller
Add support for mp295 device from Monolithic Power Systems, Inc. (MPS)
vendor. This is a dual-loop, digital, multi-phase controller.
This device:
- Supports two power rail.
- Provides 8 pulse-width modulations (PWMs), and can be configured up
  to 8-phase operation for rail 1 and up to 4-phase operation for rail
  2.
- Supports two pages 0 and 1 for telemetry and also pages 2 and 3 for
  configuration.
- Can configured VOUT readout in direct or VID format and allows
  setting of different formats on rails 1 and 2. For VID the following
  protocols are available: VR13 mode with 5-mV DAC; VR13 mode with
  10-mV DAC, IMVP9 mode with 5-mV DAC.

Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20200926204957.10268-2-vadimp@nvidia.com
[groeck: Cleaned up a couple of error returns; fixed up API changes]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-10-04 08:40:10 -07:00
Naveen Krishna Chatradhi 045ad73397 hwmon: (amd_energy) Update driver documentation
Update the documentation with the newly added features
* Set the accumulation interval based on resolution

Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Link: https://lore.kernel.org/r/20200929105322.8919-5-nchatrad@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-10-04 08:40:10 -07:00
Alexandru Tachici 9514a22866 hwmon: (pmbus) Add support for ADM1266
Add pmbus probing driver for the adm1266 Cascadable
Super Sequencer with Margin Control and Fault Recording.
Driver is using the pmbus_core, creating sysfs files
under hwmon for inputs: vh1->vh4 and vp1->vp13.

Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Link: https://lore.kernel.org/r/20200812142055.9213-2-alexandru.tachici@analog.com
[groeck: Use .probe_new function, adjust for changed pmbus_do_probe API]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-09-23 09:42:40 -07:00
Stephen Kitt dd43193976 hwmon (pmbus) use simple i2c probe function
pmbus_do_probe doesn't use the id information provided in its second
argument, so this can be removed, which then allows using the
single-parameter i2c probe function ("probe_new") for probes.

This avoids scanning the identifier tables during probes.

Drivers which didn't use the id are converted as-is; drivers which did
are modified as follows:

* if the information in i2c_client is sufficient, that's used instead
  (client->name);
* configured v. probed comparisons are performed by comparing the
  configured name to the detected name, instead of the ids; this
  involves strcmp but is still cheaper than comparing all the device
  names when scanning the tables;
* anything else is handled by calling i2c_match_id() with the same
  level of error-handling (if any) as before.

Additionally, the mismatch message in the ltc2978 driver is adjusted
so that it no longer assumes that the driver_data is an index into
ltc2978_id.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Acked-by: Wolfram Sang <wsa@kernel.org>
Link: https://lore.kernel.org/r/20200808210004.30880-1-steve@sk2.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-09-23 09:42:39 -07:00
Guenter Roeck e403583909 hwmon: (drivetemp) Add usage not describing impact on drive spin-down
On some drives, reading the drive temperature resets the drive's
spin-down timer. If the drive temperature is read too often, affected
drives will never spin down. Add this information as usage note to
the driver documentation.

Reported-by: Peter Sulyok <peter@sulyok.net>
Cc: Peter Sulyok <peter@sulyok.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-09-23 09:42:39 -07:00
Zbigniew Lukwinski 787c095eda hwmon: (pmbus/core) Add support for rated attributes
Adding implementation for new attributes (rated_min/rated_max) to
cover PMBus specification about rated values reporting:
MFR_VIN_MIN, MFR_VIN_MAX, MFR_IIN_MAX, MFR_PIN_MAX, MFR_VOUT_MIN,
MFR_VOUT_MAX, MFR_IOUT_MAX, MFR_POUT_MAX, MFR_MAX_TEMP_1/2/3.

Tested with OpenBMC stack. All rated attributes were available
and reported correct values.

Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
Link: https://lore.kernel.org/r/1596224237-32280-4-git-send-email-zbigniew.lukwinski@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-09-23 09:42:39 -07:00
Zbigniew Lukwinski e8e612350f docs: hwmon: Add attributes to report rated values
New attributes (rated_min/rated_max) are being added the hwmon ABI.
They are needed to cover rated values documented by PMBus
specification:
PMBus Power System Mgt Protocol Specification - Part II – Revision 1.3.1,
chapters: 22.3.1 - 22.3.10, 22.3.15

Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
Link: https://lore.kernel.org/r/1596224237-32280-2-git-send-email-zbigniew.lukwinski@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-09-23 09:42:39 -07:00
Michael Walle 3f697027bc hwmon: Add support for the sl28cpld hardware monitoring controller
Add support for the hardware monitoring controller of the sl28cpld board
management controller. This driver is part of a multi-function device.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-09-17 16:02:42 +01:00
Mauro Carvalho Chehab 4d05e3a0f5 docs: add some new files to their respective index.rst files
There were some new file additions for Kernel 5.7 and 5.8
that weren't added at the corresponding index file.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/9fd4d04f0d122ff38b5342a0098d99cc2f546652.1599660067.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-09-10 10:48:20 -06:00
Brandon Jiang 4776b9e332 Documentation: fix typo for abituguru documentation
Typo fix for abituguru,abituguru3 and abituguru-datasheet

Signed-off-by: Brandon Jiang <brandon.jiang.a@outlook.com>
Link: https://lore.kernel.org/r/DM5PR22MB0892E4FEFCA9ED055B0A8E71AC580@DM5PR22MB0892.namprd22.prod.outlook.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-08-24 17:19:07 -06:00
Linus Torvalds 9aebd3254c hwmon updates for v5.9
Highlights:
 - New driver for Sparx5 SoC temperature sensot
 - New driver for Corsair Commander Pro
 - MAX20710 support added to max20730 driver
 
 Enhancements:
 - max6697: Allow max6581 to create tempX_offset attributes
 - gsc (Gateworks System Controller): add 16bit pre-scaled voltage mode
 - adm1275: Enable adm1278 ADM1278_TEMP1_EN
 - dell-smm: Add Latitude 5480 to fan control whitelist
 
 Fixes:
 - adc128d818: Fix advanced configuration register init
 - pmbus/core: Use s64 instead of long for calculations
               to fix overflow issues with 32-bit architectures
 
 Plus various cleanups in several drivers.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAl8p1d8ACgkQyx8mb86f
 mYGECw//RIhcVCvmSgnhRnAhN0EOJrl/QzFkukdl5MGnJIWQyW/od/Hjjg0A31VS
 GdrUGilP0vDwzy7QD9N1CgGaYM42yP0OlhlfcvRoYXGJsPhCcWMGT2EnNsbuCpYj
 O1CR/fjgYSrNmU1TvUKVLTnaCikckP3NGlbJVXViPd4LyP8kgSp2ZTqNGOOw5ByT
 tAryzG2TDg/0V1aB/jniTPsZtp3Ezw4I0+DtGfXNKLw6LBZaMPVoLuDqLAv3KgUa
 m2sZ1CG1gzvflLznDtb03g9xakwdq1Nj0xx0+t3tJtztte2FG3AsXlA3feAXZAL8
 cH83xXUKFhb40n90RhGt6DWwKbvygtTuCe+6EaixYhesHvU8sC36FMBxCp7dSPUb
 0ppJx0cmQB/3EMOsSzl7+dhwos/9yGkkGKJi1bPv0zYHq4BxtTYcV2vkx7q+DKHA
 86e/IQNdoLqPOiGD+oFHAZzyJy7GEcVT054I7wuGrkHXlsm4aJIxOYOxFgRmcrjl
 /RGGdPypMWxNE3NwoNOOHFBiKVi8Bh26JpncLaNmY96fHEhsUtfNICFxIVFgaZCt
 sOa+pZjPbQtR3UAMnB3ZZfvzBELzAgY/FMm6fdVfrpIukK3dss3CIlNbZVm4P+0a
 CmOdA4a8EMQPDOFcFxeyv+0/PhIdf/tAZBtRDkT7E1oeaqfb18Q=
 =nMNN
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 "Highlights:
   - New driver for Sparx5 SoC temperature sensot
   - New driver for Corsair Commander Pro
   - MAX20710 support added to max20730 driver

  Enhancements:
   - max6697: Allow max6581 to create tempX_offset attributes
   - gsc (Gateworks System Controller): add 16bit pre-scaled voltage mode
   - adm1275: Enable adm1278 ADM1278_TEMP1_EN
   - dell-smm: Add Latitude 5480 to fan control whitelist

  Fixes:
   - adc128d818: Fix advanced configuration register init
   - pmbus/core: Use s64 instead of long for calculations to fix
     overflow issues with 32-bit architectures

  Plus various cleanups in several drivers"

* tag 'hwmon-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (32 commits)
  hwmon: (adc128d818) Fix advanced configuration register init
  hwmon: (axi-fan-control) remove duplicate macros
  hwmon: (i5k_amb, vt8231) Drop uses of pci_read_config_*() return value
  hwmon: (sparx5) Make symbol 's5_temp_match' static
  hwmon: (corsair-cpro) add reading pwm values
  hwmon: sparx5: Add Sparx5 SoC temperature driver
  dt-bindings: hwmon: Add Sparx5 temperature sensor
  hwmon: (tmp401) Replace HTTP links with HTTPS ones
  hwmon: (lm95234) Replace HTTP links with HTTPS ones
  hwmon: (lm90) Replace HTTP links with HTTPS ones
  hwmon: (k8temp) Replace HTTP links with HTTPS ones
  hwmon: (jc42) Replace HTTP links with HTTPS ones
  hwmon: (ina2xx) Replace HTTP links with HTTPS ones
  hwmon: (ina209) Replace HTTP links with HTTPS ones
  hwmon: Replace HTTP links with HTTPS ones
  docs: hwmon: Replace HTTP links with HTTPS ones
  hwmon: (adm1025) Replace HTTP links with HTTPS ones
  hwmon: add Corsair Commander Pro driver
  hwmon: (max6697) Allow max6581 to create tempX_offset
  hwmon: (tmmp513) Replace HTTP links with HTTPS links
  ...
2020-08-05 13:13:57 -07:00
Tiezhu Yang 0585c1c06a ACPI: Use valid link to the ACPI specification
Currently, acpi.info is an invalid link to access ACPI specification,
the new valid link is https://uefi.org/specifications.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-07-27 14:11:22 +02:00
Marius Zachmann fa4dac3e1b hwmon: (corsair-cpro) add reading pwm values
This adds the possibility for reading pwm values.
These can not be read if the device is controlled via
fan_target or a fan curve and will return an error in
this case. Since an error is expected, this adds some
rudimentary error handling.

Changes:
- add CTL_GET_FAN_PWM and use it via get_data
- pwm returns -ENODATA if the device returns error 0x12
- fan_target now returns -ENODATA when the driver is
  started or a pwm value is set.
- add ccp_get_errno to determine errno from device error.
- get_data now has a parameter to determine whether
  to read one or two bytes of data.
- update documentation
- fix missing surname in MAINTAINERS

Signed-off-by: Marius Zachmann <mail@mariuszachmann.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Lars Povlsen e4922176e1 hwmon: sparx5: Add Sparx5 SoC temperature driver
This patch adds a temperature sensor driver to the Sparx5 SoC.

Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200618135951.25441-4-lars.povlsen@microchip.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Alexander A. Klimov e53ee186b3 hwmon: (tmp401) Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200719192544.61247-1-grandmaster@al2klimov.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Alexander A. Klimov fdf4164503 hwmon: (lm95234) Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200719191534.61181-1-grandmaster@al2klimov.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Alexander A. Klimov 6c7b66bed0 hwmon: (lm90) Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200719190525.61112-1-grandmaster@al2klimov.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Alexander A. Klimov f475356037 hwmon: (k8temp) Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200719183548.61011-1-grandmaster@al2klimov.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Alexander A. Klimov d38b7e4a87 hwmon: (jc42) Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200719182539.60944-1-grandmaster@al2klimov.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Alexander A. Klimov 49dc2fb0e0 hwmon: (ina2xx) Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200719181530.60878-1-grandmaster@al2klimov.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Alexander A. Klimov 009f429f6b hwmon: (ina209) Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200719180521.60811-1-grandmaster@al2klimov.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Alexander A. Klimov ad736c1a4d hwmon: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200719175512.60745-1-grandmaster@al2klimov.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Alexander A. Klimov f12d634f90 docs: hwmon: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200719170420.60399-1-grandmaster@al2klimov.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Marius Zachmann 40c3a44542 hwmon: add Corsair Commander Pro driver
This is v7 of a driver for the Corsair Commander Pro.
It provides sysfs attributes for:
- Reading fan speed
- Reading temp sensors
- Reading voltage values
- Writing pwm and reading last written pwm
- Reading fan and temp connection status

It is an usb driver, so it needs to be ignored by usbhid.
The Corsair Commander Pro is a fan controller and provides
no means for user interaction.
The two device numbers are there, because there is a slightly
different version of the same device. (Only difference
seem to be in some presets.)

Squashed:
 hwmon: (corsair-cpro) add fan_target

 This adds fan_target entries to the corsair-cpro driver.
 Reading the attribute from the device does not seem possible, so
 it returns the last set value (same as pwm).

 send_usb_cmd now has one more argument, which is needed for the
 fan_target command.

 hwmon: corsair-cpro: Change to HID driver

 This changes corsair-cpro to a hid driver using hid reports.

Signed-off-by: Marius Zachmann <mail@mariuszachmann.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200626055936.4441-1-mail@mariuszachmann.de
Link: https://lore.kernel.org/r/20200709141413.30790-1-mail@mariuszachmann.de
[groeck: Squashed follow-up patches to avoid changes in HID code]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00
Alexander A. Klimov e263f2d3c2 hwmon: (tmmp513) Replace HTTP links with HTTPS links
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
          If both the HTTP and HTTPS versions
          return 200 OK and serve the same content:
            Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200703185657.15329-1-grandmaster@al2klimov.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-07-24 07:44:57 -07:00