summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/it87.c
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: (it87) Generalise support for FAN_CTL ON/OFFFrank Crawford2023-06-081-26/+37
| | | | | | | | | | | | | | Support for FAN_CTL ON/OFF is currently disabled only for IT8603E but there are severl chips that don't support the configuration bits to turn off fan control entirely. Generalise this support for any chip. Add feature flag FEAT_FANCTL_ONOFF for chips that support configuration bits for management of fan control off and assign all chips that support the configuration. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230527094756.3464256-1-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Allow for chips with only 4 temp sensorsFrank Crawford2023-06-081-2/+6
| | | | | | | | | | Some chips are known to only have 4 temperature sensors and there is no requirement to test for more. Currently only the IT8622E fits this category. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230430045032.1723288-1-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Update IT8732F chip for 4 fans and PWMsFrank Crawford2023-06-081-1/+30
| | | | | | | | Add support for 4 fans and 4 PWMs to chipset IT8732F. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230429115205.1547251-4-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add controls for chips with only 4 PWMsFrank Crawford2023-06-081-3/+9
| | | | | | | | Add feature and support for chips with only 4 PWMs. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230429115205.1547251-3-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add controls for chips with only 4 fansFrank Crawford2023-06-081-11/+13
| | | | | | | | | | Add feature and support for chips with only 4 fans. Reorder macro definitions to bring all fan definitions together. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230429115205.1547251-2-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Disable/enable SMBus access for IT8622E chipsetFrank Crawford2023-04-211-0/+1
| | | | | | | | Configure the IT8622E chip to disable/re-enable access via an SMBus when reading or writing the chip's registers. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add calls to smbus_enable/smbus_disable as requiredFrank Crawford2023-04-211-46/+135
| | | | | | | | | | | | Disable/re-enable access through SMBus for chip registers when they are are being read or written. For simple cases this is done at the same time as when a mutex is set, however, within loops or during initialisation it is done separately. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> [groeck: Fixed multi-line alignment] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Test for error in it87_update_deviceFrank Crawford2023-04-211-2/+52
| | | | | | | | | Handle errors from it87_update_device(), which currently only occurs if SMBus access locking fails. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> [groeck: Fixed handling in show_temp_type()] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Disable SMBus access for environmental controller registers.Frank Crawford2023-04-191-2/+56
| | | | | | | | Add functions to disable and re-enable access by the SMBus for specific chips. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Use voltage scaling macro where appropriateFrank Crawford2023-04-191-1/+1
| | | | | | | | Apply scaling macro to match the labels for internal voltage sensors. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230318080543.1226700-3-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCsFrank Crawford2023-03-211-1/+3
| | | | | | | | | | | Fix voltage scaling for chips that have 10.9mV ADCs, where scaling was not performed. Fixes: ead8080351c9 ("hwmon: (it87) Add support for IT8732F") Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230318080543.1226700-2-frank@crawford.emu.id.au [groeck: Update subject and description to focus on bug fix] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add new chipset IT87952EFrank Crawford2023-02-031-1/+15
| | | | | | | | | | | | | Add IT87952E, a new chip ID (DEV ID 0x8695), which appears to be an updated version of the IT8792E and takes the same configuration. The model name comes from the model name printed on the chip. There is no datasheet publicly available. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230128060308.1549707-7-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Allow multiple chip IDs for force_idFrank Crawford2023-02-031-8/+13
| | | | | | | | | | Extend the force_id module parameter to allow specifying one or both chip IDs separately. If only a single parameter is given it defaults to using that value for all chips, similar to previous usage. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230128060308.1549707-6-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add chip_id in some info messageFrank Crawford2023-02-031-2/+4
| | | | | | | | | In cases where there are multiple chips, print out which chip is referred to, in the informational message. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230128060308.1549707-5-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) List full chip model nameFrank Crawford2023-02-031-23/+23
| | | | | | | | | | ITE model names do not always match the chip ID. Convert from just adding a suffix to specifying the full model name. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230128060308.1549707-4-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Disable configuration exit for certain chipsFrank Crawford2023-02-031-2/+2
| | | | | | | | | | | IT8790E and IT8792E/IT8795E have been identified as chips that can have issues when disabling configuration mode. Set to never exit configuration mode. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230128060308.1549707-3-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Allow disabling exiting of configuration modeFrank Crawford2023-02-031-8/+18
| | | | | | | | | | | | | | | Disabling configuration mode on some chips can result in system hang-ups and access failures to the Super-IO chip at the second SIO address. Never exit configuration mode on these chips to avoid the problem. This patch should be applied in conjunction with a previous one to initialise the second chip for certain mother boards. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230128060308.1549707-2-frank@crawford.emu.id.au [groeck: Change feature bit from 28 to 19 to be continuous] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Group all related MODULE_PARM definitions togetherFrank Crawford2023-02-031-8/+15
| | | | | | | | | Group the MODULE_PARM definitions together to make them easier for future maintenance, rather than having them spread across the file. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230121085754.1693336-2-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Set second Super-IO chip in configuration modeFrank Crawford2023-02-031-0/+48
| | | | | | | | | | | | | | | | | | On various Gigabyte AM4 boards (AB350, AX370), the second Super-IO chip (IT8792E) needs to be in configuration mode before accessing the first due to a bug in IT8792E which otherwise results in LPC bus access errors. This needs to be done before accessing the first Super-IO chip since the second chip may have been accessed prior to loading this driver. The problem is also reported to affect IT8795E, which is used on X299 boards and has the same chip ID as IT8792E (0x8733). It also appears to affect systems with IT8790E, which is used on some Z97X-Gaming boards as well as Z87X-OC, and other more recent Gigabyte boards. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230104060926.619686-3-frank@crawford.emu.id.au [groeck: Made description pass checkpatch] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Allow calling __superio_enter outside muxed regionFrank Crawford2023-02-031-4/+9
| | | | | | | | | | | | Allow for superio_enter to be called without requesting the muxed memory region, in particular for initialisation of the second chipset, which must be put into configuration mode, but without an associated call to leave configuration mode. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20230104060926.619686-2-frank@crawford.emu.id.au [groeck: Clarified subject] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add DMI table for future extensionsFrank Crawford2022-12-041-19/+53
| | | | | | | | | | Add in DMI matching table to match various board quirks and settings. This will be useful for future extentions, but will start with the existing definition of the Shuttle SN68PT. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20221105232531.1619387-1-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Check for a valid chip before using force_idAhmad Khalifa2022-12-041-1/+7
| | | | | | | | | Check there is a chip before using force_id parameter as there is no value in registering a non-existent chip Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws> Link: https://lore.kernel.org/r/20221004210100.540120-3-ahmad@khalifa.ws Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add param to ignore ACPI resource conflictsAhmad Khalifa2022-12-041-2/+8
| | | | | | | | | | | | Add parameter to ignore ACPI resource conflicts as an alternate to using 'acpi_enforce_resources=lax'. Some BIOSes reserve resources and don't use them and the system wide parameter may result in failures to certain drivers. Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws> Link: https://lore.kernel.org/r/20221004210100.540120-2-ahmad@khalifa.ws Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()Jonathan Cameron2022-09-251-4/+4
| | | | | | | | | | These newer PM macros allow the compiler to see what code it can remove if !CONFIG_PM_SLEEP. This allows the removal of __maybe_unused markings whilst achieving the same result. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20220925172759.3573439-7-jic23@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: cleanup non-bool "valid" data fieldsPaul Fertser2021-10-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have bool so use it consistently in all the drivers. The following Coccinelle script was used: @@ identifier T; type t = { char, int }; @@ struct T { ... - t valid; + bool valid; ... } @@ identifier v; @@ ( - v->valid = 0 + v->valid = false | - v->valid = 1 + v->valid = true ) followed by sed to fixup the comments: sed '/bool valid;/{s/!=0/true/;s/zero/false/}' Few whitespace changes were fixed manually. All modified drivers were compile-tested. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Link: https://lore.kernel.org/r/20210924195202.27917-1-fercerpav@gmail.com [groeck: Fixed up 'u8 valid' to 'boool valid' in atxp1.c] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: Use kobj_to_dev()Guenter Roeck2021-04-201-6/+6
| | | | | | | | | | | coccinelle complains about WARNING opportunity for kobj_to_dev() in several files, resulting in one-by-one patch submissions. Handle all remaining instances in one go. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157Thomas Gleixner2019-05-301-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on 3 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 as published by the free software foundation either version 2 of the license or at your option any later version 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 this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] 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 this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] 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-or-later has been chosen to replace the boilerplate/reference in 1105 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* hwmon: (it87) Reapply probe path chip registers settings after resumeMaciej S. Szmigiero2017-08-131-2/+74
| | | | | | | | | | | | | After a suspend / resume cycle we possibly need to reapply chip registers settings that we had set or fixed in a probe path, since they might have been reset to default values or set incorrectly by a BIOS again. Tested on a Gigabyte M720-US3 board, which requires routing internal VCCH5V to in7 (and had it wrong again on resume from S3). Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> [groeck: Return value from it87_resume_sio() is unused; make it void] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Split out chip registers setting code on probe pathMaciej S. Szmigiero2017-08-131-50/+88
| | | | | | | | | | | | | | This commit splits out chip registers setting code on probe path to separate functions so they can be reused for setting the device properly again when system resumes from suspend. While we are at it let's also make clear that on IT8720 and IT8782 it's the VCCH5V line that is (possibly) routed to in7. This will make it consistent with a similar message that it printed on IT8783. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Avoid registering the same chip on both SIO addressesGuenter Roeck2017-03-221-5/+19
| | | | | | | | | IT8705F is known to respond on both SIO addresses. Registering it twice may result in system lockups. Reported-by: Russell King <linux@armlinux.org.uk> Fixes: e84bd9535e2b ("hwmon: (it87) Add support for second Super-IO chip") Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add support for IT8792EGuenter Roeck2017-02-101-2/+16
| | | | | | | | | | The chip is similar to IT8732E, but supports only three fans and pwm outputs instead of four (the driver currently does not support the 4th fan and pwm output of IT8732E). Note that the chip ID is 0x8733, not 0x8792 as one would expect. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Do not overwrite bit 2..6 of pwm control registersGuenter Roeck2017-02-101-13/+24
| | | | | | | | | | | | | | In IT8620E, after setting pwm control to manual, it was observed that pwm values for fan 4..6 have reversed results (writing 0 results in fans running at full speed, writing 255 results in fans turned off). With the new PWM control, pwm polarity for pwm control 4..6 is specified in its pwm control registers. Those registers are overwritten when setting the pwm mode or the temperature mapping. Do not touch bit 2..6 of pwm control registers on register writes to fix the problem. Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Fix pwm4 detection for IT8620 and IT8628Guenter Roeck2017-02-101-1/+1
| | | | | | | | | pwm4 is enabled if bit 2 of GPIO control register 4 is disabled, not when it is enabled. Since the check is for the skip condition, it is reversed. This applies to both IT8620 and IT8628. Fixes: 36c4d98a7883d ("hwmon: (it87) Add support for all pwm channels ...") Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Ensure that pwm control cache is current before updating valuesGuenter Roeck2017-02-101-0/+2
| | | | | | | | | | If sensor attributes were never read, the pwm control data has not been initiialized, which can cause wrong driver behavior. Ensure that cached data is current before acting on it. Cc: stable@vger.kernel.org # 4.4+ Reported-by: Kevin Folz <kfolz@evertz.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Improve IT8622 supportGuenter Roeck2017-02-101-8/+59
| | | | | | | Configuration registers on ITE8622 are different to 8620 and 8628 and require special handling. Also, the chip supports up to 5 pwm controls. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add support for IT8622EGuenter Roeck2017-02-101-1/+15
| | | | | | | | IT8622E is similar to IT8620E, but only supports five pwm controls and five fan tachometers. Originally-from: Kevin Folz <kfolz@evertz.com>. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add feature flag indicating that VIN3 is connected to 5VGuenter Roeck2017-02-101-3/+7
| | | | | | | On IT8622E and IT8628E, VIN3 is expected to be connected to +5V. Add feature flag and reflect in input label. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) use permission-specific DEVICE_ATTR variantsJulia Lawall2017-01-021-10/+10
| | | | | | | | | | | | | | Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write 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: (it87) Drop useless commentsJean Delvare2016-09-081-4/+4
| | | | | | | | | | | Remove the index comments at the end of it87_attributes_in. They serve no purpose (as there is no reference to them in it87_in_is_visible) and some of them were obviously wrong. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Cc: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add missing sysfs attribute group terminatorJean Delvare2016-08-291-0/+1
| | | | | | | | | | | | Attribute array it87_attributes_in lacks its NULL terminator, causing random behavior when operating on the attribute group. Fixes: 52929715634a ("hwmon: (it87) Use is_visible for voltage sensors") Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Features mask must be 32 bit wideGuenter Roeck2016-08-111-1/+1
| | | | | | | | | | | | | Coverity reports: result_independent_of_operands: data->features & (65536UL /* 1UL << 16 */) is always 0 regardless of the values of its operands. This occurs as the logical operand of if. data->features needs to be 32 bit wide since there are more than 16 features. Fixes: cc18da79d9b7 ("hwmon: (it87) Support up to 6 temperature sensors ... "); Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add support for IT8628EGuenter Roeck2016-04-191-2/+16
| | | | | | | IT8628E is functionally identical to IT8620E. Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Fix pwm_temp_map for system with 6 pwm channelsGuenter Roeck2016-04-191-8/+15
| | | | | Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Support automatic pwm control on newer chipsGuenter Roeck2016-04-191-14/+187
| | | | | Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Enhance validation for fan4 and fan5Guenter Roeck2016-04-191-0/+23
| | | | | | | | | Several of the chips supported by this driver have a configuration register to enable fan4 and fan5. Use those registers to determine if fan4 and fan5 tachometers are supported. Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Support disabling fan control for all pwm control and chipsGuenter Roeck2016-04-191-21/+31
| | | | | | | | | | On/Off mode is only supported for pwm controls 0-2, and not supported at all for IT8603E/IT8623E. For pwm controls 3-6 and for IT8603E/IT8623E, SmartGuardian mode is always enabled. Use it and set the pwm value to the maximum if fan control is disabled. Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Formatting cleanupGuenter Roeck2016-04-191-75/+80
| | | | | | | | | | | | | | | | | | | | Fix various checkpatch complaints to clean up the code and make it easier to read. CHECK: Do not include the paragraph about writing to the FSF CHECK: Alignment should match open parenthesis CHECK: Logical continuations should be on the previous line CHECK: No space is necessary after a cast CHECK: Please don't use multiple blank lines CHECK: Please use a blank line after function/struct/union/enum declarations CHECK: spaces preferred around that '+' (ctx:VxV) WARNING: Missing a blank line after declarations No functional change. Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Use defines for array sizes and sensor countsGuenter Roeck2016-04-191-24/+34
| | | | | | | | Using array size defines makes it much easier to find errors in index values and loop counts. Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Use BIT macroGuenter Roeck2016-04-191-144/+146
| | | | | | | | Using the BIT macro makes the code a little easier to read and has the added benefit of making checkpatch happy. Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add support for VIN7 to VIN10 on IT8620EGuenter Roeck2016-04-191-5/+24
| | | | | | | IT8620E supports three additional voltage sensors. Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>