Cristina Moraru [Sun, 7 Feb 2016 22:21:48 +0000 (00:21 +0200)]
iio: hmc5843: Swap suspend and resume implementations
Swap implementations of hmc5843_common_suspend and
hmc5843_common_resume functions for they have been
inversed. Device should go on SLEEP mode on suspend
and on CONTINUOUS mode on resume.
Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The AD7193 is mostly register map compatible to the AD7192. The main
difference is that it has 8 instead of 4 inputs, so the way the input
channels are selected is slightly different.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
iio: buffer-dmaengine: Use dmaengine_terminate_sync()
The DMAengine framework gained support for synchronized transfer
termination. Use the new dmaengine_terminate_sync() function instead of
dmaengine_terminate_all(), this avoids a potential race condition when
disabling the buffer.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
iio:ad5064: Add AD5625/AD5627/AD5645/AD5647/AD4665/AD5657 support
The AD5625/AD5645/AD5665 are a family of 4 channel DACs with 12-bit, 14-bit
and 16-bit precision respectively. The devices come in 3 flavors in terms
of built-in reference, either no built-in reference, built-in 1.25V
reference or built-in 2.5V reference.
The AD5627/AD5647/AD5667 are similar to the AD5625/AD5645/AD5665 except
that they have 2 instead of 4 channels.
While these new devices are mostly register map compatible with the
existing devices support by the driver some offsets and register addresses
have been shuffled around. To accommodate this introduce a new register map
layout. For the lack of a better name we will just call it version 2.
iio:ad5064: Use a enum for the register map layout type
Currently the ad5064 only supports two different register map variations
and this is represented by a bool. This patch changes since to a enum so
we can support more variations in the future.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Marc Andre [Mon, 8 Feb 2016 17:01:47 +0000 (18:01 +0100)]
iio:ad5064: Add support for ltc2617 and similar devices
The Linear Technology LTC2606, LTC2607, LTC2609, LTC2616, LTC2617,
LTC2619, LTC2626, LTC2627 and LTC2629 devices are very similar
to the AD5064 device.
Signed-off-by: Marc Andre <marc.andre@netline.ch> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Marc Andre [Mon, 8 Feb 2016 17:01:46 +0000 (18:01 +0100)]
iio:ad5064: Structural changes to support LTC2617
This patch makes minor structural changes to support specifics
for LTC2617 DAC. This DAC requires different handling of the
power down modes. The configuration to actually support the
DAC will be submitted in a secondary patch.
Adjust the DECLARE_AD5064_CHANNELS() macro to accept a new
ext_info parameter. This allows to use different power down
modes per DAC. (e.g. DAC only support 90kohm to ground)
Add the chip_info parameter "powerdown_ltc". This parameter is
used in the ad5064_sync_powerdown_mode() function to handle the
power down command for LTC diffently. For those devices the
power down command must be addressed to the channel.
Signed-off-by: Marc Andre <marc.andre@netline.ch> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Andrew F. Davis [Sat, 6 Feb 2016 19:35:21 +0000 (13:35 -0600)]
iio: health: Add driver for the TI AFE4403 heart monitor
Add driver for the TI AFE4403 heart rate monitor and pulse oximeter.
This device detects reflected LED light fluctuations and presents an ADC
value to the user space for further signal processing.
Data sheet located here:
http://www.ti.com/product/AFE4403/datasheet
Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Andrew F. Davis [Tue, 2 Feb 2016 17:50:44 +0000 (11:50 -0600)]
iio: health: Add driver for the TI AFE4404 heart monitor
Add driver for the TI AFE4404 heart rate monitor and pulse oximeter.
This device detects reflected LED light fluctuations and presents an ADC
value to the user space for further signal processing.
staging: iio: replace clk_get() with devm_clk_get()
This patch replaces the clk_get() with devm_clk_get().Accordingly,modified
the error paths,rename error labels and removed clk_put() in probe() &
remove functions.
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Chaehyun Lim [Mon, 1 Feb 2016 12:26:47 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: remove debug message of kmalloc failure
There is no need to print debug message when kmalloc is failed.
This message is redundant. The code already show us that kmalloc is
failed. The braces of first if statement is remove as well because if
statement has a single statement.
Chaehyun Lim [Mon, 1 Feb 2016 12:26:45 +0000 (21:26 +0900)]
staging: wilc1000: linux_mon: fix coding style of kmalloc usage
This patch fixes coding style of kmalloc usage found by checkpatch.pl
CHECK: Prefer kmalloc(sizeof(*mgmt_tx)...) over kmalloc(sizeof(struct
tx_complete_mon_data)...)
This patch fixes NULL comparsion style found by checkpatch.pl
CHECK: Comparison to NULL could be written "!wilc_wfi_mon"
CHECK: Comparison to NULL could be written "!skb"
CHECK: Comparison to NULL could be written "!skb"
CHECK: Comparison to NULL could be written "!dev"
CHECK: Comparison to NULL could be written "!mgmt_tx"
CHECK: Comparison to NULL could be written "!mgmt_tx->buff"
CHECK: Comparison to NULL could be written "!wilc_wfi_mon"
CHECK: Comparison to NULL could be written "!mon_priv"
CHECK: Comparison to NULL could be written "!priv"
CHECK: Comparison to NULL could be written "wilc_wfi_mon"
There are over-commenting in the coreconfigurator.c file and most of them
are not helpful to explain what the code does and generate 80 ending
line over warnings. So, all of comments are removed in this patch and the
comments will later be added if necessary with the preferred Linux style.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Null checking wilc_netdev and skb->dev are already done in the begining of the
function and they are just print printing error log, so delete them.
Null checking wilc is needed before is used so add null ckeck before it is
used.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 25 Jan 2016 07:35:17 +0000 (16:35 +0900)]
staging: wilc1000: change_virtual_intf: change codes for unified firmware
In previous patch, we use unified firmware on wilc, which means we do not need
to download firmware again to change virtual interfaces.
There are a lot of codes to change interface and they are needless now, so
remove them except wilc_set_operation_mode function which change the mode and
wilc_set_power_mgmt which control power save.
There will be unused functions and they will be removed in later patch.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 25 Jan 2016 07:35:15 +0000 (16:35 +0900)]
staging: wilc1000: set bssid with mode
This patch add new argument mode to wilc_wlan_set_bssid and define mode in
struct wilc_vif also. The mode is used by get_if_handler function to get proper
netdevice for each mode.
The get_if_handler is changed together. Remove invalid handle codes and
add mode condition to get netdevice for the mode.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
wilc_set_machw_change_vir_if is not used anymore since we use one unified
firmware. Instead, wilc_set_operation_mode is called when wilc_mac_open to
let the wilc use the proper firmware. Remove wilc_set_machw_change_vir_if
and it's functions calls.
In the later patch, mac index will be passed to wilc device.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 25 Jan 2016 07:35:08 +0000 (16:35 +0900)]
staging: wilc1000: add sdio resume/suspend
This patch introduces sdio device suspend and resume functionality. sdio_reset
function is added to reset sdio. Remove static inline keyword from
chip_allow_sleep and chip_wakeup, and export symbols.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 25 Jan 2016 07:35:07 +0000 (16:35 +0900)]
staging: wilc1000: support suspend/resume functionality
wilc supports suspend/resume functionality. Introduce new sleep and wakeup
functions and remove old codes since that will be handled in the new functions.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 25 Jan 2016 07:35:05 +0000 (16:35 +0900)]
staging: wilc1000: fix bug when changing virtual interface
This patch fixes a bug connection error when changing virtual interface to p2p.
Variable quit needs to be set 0 when wilc is reinitialized again.
Fixes : 67e2a07ed800 ("staging: wilc1000: move all of wilc_wlan_dev_t to struct wilc") Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 21 Jan 2016 11:30:57 +0000 (20:30 +0900)]
staging: wilc1000: remove over-commenting
There are over-commenting in wilc_msgqueue.h file. This comment is not
explain exactly what codes do and make checkpatch warning about "line
over 80 charcters". If necessary, comment will be added later with
preferred coding style.
Chaehyun Lim [Thu, 21 Jan 2016 11:30:49 +0000 (20:30 +0900)]
staging: wilc1000: fix return error code
Three argument are checked at the beginning of wilc_mq_send whether
they are valid arguments or not. It is correct to use return error code
as -EINVAL, not -EFAULT.
Chaehyun Lim [Wed, 20 Jan 2016 07:44:57 +0000 (16:44 +0900)]
staging: wilc1000: remove redundant check in wilc_mq_recv
At the beginning of wilc_mq_recv, it is checked if pHandle->bExiting is
false or true. There is no need to check it again at the middle of this
function. So just remove it.
Arnd Bergmann [Wed, 13 Jan 2016 14:36:17 +0000 (15:36 +0100)]
staging: wilc1000: remove extraneous variable
Building wilc1000 with clang currently fails in the staging-next branch:
drivers/staging/wilc1000/wilc_spi.c:123:34: warning: tentative definition of variable with internal linkage has incomplete non-array type 'const struct wilc1000_ops' [-Wtentative-definition-incomplete-type]
static const struct wilc1000_ops wilc1000_spi_ops;
The reason is that wilc1000_ops was left behind after a recent cleanup,
and is completely unused and also uninitialized and const and has an
incomplete type.
Removing the variable is obviously correct, and gets rid of the warning.
No idea why gcc does not complain about it though.
Chaehyun Lim [Tue, 5 Jan 2016 14:06:57 +0000 (23:06 +0900)]
staging: wilc1000: fix return type of wilc_init
This patch changes return type of wilc_init from s32 to int.
The error code as -ENOMEM or -EFAULT is returned in the wilc_init.
It is better to use return type of int in this function, not s32.
Chaehyun Lim [Tue, 5 Jan 2016 14:06:56 +0000 (23:06 +0900)]
staging: wilc1000: rename phWFIDrv in wilc_init declaration
The second argument name is different between wilc_init declaration and
definition. This patch renames phWFIDrv to hif_drv_handler to match
argument name.