summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/nsa320-hwmon.c
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: (nsa320-hwmon) Remove redundant of_match_ptr()Ruan Jinjie2023-08-211-1/+1
| | | | | | | | | The driver depends on CONFIG_OF, it is not necessary to use of_match_ptr() here. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230810062635.1947552-1-ruanjinjie@huawei.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: Explicitly include correct DT includesRob Herring2023-08-211-2/+0
| | | | | | | | | | | | | | | The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230714174607.4057185-1-robh@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 408Thomas Gleixner2019-06-051-9/+1
| | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license v2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 1 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531190112.493982682@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* hwmon: (nsa320-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck2019-02-181-4/+4
| | | | | | | | | | | | | | | | Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (nsa320) use permission-specific DEVICE_ATTR variantsJulia Lawall2017-01-021-6/+6
| | | | | | | | | | | | | Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> [groeck: Updated description] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: Create an NSA320 hardware monitoring driverAdam Baker2016-03-081-0/+215
Create a driver to support the hardware monitoring chip present in the Zyxel NSA320 and some of the other Zyxel NAS devices. The driver reads fan speed and temperature from a suitably pre-programmed MCU on the device. Signed-off-by: Adam Baker <linux@baker-net.org.uk> [groeck: Dropped .owner field initialization] Signed-off-by: Guenter Roeck <linux@roeck-us.net>