summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2014-05-01Revert "hwmon: (coretemp) Refine TjMax detection"Guenter Roeck
This reverts commit 9fb6c9c73b11bef65ba80a362547fd116c1e1c9d. Tjmax on some Intel CPUs is below 85 degrees C. One known example is L5630 with Tjmax of 71 degrees C. There are other Xeon processors with Tjmax of 70 or 80 degrees C. Also, the Intel IA32 System Programming document states that the temperature target is in bits 23:16 of MSR 0x1a2 (MSR_TEMPERATURE_TARGET), which is 8 bits, not 7. So even if turbostat uses similar checks to validate Tjmax, there is no evidence that the checks are actually required. On the contrary, the checks are known to cause problems and therefore need to be removed. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=75071. Fixes: 9fb6c9c hwmon: (coretemp) Refine TjMax detection Reviewed-by: Jean Delvare <jdelvare@suse.de> Cc: stable@vger.kernel.org # 3.14+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-04-24hwmon: (ltc2945) Don't crash the kernel unnecessarilyGuenter Roeck
An implementation error should not crash the kernel if it is avoidable. Replace BUG() with WARN_ONCE(). Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-04-24hwmon: (vexpress) Avoid creating non-existing attributesPawel Moll
The 'label' attribute was always created but returned -ENOENT if there is no label and such behaviour is undefined from libsensors' point of view. Fixed by providing is_visible method in the attributes group, so the attribute is not created at all when unnecessary. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-04-24hwmon: (vexpress) Use legal hwmon device namesPawel Moll
The driver used to directly us a DT 'compatible' property for the 'name' attribute of the hwmon devices. Unfortunately it contains '-' which is illegal in this context. It messes up libsensors and thus every application using it. Fixed by providing equivalent (and simpler) name strings. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-04-09Merge branch 'merge' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc Pull more powerpc updates from Ben Herrenschmidt: "Here are a few more powerpc things for you. So you'll find here the conversion of the two new firmware sysfs interfaces to the new API for self-removing files that Greg and Tejun introduced, so they can finally remove the old one. I'm also reverting the hwmon driver for powernv. I shouldn't have merged it, I got a bit carried away here. I hadn't realized it was never CCed to the relevant maintainer(s) and list(s), and happens to have some issues so I'm taking it out and it will come back via the proper channels. The rest is a bunch of LE fixes (argh, some of the new stuff was broken on LE, I really need to start testing LE myself !) and various random fixes here and there. Finally one bit that's not strictly a fix, which is the HVC OPAL change to "kick" the HVC thread when the firmware tells us there is new incoming data. I don't feel like waiting for this one, it's simple enough, and it makes a big difference in console responsiveness which is good for my nerves" * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (26 commits) powerpc/powernv Adapt opal-elog and opal-dump to new sysfs_remove_file_self Revert "powerpc/powernv: hwmon driver for power values, fan rpm and temperature" power, sched: stop updating inside arch_update_cpu_topology() when nothing to be update powerpc/le: Avoid creatng R_PPC64_TOCSAVE relocations for modules. arch/powerpc: Use RCU_INIT_POINTER(x, NULL) in platforms/cell/spu_syscalls.c powerpc/opal: Add missing include powerpc: Convert last uses of __FUNCTION__ to __func__ powerpc: Add lq/stq emulation powerpc/powernv: Add invalid OPAL call powerpc/powernv: Add OPAL message log interface powerpc/book3s: Fix mc_recoverable_range buffer overrun issue. powerpc: Remove dead code in sycall entry powerpc: Use of_node_init() for the fakenode in msi_bitmap.c powerpc/mm: NUMA pte should be handled via slow path in get_user_pages_fast() powerpc/powernv: Fix endian issues with sensor code powerpc/powernv: Fix endian issues with OPAL async code tty/hvc_opal: Kick the HVC thread on OPAL console events powerpc/powernv: Add opal_notifier_unregister() and export to modules powerpc/ppc64: Do not turn AIL (reloc-on interrupts) too early powerpc/ppc64: Gracefully handle early interrupts ...
2014-04-09Revert "powerpc/powernv: hwmon driver for power values, fan rpm and temperature"Benjamin Herrenschmidt
This reverts commit 0de7f8a917b5202014430e0055c0e1db0348bd62. This driver wasn't merged via the proper maintainers (my fault ... ooops !) and has serious issues so let's take it out for now and have a new better one be merged the right way Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> ---
2014-04-07Merge tag 'cpu-hotplug-3.15-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull CPU hotplug notifiers registration fixes from Rafael Wysocki: "The purpose of this single series of commits from Srivatsa S Bhat (with a small piece from Gautham R Shenoy) touching multiple subsystems that use CPU hotplug notifiers is to provide a way to register them that will not lead to deadlocks with CPU online/offline operations as described in the changelog of commit 93ae4f978ca7f ("CPU hotplug: Provide lockless versions of callback registration functions"). The first three commits in the series introduce the API and document it and the rest simply goes through the users of CPU hotplug notifiers and converts them to using the new method" * tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits) net/iucv/iucv.c: Fix CPU hotplug callback registration net/core/flow.c: Fix CPU hotplug callback registration mm, zswap: Fix CPU hotplug callback registration mm, vmstat: Fix CPU hotplug callback registration profile: Fix CPU hotplug callback registration trace, ring-buffer: Fix CPU hotplug callback registration xen, balloon: Fix CPU hotplug callback registration hwmon, via-cputemp: Fix CPU hotplug callback registration hwmon, coretemp: Fix CPU hotplug callback registration thermal, x86-pkg-temp: Fix CPU hotplug callback registration octeon, watchdog: Fix CPU hotplug callback registration oprofile, nmi-timer: Fix CPU hotplug callback registration intel-idle: Fix CPU hotplug callback registration clocksource, dummy-timer: Fix CPU hotplug callback registration drivers/base/topology.c: Fix CPU hotplug callback registration acpi-cpufreq: Fix CPU hotplug callback registration zsmalloc: Fix CPU hotplug callback registration scsi, fcoe: Fix CPU hotplug callback registration scsi, bnx2fc: Fix CPU hotplug callback registration scsi, bnx2i: Fix CPU hotplug callback registration ...
2014-04-05Merge branch 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull hwmon updates from Jean Delvare: "This includes a number of driver conversions to devm_hwmon_device_register_with_groups, a few cleanups, and support for the ITE IT8623E" * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (it87) Add support for IT8623E hwmon: (it87) Fix IT8603E define name hwmon: (lm90) Convert to use hwmon_device_register_with_groups hwmon: (lm90) Create all sysfs groups in one call hwmon: (lm90) Always use the dev variable in the probe function hwmon: (lm90) Create most optional attributes with sysfs_create_group hwmon: Avoid initializing the same field twice hwmon: (pc87360) Avoid initializing the same field twice hwmon: (lm80) Convert to use devm_hwmon_device_register_with_groups hwmon: (adm1021) Convert to use devm_hwmon_device_register_with_groups hwmon: (lm63) Avoid initializing the same field twice hwmon: (lm63) Convert to use devm_hwmon_device_register_with_groups hwmon: (lm63) Create all sysfs groups in one call hwmon: (lm63) Introduce 'dev' variable to point to client->dev hwmon: (lm63) Add additional sysfs group for temp2_type attribute hwmon: (f71805f) Fix author's address
2014-04-04hwmon: (it87) Add support for IT8623ERudolf Marek
Add support for the IT8623E found on Asus motherboards. It has same hardware monitoring block as IT8603E. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (it87) Fix IT8603E define nameRudolf Marek
Fix small typo in the define name for IT8603E. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (lm90) Convert to use hwmon_device_register_with_groupsGuenter Roeck
Simplify code, reduce code size, and attach hwmon attributes to hwmon device. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (lm90) Create all sysfs groups in one callGuenter Roeck
Create all sysfs groups in one call by using sysfs_create_groups instead of calling sysfs_create_group individually for each group. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (lm90) Always use the dev variable in the probe functionGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (lm90) Create most optional attributes with sysfs_create_groupGuenter Roeck
With the new hwmon API, all attributes have to be created as groups. Use sysfs_create_group and sysfs_remove_group instead of device_create_file and device_remove_file to prepare for the new API. Exception is the 'pec' attribute which will stay with the i2c device. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: Avoid initializing the same field twiceJean Delvare
All hwmon drivers allocate their data structure with some form of kzalloc, so setting data fields to zero explicitly is a waste of time. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2014-04-04hwmon: (pc87360) Avoid initializing the same field twiceJean Delvare
data is kzalloc'd, so data->valid, data->innr and data->tempnr are already 0. Also rework the initialization path to only set name and data->fannr once. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2014-04-04hwmon: (lm80) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Simplify code, reduce code size, and attach hwmon attributes to hwmon device. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (adm1021) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Simplify code, reduce code size, and attach hwmon attributes to hwmon device. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (lm63) Avoid initializing the same field twiceJean Delvare
data is kzalloc'd, so data->valid is already 0. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2014-04-04hwmon: (lm63) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Simplify code, reduce code size, attach hwmon attributes to hwmon device. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (lm63) Create all sysfs groups in one callGuenter Roeck
We can create all sysfs groups in one call by using sysfs_create_groups instead of using sysfs_create_group individually for each group. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (lm63) Introduce 'dev' variable to point to client->devGuenter Roeck
client->dev is used multiple times in several functions. Introduce dev variable pointing to it to simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (lm63) Add additional sysfs group for temp2_type attributeGuenter Roeck
With the new hwmon API, we can only add groups of attributes, not individual attributes. To prepare for the use of the new API, add an additional sensor group for the temp2_type attribute and register it with sysfs_create_group instead of device_create_file. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (f71805f) Fix author's addressJean Delvare
The original address was incomplete, and this caused it to be missed by the recent update to my new address. Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-02hwmon: (k10temp) Add support for AMD F16 M30h processorAravind Gopalakrishnan
Adding new PCI ID to support AMD F16 M30h processor (Mullins). While at it, modify Kconfig and Doc files to reflect the support for newer processors Note: PCI ID for this processor will make it into pci_ids.h as part of this patch: http://marc.info/?l=linux-kernel&m=139291362126057&w=2 which should be pulled into 3.15 when merge window opens (It currently sits in 'for-next' branch of bp.git- https://git.kernel.org/cgit/linux/kernel/git/bp/bp.git/log/?h=for-next) Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-04-02Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc Pull main powerpc updates from Ben Herrenschmidt: "This time around, the powerpc merges are going to be a little bit more complicated than usual. This is the main pull request with most of the work for this merge window. I will describe it a bit more further down. There is some additional cpuidle driver work, however I haven't included it in this tree as it depends on some work in tip/timer-core which Thomas accidentally forgot to put in a topic branch. Since I didn't want to carry all of that tip timer stuff in powerpc -next, I setup a separate branch on top of Thomas tree with just that cpuidle driver in it, and Stephen has been carrying that in next separately for a while now. I'll send a separate pull request for it. Additionally, two new pieces in this tree add users for a sysfs API that Tejun and Greg have been deprecating in drivers-core-next. Thankfully Greg reverted the patch that removes the old API so this merge can happen cleanly, but once merged, I will send a patch adjusting our new code to the new API so that Greg can send you the removal patch. Now as for the content of this branch, we have a lot of perf work for power8 new counters including support for our new "nest" counters (also called 24x7) under pHyp (not natively yet). We have new functionality when running under the OPAL firmware (non-virtualized or KVM host), such as access to the firmware error logs and service processor dumps, system parameters and sensors, along with a hwmon driver for the latter. There's also a bunch of bug fixes accross the board, some LE fixes, and a nice set of selftests for validating our various types of copy loops. On the Freescale side, we see mostly new chip/board revisions, some clock updates, better support for machine checks and debug exceptions, etc..." * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (70 commits) powerpc/book3s: Fix CFAR clobbering issue in machine check handler. powerpc/compat: 32-bit little endian machine name is ppcle, not ppc powerpc/le: Big endian arguments for ppc_rtas() powerpc: Use default set of netfilter modules (CONFIG_NETFILTER_ADVANCED=n) powerpc/defconfigs: Enable THP in pseries defconfig powerpc/mm: Make sure a local_irq_disable prevent a parallel THP split powerpc: Rate-limit users spamming kernel log buffer powerpc/perf: Fix handling of L3 events with bank == 1 powerpc/perf/hv_{gpci, 24x7}: Add documentation of device attributes powerpc/perf: Add kconfig option for hypervisor provided counters powerpc/perf: Add support for the hv 24x7 interface powerpc/perf: Add support for the hv gpci (get performance counter info) interface powerpc/perf: Add macros for defining event fields & formats powerpc/perf: Add a shared interface to get gpci version and capabilities powerpc/perf: Add 24x7 interface headers powerpc/perf: Add hv_gpci interface header powerpc: Add hvcalls for 24x7 and gpci (Get Performance Counter Info) sysfs: create bin_attributes under the requested group powerpc/perf: Enable BHRB access for EBB events powerpc/perf: Add BHRB constraint and IFM MMCRA handling for EBB ...
2014-03-24powerpc/powernv: hwmon driver for power values, fan rpm and temperatureShivaprasad G Bhat
This patch adds basic kernel enablement for reading power values, fan speed rpm and temperature values on powernv platforms which will be exported to user space through sysfs interface. Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com> Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-03-20hwmon, via-cputemp: Fix CPU hotplug callback registrationSrivatsa S. Bhat
Subsystems that want to register CPU hotplug callbacks, as well as perform initialization for the CPUs that are already online, often do it as shown below: get_online_cpus(); for_each_online_cpu(cpu) init_cpu(cpu); register_cpu_notifier(&foobar_cpu_notifier); put_online_cpus(); This is wrong, since it is prone to ABBA deadlocks involving the cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently with CPU hotplug operations). Instead, the correct and race-free way of performing the callback registration is: cpu_notifier_register_begin(); for_each_online_cpu(cpu) init_cpu(cpu); /* Note the use of the double underscored version of the API */ __register_cpu_notifier(&foobar_cpu_notifier); cpu_notifier_register_done(); Fix the hwmon via-cputemp code by using this latter form of callback registration. Cc: Jean Delvare <jdelvare@suse.de> Cc: Ingo Molnar <mingo@kernel.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-03-20hwmon, coretemp: Fix CPU hotplug callback registrationSrivatsa S. Bhat
Subsystems that want to register CPU hotplug callbacks, as well as perform initialization for the CPUs that are already online, often do it as shown below: get_online_cpus(); for_each_online_cpu(cpu) init_cpu(cpu); register_cpu_notifier(&foobar_cpu_notifier); put_online_cpus(); This is wrong, since it is prone to ABBA deadlocks involving the cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently with CPU hotplug operations). Instead, the correct and race-free way of performing the callback registration is: cpu_notifier_register_begin(); for_each_online_cpu(cpu) init_cpu(cpu); /* Note the use of the double underscored version of the API */ __register_cpu_notifier(&foobar_cpu_notifier); cpu_notifier_register_done(); Fix the hwmon coretemp code by using this latter form of callback registration. Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Jean Delvare <jdelvare@suse.de> Cc: Ingo Molnar <mingo@kernel.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-03-19hwmon: (pmbus/ltc2978) Add support for LTM4676Guenter Roeck
The chip's programming interface is quite similar to LTC3880 and supports the same set of sensors. Reviewed-by: Robert Coulson <rob.coulson@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-05hwmon: (pmbus/ltc2978) Add new chip ID for LTC2974Guenter Roeck
LTC2974 datasheet revision C lists the chip ID for LTC2974 as 0x0213. Reviewed-by: Robert Coulson <rob.coulson@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: Do not accept invalid name attributesGuenter Roeck
hwmon name attributes must not include '-', as specified in Documentation/hwmon/sysfs-interface. Also filter out spaces, tabs, wildcards, and newline characters. Tested-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (max6639) Use SIMPLE_DEV_PM_OPS macroJingoo Han
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (lm95245) Make temp2_crit_hyst read-onlyGuenter Roeck
The hysteresis register is shared among both temperature sensors. This means changing one also affects the other. To avoid confusion, established way to express this is to make only the first instance writable and keep all other instances as read-only. Otherwise users may be confused that changing the second writable value also affects the first, while it is more obvious that a writable value may affect a different read-only value. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (lm95245) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Simplify code, reduce code size, and attach hwmon attributes to hwmon device. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (lm95245) Drop useless debug messageGuenter Roeck
It doesn't provide value to get a log message whenever the driver updates its cached data, so drop the message. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (lm95245) Fix hysteresis temperaturesGuenter Roeck
Hysteresis temperatures are defined as absolute temperatures, not as delta value from the critical temperatures. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (max6639) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Simplify code, reduce code size, and attach sysfs attricutes to hwmon device. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (max6639) Introduce local dev variable, and reduce noisinessGuenter Roeck
Introduce local variable 'dev' in probe function to make code easier to read. Also drop dev_info message in probe to reduce noisiness during boot. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (max6650) Introduce local 'dev' variableGuenter Roeck
This makes the code a bit easier to read. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (max6650) Drop error message after memory allocation failuresGuenter Roeck
The core code already generates an error message. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (max6650) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Simplify code, reduce code size, and attach sensor attributes to hwmon device. Reviewed-by: Jean Delvare <jdelvare@suse.de> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (max6650) Rearrange code to no longer require forward declarationsGuenter Roeck
Cleanup only; no functional change. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (ltc4215) Convert to devm_hwmon_device_register_with_groupsGuenter Roeck
Simplify code, reduce code size, and attach sysfs attributes to hwmon device. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (coretemp) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck
Simplify code, reduce code size, and attach sysfs attributes to hwmon device. For this driver, the only attribute created is the name attribute. Other attributes are still created and removed dynamically as cores are added or removed. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de> Tested-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (coretemp) Allocate platform data with devm_kzallocGuenter Roeck
This simplifies error handling. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de> Tested-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (coretemp) Use sysfs_create_group to create sysfs attributesGuenter Roeck
Instead of creating each attribute individually, use sysfs_create_group to create all attributes for one core with a single call. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de> Tested-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (ltc4245) Remove devicetree conditionalsGuenter Roeck
Devicetree functions are stubbed out if CONFIG_OF is undefined. Therefore, conditional compilation is unnecessary and can be removed. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (ltc4245) Drop debug messagesGuenter Roeck
The debug messages in this driver have little if any value. Drop them. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (ltc4245) Use device managed function to register hwmon deviceGuenter Roeck
This simplifies the code and reduces code size. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>