Age | Commit message (Collapse) | Author |
|
MCP47x6 chip supports selection of a voltage reference (VDD, VREF buffered
or unbuffered). MCP4725 doesn't have this feature thus the eventual setting
is ignored and user is warned.
The setting is stored only in the volatile memory of the chip. You need to
manually store it to the EEPROM of the chip via 'store_eeprom' sysfs entry.
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Number 2 is referencing to the settings with the largest available
resistor.
No functional change.
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add support to STM HTS221 humidity + temperature sensor
http://www.st.com/resource/en/datasheet/hts221.pdf
- continuous mode support
- i2c support
- spi support
- trigger mode support
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Driver was checking for direct mode but not locking it. Use
claim/release helper functions to guarantee the device stays
in direct mode during all raw write operations.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Driver was checking for direct mode but not locking it. Use
claim/release helper functions to guarantee the device stays
in direct mode during required raw read cases.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Now the driver is in a reasonable state, lets get it (finally) out
of staging.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
|
|
Move ISL29018/ISL29023/ISL29035 driver out of staging into mainline.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
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 <amsfield22@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Driver was checking for direct mode but not locking it. Use
claim/release helper functions to guarantee the device stays
in direct mode during all write raw operations.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
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 <amsfield22@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Use a standard framework to get the reference voltage. It is done that way
in the iio subsystem and it will simplify extending of the driver.
Structure mcp4725_platform_data is left undeleted because it used in the
next patch.
This change breaks the current users of the driver, but there is no
mainline user of struct mcp4725_platform_data.
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Change in handling of the regulator description means that static
checkers correctly assume we could be using dereferenced pointer to the
regulator. In reality we will never get the -ENODEV error, as current
behavior flow does not predict it, because:
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.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Crt Mori <cmo@melexis.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
There is a type mismatch between the buffer which is of type s16 and the
samples stored, which are declared as __le16.
Fix the following sparse warning:
drivers/iio/imu/bmi160/bmi160_core.c:411:26: warning: incorrect type
in assignment (different base types)
drivers/iio/imu/bmi160/bmi160_core.c:411:26: expected signed short
[signed] [short] [explicitly-signed] <noident>
drivers/iio/imu/bmi160/bmi160_core.c:411:26: got restricted __le16
[addressable] [usertype] sample
This is a cosmetic-type patch since it does not alter code behaviour.
The le16 is going into a 16bit buf element, and is labelled as IIO_LE in the
channel buffer definition.
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
accelerometer
Add an iio driver for the MiraMEMS DA280 3-axis 14-bit accelerometer, as
well as for the DA226 which is a fully compatible 2-axis version.
Datasheets for the DA280 and DA226 can be found at the manufacturers site:
http://www.miramems.com/en/products.asp?list=1
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
accelerometer
This driver is based on the DA311 Android driver which can be found here:
https://git.matricom.net/Firmware/kernel_amlogic_meson-common/tree/1e70113a5befd07debb68f537156def84c5be57a/drivers/amlogic/input/sensor
the mir3da_* files are the DA311 driver.
Unfortunately there is no datasheet.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add a driver for the Domintech ARD10 3-axis Accelerometer, based on the
android driver found here: https://github.com/domintech/dmard10
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Commit 08e05d1fce5c ("ti-adc081c: Initial triggered buffer support") added
triggered buffer support but that also requires CONFIG_IIO_TRIGGERED_BUFFER,
otherwise we get errors from linker such as:
drivers/built-in.o: In function `adc081c_remove':
drivers/iio/adc/ti-adc081c.c:225: undefined reference to `iio_triggered_buffer_cleanup'
Fix these by explicitly selecting both CONFIG_IIO_TRIGGERED_BUFFER and
CONFIG_IIO_BUFFER in Kconfig for the driver.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here is the big staging and IIO driver pull request for 4.9-rc1.
There are a lot of patches in here, the majority due to the
drivers/staging/greybus/ subsystem being merged in with full
development history that went back a few years, in order to preserve
the work that those developers did over time.
Lots and lots of tiny cleanups happened in the tree as well, due to
the Outreachy application process and lots of other developers showing
up for the first time to clean code up. Along with those changes, we
deleted a wireless driver, and added a raspberrypi driver (currently
marked broken), and lots of new iio drivers.
Overall the tree still shrunk with more lines removed than added,
about 10 thousand lines removed in total. Full details are in the very
long shortlog below.
All of this has been in the linux-next tree with no issues. There will
be some merge problems with other subsystem trees, but those are all
minor problems and shouldn't be hard to work out when they happen
(MAINTAINERS and some lustre build problems with the IB tree)"
And furter from me asking for clarification about greybus:
"Right now there is a phone from Motorola shipping with this code (a
slightly older version, but the same tree), so even though Ara is not
alive in the same form, the functionality is happening. We are working
with the developers of that phone to merge the newer stuff in with
their fork so they can use the upstream version in future versions of
their phone product line.
Toshiba has at least one chip shipping in their catalog that
needs/uses this protocol over a Unipro link, and rumor has it that
there might be more in the future.
There are also other users of the greybus protocols, there is a talk
next week at ELC that shows how it is being used across a network
connection to control a device, and previous ELC talks have showed the
protocol stack being used over USB to drive embedded Linux boards.
I've also talked to some people who are starting to work to add a host
controller driver to control arduinos as the greybus PHY protocols are
very useful to control a serial/i2c/spio/whatever device across a
random physical link, as it is a way to have a self-describing device
be attached to a host without needing manual configuration.
So yes, people are using it, and there is still the chance that it
will show up in a phone/laptop/tablet/whatever from Google in the
future as well, the tech isn't dead, even if the original large phone
project happens to be"
* tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (3703 commits)
Staging: fbtft: Fix bug in fbtft-core
staging: rtl8188eu: fix double unlock error in rtw_resume_process()
staging:r8188eu: remove GEN_MLME_EXT_HANDLER macro
staging:r8188eu: remove GEN_DRV_CMD_HANDLER macro
staging:r8188eu: remove GEN_EVT_CODE macro
staging:r8188eu: remove GEN_CMD_CODE macro
staging:r8188eu: remove pkt_newalloc member of the recv_buf structure
staging:r8188eu: remove rtw_handle_dualmac declaration
staging:r8188eu: remove (RGTRY|BSSID)_(OFT|SZ) macros
staging:r8188eu: change rtl8188e_process_phy_info function argument type
Staging: fsl-mc: Remove blank lines
Staging: fsl-mc: Fix unaligned * in block comments
Staging: comedi: Align the * in block comments
Staging : ks7010 : Fix block comments warninig
Staging: vt6655: Remove explicit NULL comparison using Coccinelle
staging: rtl8188eu: core: rtw_xmit: Use macros instead of constants
staging: rtl8188eu: core: rtw_xmit: Move constant of the right side
staging: dgnc: Fix lines longer than 80 characters
Staging: dgnc: constify attribute_group structures
Staging: most: hdm-dim2: constify attribute_group structures
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here's the "big" char and misc driver update for 4.9-rc1.
Lots of little things here, all over the driver tree for subsystems
that flow through me. Nothing major that I can discern, full details
are in the shortlog.
All have been in the linux-next tree with no reported issues"
* tag 'char-misc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (144 commits)
drivers/misc/hpilo: Changes to support new security states in iLO5 FW
at25: fix debug and error messaging
misc/genwqe: ensure zero initialization
vme: fake: remove unexpected unlock in fake_master_set()
vme: fake: mark symbols static where possible
spmi: pmic-arb: Return an error code if sanity check fails
Drivers: hv: get rid of id in struct vmbus_channel
Drivers: hv: make VMBus bus ids persistent
mcb: Add a dma_device to mcb_device
mcb: Enable PCI bus mastering by default
mei: stop the stall timer worker if not needed
clk: probe common clock drivers earlier
vme: fake: fix build for 64-bit dma_addr_t
ttyprintk: Neaten and simplify printing
mei: me: add kaby point device ids
coresight: tmc: mark symbols static where possible
coresight: perf: deal with error condition properly
Drivers: hv: hv_util: Avoid dynamic allocation in time synch
fpga manager: Add hardware dependency to Zynq driver
Drivers: hv: utils: Support TimeSync version 4.0 protocol samples.
...
|
|
Fixes two cases of 'cast to restricted __le16' as reported by sparse.
Signed-off-by: Ico Doornekamp <ico@pruts.nl>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The ACCES 104-QUAD-8 is a general purpose quadrature encoder
counter/interface board. The 104-QUAD-8 is capable of monitoring the
outputs of eight encoders via four on-board LSI/CSI LS7266R1 24-bit
dual-axis quadrature counter chips. Core functions handled by the
LS7266R1, such as direction and total count, are available.
Performing a write to a counter's IIO_CHAN_INFO_RAW sets the counter and
also clears the counter's respective error flag. Although the counters
have a 25-bit range, only the lower 24 bits may be set, either directly
or via a counter's preset attribute. Interrupts are not supported by
this driver.
This driver adds IIO support for the ACCES 104-QUAD-8 and ACCES
104-QUAD-4. The base port addresses for the devices may be configured
via the base array module parameter.
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Quadrature encoders, such as rotary encoders and linear encoders, are
devices which are capable of encoding the relative position and
direction of motion of a shaft. This patch introduces several IIO
constants for supporting quadrature encoder counter devices.
IIO_COUNT: Current count (main data provided by the counter device)
IIO_INDEX: Counter device index value
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
This patch adds minimal driver for the Honeywell Amplified Basic
Pressure sensors series. Sensors are pretty simple but are
available in many variants:
- psi/mbar/kPa output,
- analog/i2c/spi,
- gage/differential measurement,
- different measure ranges etc.
Refer to datasheets for more details:
http://sensing.honeywell.com/honeywell-sensing-basic-board-mount-pressure-sensors-abp-series-datasheet-323005128-c-en.pdf
http://sensing.honeywell.com/index.php%3Fci_id%3D45841
Driver internals:
- i2c only. measure request is done by the SMBUS QUICK cmd, so if the i2c
bus doesn't support it, it is required to send a dummy byte to trigger
measurement,
- since iio sysfs expects kilopascals, mbar-variants are treated as their
respective kPa-s, hence i2c id-table has doubled entries in one line:
{ "abp060mg", ABP006KG }, { "abp006kg", ABP006KG },
- psi-variants have prescaled values in config,
- no temperature reads yet.
Work remained:
- optional temperature channel,
- SPI support,
- DT binding.
Changes since v1:
- mutex is now locked in read_raw(),
- corrected error codes,
- fixed coding style issues,
- renamed few defines and functions abp -> abp060mg
(some structs left as they were to keep the sensible meaning).
Signed-off-by: Marcin Malagowski <mrc@bourne.st>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Driver was reporting invalid raw read values for MAX6675 on big
endian architectures. MAX6675 buffered mode is not affected, nor
is the MAX31855.
The driver was losing a 2 byte read value when it used a 32 bit
integer buffer to store a 16 bit big endian value. Use big endian
types to properly align buffers on big endian architectures.
Fixes following sparse endianness warnings:
warning: cast to restricted __be16
warning: cast to restricted __be32
Fixes checkpatch issue:
CHECK: No space is necessary after a cast
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Fixes: 1f25ca11d84a ("iio: temperature: add support for Maxim
thermocouple chips")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
restricted __be16
Fix the following sparse endianness warnings:
drivers/iio/magnetometer/ak8975.c:716:16: warning: cast to restricted __le16
drivers/iio/magnetometer/ak8975.c:837:19: warning: cast to restricted __le16
drivers/iio/magnetometer/ak8975.c:838:19: warning: cast to restricted __le16
drivers/iio/magnetometer/ak8975.c:839:19: warning: cast to restricted __le16
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add support for the LMP91000 potentiostat which is used for chemical
sensing applications.
Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Allow IIO_CHAN_INFO_SCALE and IIO_CHAN_INFO_OFFSET attributes for
processing by checking voltage from a regulator.
Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Allow access to underlying channel IIO_CHAN_INFO_OFFSET from a consumer.
Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Fixing below warnings:
drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16
drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16
drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16
drivers/iio/light/max44000.c:217:18: warning: cast to restricted __be16
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add support for the AD7766, AD7766-1, AD7766-2, AD7767, AD7767-1, AD7767-2
Analog to Digital converters. It's a family of single channel 24-bit SAR
ADCs. They are all digital interface compatible and the main difference is
the internal decimation rate and analog performance. For communication with
the host processor a SPI interface is used.
In addition the part has a data ready pin that is pulsed for one MCLK cycle
when a conversion has completed and can be used as a IIO trigger.
Datasheets:
http://www.analog.com/media/en/technical-documentation/data-sheets/AD7766.pdf
http://www.analog.com/media/en/technical-documentation/data-sheets/AD7767.pdf
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Use the new iio_trigger_validate_own_device() to verify that the trigger
can only be attached to the matching IIO device rather than using a custom
variant.
While the implementation of iio_trigger_validate_own_device() and the
custom variant and are not identical their behaviour is.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Use the new iio_trigger_validate_own_device() to verify that the trigger
can only be attached to the matching IIO device rather than using a custom
variant.
While the implementation of iio_trigger_validate_own_device() and the
custom variant and are not identical their behaviour is.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
same device
Some triggers can only be attached to the IIO device that corresponds to
the same physical device. Currently each driver that requires this
implements its own trigger validation function.
Introduce a new helper function called iio_trigger_validate_own_device()
that can be used to do this check. Having a common implementation avoids
code duplication and unnecessary boiler-plate code.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Fixing below warnings:
drivers/iio/dac/ad5592r.c:58:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:58:41: expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:58:41: got restricted __be16 *<noident>
drivers/iio/dac/ad5592r.c:62:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:62:41: expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:62:41: got restricted __be16 *<noident>
drivers/iio/dac/ad5592r.c:92:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:92:41: expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:92:41: got restricted __be16 *<noident>
drivers/iio/dac/ad5592r.c:110:41: warning: incorrect type in argument 2 (different base types)
drivers/iio/dac/ad5592r.c:110:41: expected unsigned short [usertype] *buf
drivers/iio/dac/ad5592r.c:110:41: got restricted __be16 *<noident>
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Fixing below warning:
drivers/iio/adc/max1027.c:241:34: warning: dubious: x | !y .
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Fixes the following sparse warning:
drivers/iio/accel/mma7660.c:42:11: warning:
symbol 'mma7660_nscale' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The -Wempty-body gcc warning triggers in the newly added zpa2326 driver:
drivers/iio/pressure/zpa2326.c: In function 'zpa2326_dequeue_pressure':
drivers/iio/pressure/zpa2326.c:578:3: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
The use of an empty statement behind 'if (...)' is harmless here, but
it shows that the dev_dbg() macro is not used correctly: when the "DEBUG"
macro is not set, dev_dbg() already defaults to a no-operation, though
one that lets the compiler know that the arguments are used, and lets
it check the format string.
Fixing this also simplifies the driver.
Fixes: 03b262f2bbf4 ("iio:pressure: initial zpa2326 barometer support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
light, uv index and proximity sensors
The si114x supports x=1,2,3 IR LEDs for proximity sensing together with
visible and IR ambient light sensing (ALS).
Newer parts (si1132, si1145/6/7) can measure UV light and compute an UV
index
This was tested on si1143 and si1145
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Introduce driver for Murata ZPA2326 pressure and temperature sensor:
http://www.murata.com/en-us/products/productdetail?partno=ZPA2326-0311A-R
Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add an IIO driver for the mCube MC3230 3-axis accelerometer.
A datasheet for the mCube MC3230 can be found here:
http://www.mcubemems.com/wp-content/uploads/2014/10/MC3230_2-Datasheet-APS-048-0007v1.6.pdf
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add missing MODULE_DEVICE_TABLE(i2c) this fixes autoloading on
devicetree using systems.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Check for iio_info structures that are only stored in the info field of a
iio_dev structure. This field is declared const, so iio_info structures
that have this property can be declared as const also.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct iio_info i@p = { ... };
@ok@
identifier r.i;
struct iio_dev e;
position p;
@@
e.info = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct iio_info e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct iio_info i = { ... };
// </smpl>
The result of size on this file before the change is:
text data bss dec hex filename
1245 344 0 1589 635
drivers/iio/gyro/ssp_gyro_sensor.o
and after the change it is:
text data bss dec hex filename
1397 192 0 1589 635
drivers/iio/gyro/ssp_gyro_sensor.o
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Check for iio_info structures that are only stored in the info field of a
iio_dev structure. This field is declared const, so iio_info structures
that have this property can be declared as const also.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct iio_info i@p = { ... };
@ok@
identifier r.i;
struct iio_dev e;
position p;
@@
e.info = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct iio_info e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct iio_info i = { ... };
// </smpl>
The result of size on this file before the change is:
text data bss dec hex filename
1529 312 0 1841 731
drivers/iio/adc/men_z188_adc.o
and after the change it is:
text data bss dec hex filename
1689 168 0 1857 741
drivers/iio/adc/men_z188_adc.o
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Check for iio_info structures that are only stored in the info field of a
iio_dev structure. This field is declared const, so iio_info structures
that have this property can be declared as const also.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct iio_info i@p = { ... };
@ok@
identifier r.i;
struct iio_dev e;
position p;
@@
e.info = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct iio_info e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct iio_info i = { ... };
// </smpl>
The result of size on this file before the change is:
text data bss dec hex filename
1265 344 0 1609 649
drivers/iio/accel/ssp_accel_sensor.o
and after the change it is:
text data bss dec hex filename
1425 192 0 1617 651
drivers/iio/accel/ssp_accel_sensor.o
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
This adds support for the mounting matrix to the KXSD9 driver.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
This deploys runtime and system PM in the KXSD9 driver:
- Use the force_runtime_suspend/resume callbacks as system PM
operations.
- Add buffer prepare/unprepare callbacks to grab the runtime
PM while we're using buffered reads and put get/put_autosuspend
in these.
- Insert get/put_autosuspend calls anywhere the IO is used from
the raw read/write callbacks.
- Move the fullscale setting to be cached in the state container
so we can restore it properly when coming back from
system/runtime suspend.
- Set the autosuspend delay to two orders of magnitude that of
the sensor start-up time (20ms) so we will autosuspend after
2s.
- Register the callbacks in both the SPI and I2C subdrivers.
Tested with the I2C KXSD9 on the Qualcomm APQ8060 Dragonboard.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
What is passed to the .probe() and .remove() functions is
technically the parent of the created IIO device but it becomes
a big confusion for the head to have it named like this since
it is usually clear from context the "dev" refers to the physical
device, and when next adding PM callbacks a clean
"struct device *dev" pointer is passed to these and that makes
it even more confused. Rename "parent" to "dev" like in most
other drivers.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
This adds supply regulator handling for the VDD and IOVDD inputs
on the KXSD9 component, makes sure to bring the regulators online
during probe and disable them on remove or the errorpath.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
There are some hardcoded register values etc in the code, define
proper bitfield definitions, and use them when getting and setting
the scale. Optimize a read/modify/write to use regmap_update_bits()
at the same time.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|