- 17 3月, 2014 2 次提交
-
-
由 Sebastian Reichel 提交于
Add iio_read_channel_average_raw to support reading averaged raw values in consumer drivers. Signed-off-by: NSebastian Reichel <sre@debian.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Matt Ranostay 提交于
AS3935 chipset can detect lightning strikes and reports those back as events and the estimated distance to the storm. Signed-off-by: NMatt Ranostay <mranostay@gmail.com> Reviewed-by: NMarek Vasut <marex@denx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 15 3月, 2014 1 次提交
-
-
由 Kees Cook 提交于
This is a tiny preventative measure to make sure we can't write beyond PAGE_SIZE on the buffers being used in sysfs for iio. There is currently no way for this to happen, but the change makes this code more robust for the future. Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 03 3月, 2014 1 次提交
-
-
由 Jonathan Cameron 提交于
Issue highlighted by smatch warning: CHECK drivers/iio/adc/vf610_adc.c drivers/iio/adc/vf610_adc.c:466 vf610_read_raw() warn: unsigned 'ret' is never less than zero. As wait_for_completion_interruptible_timeout can return -ERESTARTSTSYS, if interrupted, ret must be signed. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Acked-by: NFugang Duan <B38611@freescale.com>
-
- 02 3月, 2014 1 次提交
-
-
由 Lars-Peter Clausen 提交于
The Xilinx XADC is a ADC that can be found in the series 7 FPGAs from Xilinx. The XADC has a DRP interface for communication. Currently two different frontends for the DRP interface exist. One that is only available on the ZYNQ family as a hardmacro in the SoC portion of the ZYNQ. The other one is available on all series 7 platforms and is a softmacro with a AXI interface. This driver supports both interfaces and internally has a small abstraction layer that hides the specifics of these interfaces from the main driver logic. The ADC has a couple of internal channels which are used for voltage and temperature monitoring of the FPGA as well as one primary and up to 16 channels auxiliary channels for measuring external voltages. The external auxiliary channels can either be directly connected each to one physical pin on the FPGA or they can make use of an external multiplexer which is responsible for multiplexing the external signals onto one pair of physical pins. The voltage and temperature monitoring channels also have an event capability which allows to generate a interrupt when their value falls below or raises above a set threshold. Buffered sampling mode is supported by the driver, but only for AXI-XADC since the ZYNQ XADC interface does not have capabilities for supporting buffer mode (no end-of-conversion interrupt). If buffered mode is supported the driver will register two triggers. One "xadc-samplerate" trigger which will generate samples with the configured samplerate. And one "xadc-convst" trigger which will generate one sample each time the CONVST (conversion start) signal is asserted. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 26 2月, 2014 1 次提交
-
-
由 Peter Meerwald 提交于
drivers/iio/magnetometer/mag3110.c:197 mag3110_read_raw() info: ignoring unreachable code. drivers/iio/magnetometer/mag3110.c 185 case IIO_CHAN_INFO_SCALE: 186 switch (chan->type) { 187 case IIO_MAGN: 188 *val = 0; 189 *val2 = 1000; 190 return IIO_VAL_INT_PLUS_MICRO; 191 case IIO_TEMP: 192 *val = 1000; 193 return IIO_VAL_INT; 194 default: 195 return -EINVAL; 196 } 197 return IIO_VAL_INT_PLUS_MICRO; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ introduced by f9279d3a, mag3110: Scale factor missing Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 23 2月, 2014 1 次提交
-
-
由 Lars-Peter Clausen 提交于
The event code currently holds a spinlock with IRQs disabled while calling kfifo_to_user(). kfifo_to_user() can generate a page fault though, which means we have to be able to sleep, which is not possible if the interrupts are disabled. The good thing is that kfifo handles concurrent read and write access just fine as long as there is only one reader and one writer, so we do not any locking to protect against concurrent access from the read and writer thread. It is possible though that userspace is trying to read from the event FIFO from multiple concurrent threads, so we need to add locking to protect against this. This is done using a mutex. The mutex will only protect the kfifo_to_user() call, it will not protect the waitqueue. This means that multiple threads can be waiting for new data and once a new event is added to the FIFO all waiting threads will be woken up. If one of those threads is unable to read any data (because another thread already read all the data) it will go back to sleep. The only remaining issue is that now that the clearing of the BUSY flag and the emptying of the FIFO does no longer happen in one atomic step it is possible that a event is added to the FIFO after it has been emptied and this sample will be visible the next time a new event file descriptor is created. To avoid this rather move the emptying of the FIFO from iio_event_chrdev_release to iio_event_getfd(). Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 22 2月, 2014 3 次提交
-
-
由 Denis CIOCCA 提交于
This patch adds support for the new barometer sensor: LPS25H. Signed-off-by: NDenis Ciocca <denis.ciocca@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Archana Patni 提交于
Added usage id processing for Pressure Sensor. This uses IIO interfaces for triggered buffer to present data to user mode. This uses HID sensor framework for registering callback events from the sensor hub. Signed-off-by: NArchana Patni <archana.patni@intel.com> Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Archana Patni 提交于
Added usage id processing for Proximity (Human Presence). This uses IIO interfaces for triggered buffer to present data to user mode. This uses HID sensor framework for registering callback events from the sensor hub. Signed-off-by: NArchana Patni <archana.patni@intel.com> Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 18 2月, 2014 7 次提交
-
-
由 Lars-Peter Clausen 提交于
name_format already contains the final name and no format characters. So the code basically reads: dev_attr->attr.name = kstrdup(GFP_KERNEL, name_format); if (dev_attr->attr.name == NULL) ... kfree(name_format); Which means we can save one alloc and free pair per attribute name if we directly assign name_format to dev_attr->attr.name. The patch also renames name_format to name to denote that this is indeed the final name and has no format characters in it. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lars-Peter Clausen 提交于
The extended name is channel specific and should not be included in shared attributes. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Denis CIOCCA 提交于
The driver was not able to manage the sensor: during probe function and wai check, the driver stops and writes: "device name and WhoAmI mismatch." The correct value of L3GD20H wai is 0xd7 instead of 0xd4. Dropped support for the sensor. Signed-off-by: NDenis Ciocca <denis.ciocca@st.com> Cc: stable@vger.kernel.org Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Beomho Seo 提交于
Integration time of cm32181 is guessed about milliseconds. But cm32181_read_als_it function return IIO_VAL_INT. So fixed to return IIO_VAL_INT_PLUS_MICRO. Next, add .write_raw_get_fmt callback function for call iio_str_to_fixpoint. v2: cm32181_write_als_id function fixed as it was. Cc: Kevin Tsai <ktsai@capellamicro.com> Signed-off-by: NBeomho Seo <beomho.seo@samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Beomho Seo 提交于
This patch is fixed [read/write] integration time function. cm36651 have integration time from 1 to 640 milliseconds. But, print more then the thousand second. when call *_integration_time attribute. Because read_integration_time function return IIO_VAL_INT. read integration time function is changed return IIO_VAL_INT_PLUS_MICRO; And then .write_raw_get_fmt callback function for parse a fixed-point number from a string. Some description is revised milliseconds unit. v2: cm36651_write_int_time function fixed as it was. Signed-off-by: NBeomho Seo <beomho.seo@samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Get rid of obsolete uses of goto error_ret and some empty lines. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
This patch fixes some typos in max1363_chip_info_tbl[]. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 15 2月, 2014 3 次提交
-
-
由 Peter Meerwald 提交于
the property is not per-channel, but shared by type Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Cc: Kravchenko Oleksandr <x0199363@ti.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fugang Duan 提交于
Add Freescale Vybrid vf610 adc driver. The driver only support ADC software trigger. VF610 ADC device documentation is available at below reference manual (chapter 37): http://cache.freescale.com/files/32bit/doc/ref_manual/VYBRIDRM.pdf? fpsp=1&WT_TYPE=Reference%20Manuals&WT_VENDOR=FREESCALE&WT_FILE_FORMAT =pdf&WT_ASSET=Documentation CC: Shawn Guo <shawn.guo@linaro.org> CC: Jonathan Cameron <jic23@kernel.org> CC: Mark Rutland <mark.rutland@arm.com> CC: Otavio Salvador <otavio@ossystems.com.br> CC: Peter Meerwald <pmeerw@pmeerw.net> CC: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
temperature is reported in milli-Celsius Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 08 2月, 2014 9 次提交
-
-
由 Manuel Stahl 提交于
Signed-off-by: NManuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Manuel Stahl 提交于
Signed-off-by: NManuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Guenter Roeck 提交于
In kernel version 3.13, devm_regulator_get() may return no error if a regulator is undeclared. regulator_get_voltage() will return -EINVAL if this happens. This causes the driver to fail loading if the vref regulator is not declared. Since vref is optional, call devm_regulator_get_optional instead. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Cc: Stable@vger.kernel.org Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
This driver was not complying with the ABI and the purpose of this patch is to bring it inline so that userspace will correctly identify the channels. Should use channel modifiers (X/Y/Z), not channel indices timestamp channel has scan index 3, not 4 Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Cc: Kravchenko Oleksandr <x0199363@ti.com> Cc: Stable@vger.kernel.org Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Marcus Folkesson 提交于
This is necessary since timestamp is calculated as the last element in iio_compute_scan_bytes(). Without this fix any userspace code reading the layout of the buffer via sysfs will incorrectly interpret the data leading some nasty corruption. Signed-off-by: NMarcus Folkesson <marcus.folkesson@gmail.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Cc: stable@vger.kernel.org Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Beomho Seo 提交于
This patch add device name. Signed-off-by: NBeomho Seo <beomho.seo@samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Beomho Seo 提交于
This effects the reported scale of the raw values, and thus userspace applications that use this value. One micro tesla equal 0.01 gauss. So I have fixed calculation formula And add RAW_TO_GAUSS macro. ASA is in the range of 0 to 255. If multiply 0.003, calculation result(in_magn_[*]_scale) is always 0. So multiply 3000 and return and IIO_VAL_INT_PLUS_MICRO. As a result, read_raw call back function return accurate scale value. Signed-off-by: NBeomho Seo <beomho.seo@samsung.com> Cc: stable@vger.kernel.org Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
need to print leading zeros, hence "%d.%06d" Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
individual reads are not permitted concurrently with buffered reads Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 04 2月, 2014 3 次提交
-
-
由 Dan Carpenter 提交于
"ret" is zero here. There is no need to check again. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Dan Carpenter 提交于
We know "ret" is zero here so there is no need to check. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Johannes Thumshirn 提交于
Drop call to platform_set_drvdata as driver data is not used anywhere in the driver Signed-off-by: NJohannes Thumshirn <morbidrsa@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 18 1月, 2014 1 次提交
-
-
由 Ivaylo Dimitrov 提交于
Use the correct channel2 member instead of channel when dealing with sysfs reads/writes Signed-off-by: NIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Acked-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 13 1月, 2014 1 次提交
-
-
由 Peter Meerwald 提交于
combined ambient light (two channels) and proximity sensor with I2C interface; the ALS channels are visible+IR and IR datasheet is here http://optoelectronics.liteon.com/upload/download/DS86-2012-0006/P_100_LTR-501ALS-01_PrelimDS_ver1.1.pdf v3: * fix use of sizeof in _read_als() v2: (thanks to Lars-Peter Clausen) * cannot use devm_iio_device_register() due to cleanup order in _remove() * mutex around data wait/read * turn info message in _probe() into check for part number * change copyright year to 2014 Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 12 1月, 2014 1 次提交
-
-
由 Peter Meerwald 提交于
>> >> drivers/iio/pressure/mpl3115.c:101:46: sparse: cast to restricted __be32 >> >> drivers/iio/pressure/mpl3115.c:115:46: sparse: cast to restricted __be32 Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 11 1月, 2014 5 次提交
-
-
由 Paul Gortmaker 提交于
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
len variable became obsolete with iio_push_to_buffers_with_timestamp() Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
len variable become obsolete with iio_push_to_buffers_with_timestamp() Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Vivien Didelot 提交于
Remove "Control of internal reference" from the list of unimplemented features, since as of commit a405b00e, external reference is supported if the device has a regulator and falls back to internal if it doesn't. While we are modifying the header, let's make it more concise and remove a redundant filename. Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
sensor provides 12-bit relative humidity and 14-bit temperature via I2C interface; temperature and linearity compensation is not implemented (yet) driver also supports the Si7015, but not the 2nd generation sensors Si7013/Si7020/Si7021 datasheet is here http://www.silabs.com/Support%20Documents/TechnicalDocs/Si7005.pdf v2: (thanks to Lars-Peter Clausen) * fix coding style * use devm_iio_device_register() * change copyright year to 2014 Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-