- 19 4月, 2016 10 次提交
-
-
由 Guenter Roeck 提交于
IT8620E supports up to 6 pwm channels. Add support for it. Also check if fan tachometers 4..6 are enabled before instantiating the respective sysfs attributes. Tested-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
AVCC3 is supported on IT8620E, similar to IT8603E. Add feature flag to indicate AVCC3 support. Don't enable it for now on IT8620E since it is unclear if this chip supports it correctly. Tested-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Huang Rui 提交于
This patch adds a platform check function to make code more readable. Signed-off-by: NHuang Rui <ray.huang@amd.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Huang Rui 提交于
This patch adds the description to explain the TDP reporting mechanism and accumulated power algorithm. Signed-off-by: NHuang Rui <ray.huang@amd.com> Cc: Borislav Petkov <bp@alien8.de> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Huang Rui 提交于
This patch introduces an algorithm that computes the average power by reading a delta value of “core power accumulator” register during measurement interval, and then dividing delta value by the length of the time interval. User is able to use power1_average entry to measure the processor power consumption and power1_average_interval entry to set the interval. A simple example: ray@hr-ub:~/tip$ sensors fam15h_power-pci-00c4 Adapter: PCI adapter power1: 19.58 mW (avg = 2.55 mW, interval = 0.01 s) (crit = 15.00 W) ... The result is current average processor power consumption in 10 millisecond. The unit of the result is uWatt. Suggested-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NHuang Rui <ray.huang@amd.com> Cc: Borislav Petkov <bp@alien8.de> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Huang Rui 提交于
PTSC is the performance timestamp counter value in a cpu core and the cores in one compute unit have the fixed frequency. So it picks up the performance timestamp counter value of the first core per compute unit to measure the interval for average power per compute unit. Signed-off-by: NHuang Rui <ray.huang@amd.com> Cc: Borislav Petkov <bp@alien8.de> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Huang Rui 提交于
This patch adds a member in fam15h_power_data which specifies the compute unit accumulated power. It adds do_read_registers_on_cu to do all the read to all MSRs and run it on one of the online cores on each compute unit with smp_call_function_many(). This behavior can decrease IPI numbers. Suggested-by: NBorislav Petkov <bp@alien8.de> Signed-off-by: NHuang Rui <ray.huang@amd.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Huang Rui 提交于
This patch adds CONFIG_CPU_SUP_AMD as the dependence of fam15h_power driver. Because the following patch will use the interface from x86/kernel/cpu/amd.c. Otherwise, the below error might be encountered: All errors (new ones prefixed by >>): drivers/built-in.o: In function `fam15h_power_probe': >> fam15h_power.c:(.text+0x26e3a3): undefined reference to >> `amd_get_cores_per_cu' fam15h_power.c:(.text+0x26e41e): undefined reference to `amd_get_cores_per_cu' Reported-by: Nbuild test robot <lkp@intel.com> Acked-by: NBorislav Petkov <bp@suse.de> Signed-off-by: NHuang Rui <ray.huang@amd.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Tiberiu Breana 提交于
Add basic support for the Maxim Integrated MAX31722/MAX31723 SPI temperature sensors / thermostats. Includes: - ACPI support; - raw temperature readings; - power management Datasheet: https://datasheets.maximintegrated.com/en/ds/MAX31722-MAX31723.pdfSigned-off-by: NTiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Akshay Bhat 提交于
On ads7828 the internal reference defaults to off upon power up. When using internal reference, it needs to be turned on and the voltage needs to settle before normal conversion cycle can be started. Hence perform a dummy read in the probe to enable the internal reference allowing the voltage to settle before performing a normal read. Without this fix, the first read from the ADC when using internal reference always returns incorrect data. Signed-off-by: NAkshay Bhat <akshay.bhat@timesys.com> Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 28 3月, 2016 1 次提交
-
-
由 Guenter Roeck 提交于
arm:pxa_defconfig can result in the following crash if the max1111 driver is not instantiated. Unhandled fault: page domain fault (0x01b) at 0x00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: : 1b [#1] PREEMPT ARM Modules linked in: CPU: 0 PID: 300 Comm: kworker/0:1 Not tainted 4.5.0-01301-g1701f680 #10 Hardware name: SHARP Akita Workqueue: events sharpsl_charge_toggle task: c390a000 ti: c391e000 task.ti: c391e000 PC is at max1111_read_channel+0x20/0x30 LR is at sharpsl_pm_pxa_read_max1111+0x2c/0x3c pc : [<c03aaab0>] lr : [<c0024b50>] psr: 20000013 ... [<c03aaab0>] (max1111_read_channel) from [<c0024b50>] (sharpsl_pm_pxa_read_max1111+0x2c/0x3c) [<c0024b50>] (sharpsl_pm_pxa_read_max1111) from [<c00262e0>] (spitzpm_read_devdata+0x5c/0xc4) [<c00262e0>] (spitzpm_read_devdata) from [<c0024094>] (sharpsl_check_battery_temp+0x78/0x110) [<c0024094>] (sharpsl_check_battery_temp) from [<c0024f9c>] (sharpsl_charge_toggle+0x48/0x110) [<c0024f9c>] (sharpsl_charge_toggle) from [<c004429c>] (process_one_work+0x14c/0x48c) [<c004429c>] (process_one_work) from [<c0044618>] (worker_thread+0x3c/0x5d4) [<c0044618>] (worker_thread) from [<c004a238>] (kthread+0xd0/0xec) [<c004a238>] (kthread) from [<c000a670>] (ret_from_fork+0x14/0x24) This can occur because the SPI controller driver (SPI_PXA2XX) is built as module and thus not necessarily loaded. While building SPI_PXA2XX into the kernel would make the problem disappear, it appears prudent to ensure that the driver is instantiated before accessing its data structures. Cc: Arnd Bergmann <arnd@arndb.de> Cc: stable@vger.kernel.org Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 09 3月, 2016 1 次提交
-
-
由 Adam Baker 提交于
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: NAdam Baker <linux@baker-net.org.uk> [groeck: Dropped .owner field initialization] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 05 3月, 2016 5 次提交
-
-
由 Guenter Roeck 提交于
ADM1278 is mostly compatible to other chips of the same series. Besides the usual difference in coefficients, it supports a temperature sensor, and it can measure both input and output voltage at the same time. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Joseph McNally 提交于
This patch adds support for the Murata NCP15XH103 thermistor series. Signed-off-by: NJoseph McNally <jmcna06@gmail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Sanchayan Maity 提交于
Currently the driver calls hwmon_device_register_with_groups which does not accept hypen in node name and returns EINVAL. Use of hypen in device tree node name results in probe failure., however use of hypen in device tree node name is perfectly acceptable. Change this by allocating a duplicate managed string, replacing hypen with underscore and then calling hwmon_device_register_with_groups. This allows the use of hypen in device tree node name while maintaining backwards compatibility and preventing any possible regressions with user space. Signed-off-by: NSanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Mike Looijmans 提交于
This adds support for the Linear Technology LTC2990 I2C System Monitor. The LTC2990 supports a combination of voltage, current and temperature monitoring. This driver currently only supports reading two currents by measuring two differential voltages across series resistors, in addition to the Vcc supply voltage and internal temperature. This is sufficient to support the Topic Miami SOM which uses this chip to monitor the currents flowing into the FPGA and the CPU parts. Signed-off-by: NMike Looijmans <mike.looijmans@topic.nl> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Sudeep Holla 提交于
The vexpress hwmon implementation is currently just called vexpress. This is a problem because it clashes with another module with the same name in regulators. This patch renames the vexpress hwmon implementation to vexpress-hwmon so that there will be no clash in the module namespace. Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: lm-sensors@lm-sensors.org Reported-by: NRusty Russell <rusty@rustcorp.com.au> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 20 2月, 2016 1 次提交
-
-
由 Nishanth Menon 提交于
Thermal hook gpio_fan_get_cur_state is only interested in knowing the current speed index that was setup in the system, this is already available as part of fan_data->speed_index which is always set by set_fan_speed. Using get_fan_speed_index is useful when we have no idea about the fan speed configuration (for example during fan_ctrl_init). When thermal framework invokes gpio_fan_get_cur_state=>get_fan_speed_index via gpio_fan_get_cur_state especially in a polled configuration for thermal governor, we basically hog the i2c interface to the extent that other functions fail to get any traffic out :(. Instead, just provide the last state set in the driver - since the gpio fan driver is responsible for the fan state immaterial of override, the fan_data->speed_index should accurately reflect the state. Fixes: b5cf88e4 ("(gpio-fan): Add thermal control hooks") Reported-by: NTony Lindgren <tony@atomide.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: NNishanth Menon <nm@ti.com> Cc: stable@vger.kernel.org Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 19 2月, 2016 1 次提交
-
-
由 Peter Rosin 提交于
Make the divisor signed as DIV_ROUND_CLOSEST is undefined for negative dividends when the divisor is unsigned. Signed-off-by: NPeter Rosin <peda@axentia.se> Cc: stable@vger.kernel.org Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 16 2月, 2016 2 次提交
-
-
由 Sudeep Holla 提交于
SCPI specification v1.1 adds support for energy sensors. This patch adds support for the same. Acked-by: NGuenter Roeck <linux@roeck-us.net> Reviewed-by: NPunit Agrawal <punit.agrawal@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Sudeep Holla 提交于
SCPI specification version 1.1 extended the sensor from 32-bit to 64-bit values in order to accommodate new sensor class with 64-bit requirements Since the SCPI driver sets the higher 32-bit for older protocol version to zeros, there's no need to explicitly check the SCPI protocol version and the backward compatibility is maintainted. Acked-by: NGuenter Roeck <linux@roeck-us.net> Reviewed-by: NPunit Agrawal <punit.agrawal@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 28 1月, 2016 1 次提交
-
-
由 Gioh Kim 提交于
Add bit masking to read ApmTdpLimit precisely Signed-off-by: NGioh Kim <gi-oh.kim@profitbricks.com> Acked-by: NBorislav Petkov <bp@suse.de> Acked-by: NHuang Rui <ray.huang@amd.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 25 1月, 2016 1 次提交
-
-
由 Thorsten Leemhuis 提交于
Since Linux 4.0 the CPU fan speed is going up and down on Dell Studio XPS 8000 and 8100 for unknown reasons. The 8100 was already blacklisted in commit a4b45b25 ("hwmon: (dell-smm) Blacklist Dell Studio XPS 8100"). This patch blacklists the XPS 8000. Without further debugging on the affected machine, it is not possible to find the problem. For more details see https://bugzilla.kernel.org/show_bug.cgi?id=100121Signed-off-by: NThorsten Leemhuis <linux@leemhuis.info> Acked-by: NPali Rohár <pali.rohar@gmail.com> Cc: stable@vger.kernel.org # v4.0+, will need backport Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 09 1月, 2016 1 次提交
-
-
由 Guenter Roeck 提交于
Mitac microcode differs from Intel microcode. One key difference is that pwm values can be written. Detect vendor from customer ID field and no longer use DMI data to identify which microcode is running on the chip. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 05 1月, 2016 1 次提交
-
-
由 Julia Lawall 提交于
The aem_rw_sensor_template and aem_ro_sensor_template structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 30 12月, 2015 1 次提交
-
-
由 Guenter Roeck 提交于
Reference counting is now implemented in the watchdog core and no longer required in watchdog drivers. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
-
- 19 12月, 2015 5 次提交
-
-
由 Julia Lawall 提交于
The sensor_template_group structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Huang Rui 提交于
AMD Family 15h Models 70h-7fh processors also support TDP power reporting interface. Signed-off-by: NHuang Rui <ray.huang@amd.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
LTC3815 is a Monolithic Synchronous DC/DC Step-Down Converter. Cc: Michael Jones <mike@proclivis.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
HTU21 is now supported by IIO, and can be instantiated as hwmon driver using the iio-hwmon bridge. An explicit hwmon driver is no longer needed. Cc: William Markezana <william.markezana@meas-spec.com> Cc: Ludovic Tancerel <ludovic.tancerel@maplehightech.com> Cc: Jonathan Cameron <jic23@kernel.org> Reviewed-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Arnd Bergmann 提交于
If CONFIG_BITREVERSE is not built-in, the sht15 driver fails to link: drivers/built-in.o: In function `sht15_crc8': drivers/hwmon/sht15.c:195: undefined reference to `byte_rev_table' This adds a Kconfig 'select' statement, like all other users of bitrev.h have it. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Fixes: 33836ee9 ("hwmon:change sht15_reverse()") Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 11 12月, 2015 1 次提交
-
-
由 Nishanth Menon 提交于
TMP102 works based on conversions done periodically. However, as per the TMP102 data sheet[1] the first conversion is triggered immediately after we program the configuration register. The temperature data registers do not reflect proper data until the first conversion is complete (in our case HZ/4). The driver currently sets the last_update to be jiffies - HZ, just after the configuration is complete. When TMP102 driver registers with the thermal framework, it immediately tries to read the sensor temperature data. This takes place even before the conversion on the TMP102 is complete and results in an invalid temperature read. Depending on the value read, this may cause thermal framework to assume that a critical temperature event has occurred and attempts to shutdown the system. Instead of causing an invalid mid-conversion value to be read erroneously, we mark the last_update to be in-line with the current jiffies. This allows the tmp102_update_device function to skip update until the required conversion time is complete. Further, we ensure to return -EAGAIN result instead of returning spurious temperature (such as 0C) values to the caller to prevent any wrong decisions made with such values. NOTE: this allows the read functions not to be blocking and allows the callers to make the decision if they would like to block or try again later. At least the current user(thermal) seems to handle this by retrying later. A simpler alternative approach could be to sleep in the probe for the duration required, but that will result in latency that is undesirable and delay boot sequence un-necessarily. [1] http://www.ti.com/lit/ds/symlink/tmp102.pdf Cc: Eduardo Valentin <edubezval@gmail.com> Reported-by: NAparna Balasubramanian <aparnab@ti.com> Reported-by: NElvita Lobo <elvita@ti.com> Reported-by: NYan Liu <yan-liu@ti.com> Signed-off-by: NNishanth Menon <nm@ti.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 17 11月, 2015 2 次提交
-
-
由 Sudeep Holla 提交于
Currently it's assumed that firmware exports only the class of sensors supported by the driver. However with newer firmware or SCPI protocol revision, support for newer classes of sensors can be present. The driver fails to probe with the following warning if an unsupported class of sensor is encountered in the firmware. sysfs: cannot create duplicate filename '/devices/platform/scpi/scpi:sensors/hwmon/hwmon0/' ------------[ cut here ]------------ WARNING: at fs/sysfs/dir.c:31 Modules linked in: CPU: 0 PID: 6 Comm: kworker/u12:0 Not tainted 4.3.0-rc7 #137 Hardware name: ARM Juno development board (r0) (DT) Workqueue: deferwq deferred_probe_work_func PC is at sysfs_warn_dup+0x54/0x78 LR is at sysfs_warn_dup+0x54/0x78 This patch fixes the above issue by skipping through the unsupported class of SCPI sensors. Fixes: 68acc77a ("hwmon: Support thermal zones registration for SCP temperature sensors") Fixes: ea98b29a ("hwmon: Support sensors exported via ARM SCP interface") Cc: Guenter Roeck <linux@roeck-us.net> Reviewed-by: NPunit Agrawal <punit.agrawal@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Arnd Bergmann 提交于
The newly added scpi thermal support is broken when the scpi driver is built-in but the thermal driver is a loadable module: drivers/built-in.o: In function `scpi_hwmon_probe': (.text+0x444d70): undefined reference to `thermal_zone_of_sensor_unregister' (.text+0x444d94): undefined reference to `thermal_zone_of_sensor_register' drivers/built-in.o: In function `scpi_hwmon_remove': (text+0x444e6c): undefined reference to `thermal_zone_of_sensor_unregister' This uses the same Kconfig trick that we have in a couple of other drivers already to ensure we can only select the driver in valid configurations when either THERMAL_OF is disabled, or when with a dependency on CONFIG_THERMAL that can force SCPI to be a loadable module in the case I was hitting. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Fixes: 68acc77a ("hwmon: Support thermal zones registration for SCP temperature sensors") Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 16 11月, 2015 2 次提交
-
-
由 Shuah Khan 提交于
Fix the following "maybe used uninitialized" warnings by initializing the variables to keep the compiler quiet. There is no "used uninitialized" in this case. CC [M] drivers/hwmon/applesmc.o drivers/hwmon/applesmc.c: In function ‘applesmc_init_smcreg’: drivers/hwmon/applesmc.c:595:43: warning: ‘right_light_sensor’ may be used uninitialized in this function [-Wmaybe-uninitialized] s->num_light_sensors = left_light_sensor + right_light_sensor; ^ drivers/hwmon/applesmc.c:540:26: note: ‘right_light_sensor’ was declared here bool left_light_sensor, right_light_sensor; ^ drivers/hwmon/applesmc.c:595:43: warning: ‘left_light_sensor’ may be used uninitialized in this function [-Wmaybe-uninitialized] s->num_light_sensors = left_light_sensor + right_light_sensor; ^ drivers/hwmon/applesmc.c:540:7: note: ‘left_light_sensor’ was declared here bool left_light_sensor, right_light_sensor; ^ Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Li Yang 提交于
Since a0de56c8 ("hwmon: (ina2xx) convert driver to using regmap") the driver requires REGMAP_I2C to build. Select it by default in Kconfig. Reported-by: NGuo Chunrong <B40290@freescale.com> Cc: Marc Titinger <mtitinger@baylibre.com> Signed-off-by: NLi Yang <leoli@freescale.com> Fixes: a0de56c8 ("hwmon: (ina2xx) convert driver to using regmap") Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
- 09 11月, 2015 1 次提交
-
-
由 Adam Majer 提交于
PCI_DEVICE_ID_AMD_15H_M60H_NB_F3 is now defined in pci_ids.h Signed-off-by: NAdam Majer <adamm@zombino.com> Acked-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NJean Delvare <jdelvare@suse.de>
-
- 01 11月, 2015 3 次提交
-
-
由 Huang Rui 提交于
This patch adds a member in fam15h_power_data which specifies the maximum accumulated power in a compute unit. Signed-off-by: NHuang Rui <ray.huang@amd.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Huang Rui 提交于
This patch enables power1_input attribute for Carrizo platform. Signed-off-by: NHuang Rui <ray.huang@amd.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Huang Rui 提交于
Attributes depend on the CPU model the driver gets loaded on. Therefore, add those attributes dynamically at init time. This is more flexible to control the different attributes on different platforms. Suggested-by: NBorislav Petkov <bp@alien8.de> Signed-off-by: NHuang Rui <ray.huang@amd.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-