Eduardo Valentin [Tue, 19 Mar 2013 14:54:26 +0000 (10:54 -0400)]
staging: ti-soc-thermal: fix condition to apply hyst
While updating talert thresholds, threshold cold must
always be lower than threshold hot. This patch fixes
the function ti_bandgap_update_alert_threshold to only
change the thresholds by applying a hysteresis when
they violate this condition.
Eduardo Valentin [Tue, 19 Mar 2013 14:54:23 +0000 (10:54 -0400)]
staging: ti-soc-thermal: split writable data from readonly data
This patch changes the data structures of this driver so
that readonly data can reside only in the conf pointer.
Now each register has a struct to hold its configuration info,
to be used base on chip version for instance, and a
struct of values to be written, like register shadow and priv data.
Eduardo Valentin [Tue, 19 Mar 2013 14:54:21 +0000 (10:54 -0400)]
staging: ti-soc-thermal: rename symbols to use better prefix
As this driver has been renamed to cope with the chips it
is supposed to support, this patch also changes the symbol
names to use a proper prefix, so it is not suggestive that
this driver supports only OMAP devices.
Andres More [Tue, 19 Mar 2013 01:33:51 +0000 (20:33 -0500)]
staging: vt6656: remove code placeholders
Removed comments from coding template.
sed -i '/^\/\*---/d' drivers/staging/vt6656/*.[ch]
Signed-off-by: Andres More <more.andres@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Removed struct tagS802_11Header, switching to struct ieee80211_hdr instead.
Checkpatch warnings and errors were not resolved.
Signed-off-by: Andres More <more.andres@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andres More [Tue, 19 Mar 2013 01:33:49 +0000 (20:33 -0500)]
staging: vt6656: removed usage of custom Ethernet header
Removed struct tagSEthernetHeader, replacing with struct ethhdr.
Not all checkpatch errors and warnings were removed.
Signed-off-by: Andres More <more.andres@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sachin Kamat [Tue, 19 Mar 2013 06:46:32 +0000 (12:16 +0530)]
staging: ste_rmi4: Make synaptics_rmi4_touchpad_config symbol static
'synaptics_rmi4_touchpad_config' is used only in this file.
Make it static. Silences the following sparse warning:
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:652:5: warning:
symbol 'synaptics_rmi4_touchpad_config' was not declared. Should it be static?
Mirsal Ennaime [Tue, 12 Mar 2013 10:42:02 +0000 (11:42 +0100)]
drivers: android: binder: Use __func__ in debug messages
Debug messages sent in binder_deferred_release begin with
"binder_release:" which is a bit misleading as binder_release is not
directly part of the call stack. Use __func__ instead for debug messages
in binder_deferred_release.
Mirsal Ennaime [Tue, 12 Mar 2013 10:41:59 +0000 (11:41 +0100)]
drivers: android: binder: Move the node release code to a separate function
The binder_deferred_release() function has many levels of indentation
which makes it difficult to read. This patch moves the code which deals
with disposing of a binder node to a separate binder_node_release()
function, thus removing one level of indentation and allowing the code to
fit in 80 columns.
Merge tag 'iio-for-3.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First set of IIO new drivers and cleanup for the 3.10 cycle.
New stuff
1) Add OF support for specifying mappings between iio devices and their
in kernel consumers.
2) Driver for AD7923 (extra functionality and support for ad7904, ad7914 and
ad7924 added later in series)
3) Driver for Exynos adc (dt suppor for phy added later in series).
4) Make iio_push_event save IRQ context - necessary if it is to be used
within an interrupt handler. Users of this functionality to follow.
5) For iio use the device tree node name to provide the hwmon name attribute
if available.
Removal and moves out of staging
1) Drop the adt7410 driver from IIO now that there is a hmwon driver with
equivalent support. This device is very much targeted at hardware
monitoring so hwmon is a more appropriate host for the driver.
2) Move iio_hwmon driver to drivers/hwmon.
Cleanups
1) Minor cleanup in ST common library.
2) Large set of patches to break the info_mask element which previously used
odd and even bits to specify if a channel attribute was either shared across
similar channels or specific to only one. Now we have two bitmaps, one for
those parameters that are specific to this channel and one for those shared
by all channels with the same type as this one. This has no effect on the
userspace abi. It simplifies the core code and provides more space for new
channel parameters. It has been on the todo list for a long time!
Jonathan Cameron [Wed, 20 Mar 2013 22:21:00 +0000 (22:21 +0000)]
hwmon: Move the IIO client driver for hwmon out of staging
This driver uses channel maps, defined either through device tree
or platform data, to create a hwmon driver which acts as a client
for the underlying IIO device channels. Thus a general purpose
IIO adc driver can be used to provide hardware monitoring using a subset
of its channels.
Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Guenter Roeck <linux@roeck-us.net>
--
The only non move changes here concern the description and changes to the
dependencies to IIO explicit and hwmon implicit.
I'm proposing moving this into hwmon on the basis of placing drivers
based on what they provide rather than what their underlying hardware
is.
Guenter Roeck [Wed, 20 Mar 2013 15:52:00 +0000 (15:52 +0000)]
staging/iio: iio_hwmon: Use device tree node name for hwmon name attribute
So far, all instances of iio_hwmon set their hwmon name attribute
to "iio_hwmon", which is not very descriptive. Set it to the device tree
node name if available, and only revert to iio_hwmon otherwise.
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Wanpeng Li [Wed, 13 Mar 2013 07:06:16 +0000 (15:06 +0800)]
zram: fix zram_bvec_read duplicate dump failure message and stat accumulation
When zram decompress fails, the code unnecessarily dumps failure messages and
does stat accumulation in function zram_decompress_page(), this work is already
done in function zram_decompress_page, the patch skips the redundant work.
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Rientjes [Sun, 17 Mar 2013 22:49:10 +0000 (15:49 -0700)]
perf,x86: fix link failure for non-Intel configs
Commit 1d9d8639c063 ("perf,x86: fix kernel crash with PEBS/BTS after
suspend/resume") introduces a link failure since
perf_restore_debug_store() is only defined for CONFIG_CPU_SUP_INTEL:
arch/x86/power/built-in.o: In function `restore_processor_state':
(.text+0x45c): undefined reference to `perf_restore_debug_store'
Fix it by defining the dummy function appropriately.
Signed-off-by: David Rientjes <rientjes@google.com> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Doug Anderson [Wed, 13 Mar 2013 20:40:00 +0000 (20:40 +0000)]
iio: adc: Add dt support for turning on the phy in exynos-adc
Without this change the exynos adc controller needed to have its phy
enabled in some out-of-driver C code. Add support for specifying the
phy enable register by listing it in the reg list.
Signed-off-by: Doug Anderson <dianders@chromium.org> Tested-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Linus Torvalds [Sun, 17 Mar 2013 22:44:43 +0000 (15:44 -0700)]
perf,x86: fix wrmsr_on_cpu() warning on suspend/resume
Commit 1d9d8639c063 ("perf,x86: fix kernel crash with PEBS/BTS after
suspend/resume") fixed a crash when doing PEBS performance profiling
after resuming, but in using init_debug_store_on_cpu() to restore the
DS_AREA mtrr it also resulted in a new WARN_ON() triggering.
init_debug_store_on_cpu() uses "wrmsr_on_cpu()", which in turn uses CPU
cross-calls to do the MSR update. Which is not really valid at the
early resume stage, and the warning is quite reasonable. Now, it all
happens to _work_, for the simple reason that smp_call_function_single()
ends up just doing the call directly on the CPU when the CPU number
matches, but we really should just do the wrmsr() directly instead.
This duplicates the wrmsr() logic, but hopefully we can just remove the
wrmsr_on_cpu() version eventually.
The driver already claims to support scale reporting in its channel spec, but
doesn't actually implement this yet. This patch uses the regulator API to get
the reference voltage and calculates the scale based on that. The patch also
moves the global configuration bits into a field in the ad7923_state struct,
since depending on the RANGE bit, the range goes either from 0 to VREF or from 0
to 2 * VREF. So we need to know the setting of the RANGE bit when calculating
the scale.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Patrick Vasseur <patrick.vasseur@c-s.fr> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
iio: events: Make iio_push_event() IRQ context save
Currently it is not save to call iio_push_event() from hard IRQ context since
the IIO event code uses spin_lock()/spin_unlock() and it is not save to mix
calls to spin_lock()/spin_unlock() from different contexts on the same lock.
E.g. if the lock is being held in iio_event_chrdev_read() and an interrupts
kicks in and the interrupt handler calls iio_push_event() we end uo with a
deadlock.
This patch updates iio_push_event() to use spin_lock_irqsave()/
spin_unlock_irqstrestore(), since it can be called from both IRQ and non-IRQ
context. All other other users of the lock, which are always run in non-IRQ
context, are updated to spin_lock_irq()/spin_unlock_irq().
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>