30 Aug, 2016
12 commits
-
Replace my previous employer address.
Signed-off-by: Vlad Dogaru
Signed-off-by: Jonathan Cameron -
We get 2 warnings when biuld kernel with W=1:
drivers/iio/common/st_sensors/st_sensors_trigger.c:69:13: warning: no previous prototype
for 'st_sensors_irq_handler' [-Wmissing-prototypes]
drivers/iio/common/st_sensors/st_sensors_trigger.c:85:13: warning: no previous prototype
for 'st_sensors_irq_thread' [-Wmissing-prototypes]In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.Signed-off-by: Baoyou Xie
Reviewed-by: Linus Walleij
Signed-off-by: Jonathan Cameron -
Remove .owner field if calls are used which set it automatically.
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Wei Yongjun
Acked-by: Linus Walleij
Signed-off-by: Jonathan Cameron -
The ak8974_configure() function is used only from the PM code,
but that can be hidden when CONFIG_PM is disabled:drivers/iio/magnetometer/ak8974.c:201:12: error: 'ak8974_configure' defined but not used [-Werror=unused-function]
This replaces the #ifdef with a __maybe_unused annotation, which
will work correctly in all configurations and avoid the warning,
as the compiler can now see where ak8974_configure is called from.Signed-off-by: Arnd Bergmann
Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974")
Signed-off-by: Jonathan Cameron -
A small rework of the PM code in this driver introduced a harmless
warning when CONFIG_PM_SLEEP is not set:drivers/iio/common/hid-sensors/hid-sensor-trigger.c:212:12: error: 'hid_sensor_resume' defined but not used [-Werror=unused-function]
This removes the #ifdef and instead marks all three PM functions
as __maybe_unused, which covers all possible cases and is harder
to get wrong.Signed-off-by: Arnd Bergmann
Fixes: 7f6cf7414538 ("iio: hid-sensors: use asynchronous resume")
Signed-off-by: Jonathan Cameron -
When terminating for_each_child_of_node() iteration with
break or return, of_node_put() should be used to prevent
stale device node references from being left behind.This is detected by Coccinelle semantic patch.
Signed-off-by: Wei Yongjun
Signed-off-by: Jonathan Cameron -
Fixes the following sparse warnings:
drivers/iio/temperature/maxim_thermocouple.c:35:28: warning:
symbol 'max6675_channels' was not declared. Should it be static?
drivers/iio/temperature/maxim_thermocouple.c:52:28: warning:
symbol 'max31855_channels' was not declared. Should it be static?
drivers/iio/temperature/maxim_thermocouple.c:98:38: warning:
symbol 'maxim_thermocouple_chips' was not declared. Should it be static?Signed-off-by: Wei Yongjun
Reviewed-By: Matt Ranostay
Signed-off-by: Jonathan Cameron -
These sensors all have Vdd and Vdd_IO lines. This means the
supplies are *not* optional (optional means that the supply is
optional in the electrical sense, not the software sense)
so we need to get the and enable them at all times.If the device tree or board file does not define suitable
regulators for the component, it will be substituted by a
dummy regulator, or, if regulators are disabled altogether,
by stubs. There is no need to use the IS_ERR_OR_NULL() check
that is considered harmful.Cc: Giuseppe Barba
Cc: Denis Ciocca
Cc: Crestez Dan Leonard
Cc: Gregor Boirie
Cc: Mark Brown
Signed-off-by: Linus Walleij
Signed-off-by: Jonathan Cameron -
Add support for Analog Devices AD8801/AD8803, 8 channels 8bits, Digital to
Analog converters.Signed-off-by: Gwenhael Goavec-Merou
Signed-off-by: Jonathan Cameron -
Signed-off-by: Matt Ranostay
Signed-off-by: Jonathan Cameron -
Add support the VZ89TE variant which removes the voc_short channel,
and has CRC check for data transactions.Signed-off-by: Matt Ranostay
Signed-off-by: Jonathan Cameron -
Abstract chip configuration data to allow supporting multiple variants
of the VZ89 chemical sensor line.Signed-off-by: Matt Ranostay
Signed-off-by: Jonathan Cameron
29 Aug, 2016
4 commits
-
Adds basic support for the LTC2485 ADC - a delta-sigma analog-to-digital
converter with an I2C interface that operates in single shot conversion
mode.The driver supports an on board 5V reference and the power-on default
configuration which rejects both 50hz & 60hz line frequencies and
operates in 1x speed mode.Signed-off-by: Alison Schofield
Cc: Daniel Baluta
Signed-off-by: Jonathan Cameron -
fix checkpatch.pl warning about 'Statements should start on a
tabstop'Signed-off-by: Clifton Barnes
Signed-off-by: Jonathan Cameron -
Now there are channel modifiers with their own scaling those should be
used when possible over the generic channel type scaling.Examples are of IIO_TEMP channel having a generic scaling value, and
another having IIO_MOD_TEMP_AMBIENT modifier with another scaling value.Previously the first scaling value for a channel type would be applied
to all channels of like type in iio_generic_bufferSigned-off-by: Matt Ranostay
Signed-off-by: Jonathan Cameron -
The comparison for devnr limits is off-by-one, the current check
allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact
0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds
write to pdata->dac[devnr]. Fix this by replacing > with >= on the
comparison.Signed-off-by: Colin Ian King
Fixes: c947459979c6 ("iio: ad5755: add support for dt bindings")
Signed-off-by: Jonathan Cameron
24 Aug, 2016
1 commit
-
…iio into work-testing
Jonathan writes:
First round of new features, device support and cleanups for IIO in the 4.9 cycle.
Device support
* ak8974
- New driver and bindings for this 2009 vintage magnetometer (it was very
popular back then!)
* atlas-ph-sensor
- ORP sensor support(I had to look up what one of these was)
* cio-dac
- New driver for Measurement Computing DAC boards
* dmard06
- New driver for Domintech DMARDO6 accelerometer. Also vendor prefix.
* dmard09
- New driver for Domintech DMARD09 accelerometer.
* maxim-thermocouple
- max6675 and max31855 new driver
* mt6577 auxdac
- new driver for this Mediatek chip mt2701, mt6577 and mt8173 have this
hardware.
* ti-adc161s626
- new driver for this TI single channel differential ADC.
* vcnl4000
- support vcnl4010 and vcnl4020 which are compatible for all features
currently supported by this driver.New features
* Core
- Allow retrieving of underlying iio_dev from a callback buffer handle.
This is needed to allow client drivers to perform operations such as
configuring the trigger used.
* hid-sensors
- asynchronous resume support to avoid really long resume times.
* kxcjk-1013
- add the mysterious KIOX000A ACPI id seen in the wild.
* Tools
- lsiio now enumerates processed as well as raw channels.Cleanup
* ad7298
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* ad7793
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* ade7854
- checkpatch fixups (alignment of parameters)
* atlas-ph-sensor
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
- Switch to REGCACHE_NONE as there are no useful register to cache.
* bma180
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* hdc100x
- Add mention of the HDC1000 and HDC1008 to the Kconfig help text.
* isl29018
- Add driver specific prefixes to defines and function names.
- Remove excessive logging.
- Drop newlines which add nothing to readability.
- General tidying up of comments.
- Drop I2C_CLASS_HWMON as irrelevant to driver.
* isl29028
- Add driver specific prefixes to defines, enums and function names.
- Drop comma's from available attribute output as not ABI compliant.
- Drop I2C_CLASS_HWMON as irrelevant to driver.
* kxsd9
- devicetree bindings.
* mag3110
- This one wasn't locking to protect against mode switches during
raw_reads. Use the iio_claim_direct_mode function to fix this buglet.
* maxim-theromcouple
- Fix missing selects for triggered buffer support in Kconfig.
* nau7802
- Use complete instead of complete_all as only one completion at a time.
* sx9500
- Use complete instead of complete_all as only one completion at a time.
* us5182d
- Add a missing error code asignment instead of checking the result of
an already checked statement.
* vcnl4000
- Use BIT macro where appropriate.
- Refactor return codes in read_raw callback.
- Add some missing locking for concurrent accesses to the device.
23 Aug, 2016
2 commits
-
This patch is needed to clean up the initialized ida structure in case
the function exits with an exception.Signed-off-by: Christian Gromm
Signed-off-by: Greg Kroah-Hartman -
The function mdc_adjust_dirpages is only called on platforms which
don't have pages 4K in size which is why kbuild only reported this
for platforms like the Alpha. The problem was a typo in ordering of
variables in the beginning of a while loop. We were accessing the
dp pointer before it was kmapped.Signed-off-by: James Simmons
Reviewed-by: Andreas Dilger
Signed-off-by: Greg Kroah-Hartman
22 Aug, 2016
21 commits
-
cp_error member is not really set anywhere, so kill
it and the only printing user of it too.Signed-off-by: Oleg Drokin
Signed-off-by: Greg Kroah-Hartman -
This patch fixes most of checkpatch occurences of
"CHECK: Alignment should match open parenthesis"
in Lustre code.Signed-off-by: Emoly Liu
Signed-off-by: Oleg Drokin
Signed-off-by: Greg Kroah-Hartman -
This patch fixes all checkpatch occurences of
"CHECK: spaces preferred around that '{+,-,*,/,|,<>,&}' (ctx:VxV)"
in Lustre code.Signed-off-by: Emoly Liu
Signed-off-by: Oleg Drokin
Signed-off-by: Greg Kroah-Hartman -
This accelerometer can be probed from the device tree, so it needs
to have proper documentation of it's device tree bindings.Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij
Acked-by: Rob Herring
Signed-off-by: Jonathan Cameron -
Some platforms power off sensor hubs during S3 suspend, which will require
longer time to resume. This hurts system resume time, so resume
asynchronously.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
Add Mediatek auxadc driver based on iio.
It will register a device in iio and support iio.
So thermal can read auxadc channel to sample data by iio device.
It is tested successfully on mt2701 platform.
Mt8173 and mt6577 platforms are not tested.
But the expectation is compatible.Signed-off-by: Zhiyong Tao
Signed-off-by: Jonathan Cameron -
The commit adds the device tree binding documentation for the mediatek
auxadc found on Mediatek MT2701.
Thermal gets auxadc sample data by iio device.
So the commit changes auxadc device tree binding documentation from
/soc/mediatek/auxadc.txt to /iio/adc/mt6577_auxadc.txt.Acked-by: Rob Herring
Signed-off-by: Zhiyong Tao
Signed-off-by: Jonathan Cameron -
Select IIO_BUFFER and IIO_TRIGGERED_BUFFER to compile maxim_thermocouple.
Signed-off-by: Alison Schofield
Cc: Daniel Baluta
Signed-off-by: Jonathan Cameron -
Driver was checking for direct mode but not locking it. Use
claim/release helper functions to guarantee the device stays
in direct mode during raw reads.Signed-off-by: Alison Schofield
Cc: Daniel Baluta
Signed-off-by: Jonathan Cameron -
This patch fixes a minor checkpatch warning:
"WARNING: Prefer 'unsigned int' to bare use of 'unsigned'"
Signed-off-by: Louie Lu
Signed-off-by: Greg Kroah-Hartman -
mg_get_local_EKB and mg_get_ICV used to return with an error code before
releasing all resources. This patch add a jump to the appropriate label
ensuring that the resources are properly released before returning.This issue was found with Hector.
Signed-off-by: Quentin Lambert
Signed-off-by: Greg Kroah-Hartman -
This patch changes label names using camel case to snake case as well as giving
a new name representing what will be done after the label.Signed-off-by: Quentin Lambert
Signed-off-by: Greg Kroah-Hartman -
This is a patch for double blank lines and a missing blank line reported
by checkpatch.plSigned-off-by: Jonas Rickert
Signed-off-by: Greg Kroah-Hartman -
Fixed spaces around operators to fix their coding style issues.
Signed-off-by: Shiva Kerdel
Signed-off-by: Greg Kroah-Hartman -
BT_Active and BT_State are being masked with 0x00ffffff so it the subsequent
comparisons with 0xffffffff are therefore a buggy check. Instead, check them
against 0x00ffffff.Unfortunately I couldn't find a datasheet or hardware to see if 0xffffffff
is an expected invalid bit pattern that should be checked before BT_Active and
BT_State are masked with 0x00ffffff, so for now, this fix seems like the least
risky approach.Signed-off-by: Colin Ian King
Signed-off-by: Greg Kroah-Hartman -
The Kconfig currently controlling compilation of this code is:
config FSL_MC_BUS
bool "Freescale Management Complex (MC) bus driver"...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.Since the code was already not using module_init, we don't have to change
the initcall and the init ordering remains unchanged with this commit.We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.We don't replace module.h with init.h since the file does make some
references to "struct *module" for processing other modules.Cc: "J. German Rivera"
Cc: Greg Kroah-Hartman
Cc: devel@driverdev.osuosl.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Greg Kroah-Hartman -
Add a helper macro to return if a device has a bus type of fsl_mc.
This makes the bus driver code more readable and provides a way for
drivers like the SMMU driver to easily check the bus type.Signed-off-by: Nipun Gupta
Signed-off-by: Bharat Bhushan
Acked-by: Stuart Yoder
Signed-off-by: Greg Kroah-Hartman -
The semaphores xmit_sema, terminate_xmitthread_sema, tx_retevt and
io_req have no users, hence remove all references to them.
Semaphores are going away in the future.Signed-off-by: Binoy Jayan
Reviewed-by: Arnd Bergmann
Signed-off-by: Greg Kroah-Hartman -
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should
be written as one. Semaphores are going away in the future.Signed-off-by: Binoy Jayan
Reviewed-by: Arnd Bergmann
Signed-off-by: Greg Kroah-Hartman -
Commit fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu:
Remove rtw_zmalloc(), wrapper for kzalloc()") changed all allocation
calls to be GFP_KERNEL even though the original wrapper was testing
to determine if the caller was in atomic mode. Most of the mistakes
were corrected with commit 33dc85c3c667209c930b2dac5ccbc2a365e06b7a
("staging: r8188eu: Fix scheduling while atomic error introduced in
commit fadbe0cd"); however, two kzalloc calls were missed as the
call only happens when the driver is shutting down.Fixes: fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu: Remove rtw_zmalloc(), wrapper for kzalloc()")
Signed-off-by: Larry Finger
Cc: navin patidar
Signed-off-by: Greg Kroah-Hartman -
When this driver preallocates some SKBs, kmemleak is unable to find that
allocated memory when it scans. When the driver is unloaded, that memory
is released; therefore, the report is a false positive.Signed-off-by: Larry Finger
Signed-off-by: Greg Kroah-Hartman