- 31 12月, 2016 3 次提交
-
-
由 Linus Walleij 提交于
This adds a driver for the Capella Microsystems CM3605 Ambient Light Sensor and proximity sensor. This is a pretty simple entirely analog device that is interfaced with the target system using the POUT (proximity out) and AOUT (ambient light out) signals. The POUT signal is a simple high/low signal that indicates whether an object is in proximity, most typically used to detect a face in front of a mobile device. The signal requires that an infrared LED is mounted next to the device, making IR light reflect off the object in proximity and triggering the POUT signal. We grab a GPIO pin to handle the POUT signal as an interrupt line and register this as an event channel for the sensor. Since the proximity sensor requires an IR LED, we add a LED trigger named "cm3605" so that the infrared LED can just associate with this trigger to be sure it is always on when the proximity sensor needs it. The AOUT is an analog voltage between 0 and 1550 mV that indicate the LUX value in the ambient light: this is orthogonal to the proximity sensor functionality. Since this analog voltage needs to be converted into a digital value, the driver grabs an IIO channel named "aout" associated with the device. This patch created a combined ALS and proximity sensor driver. The former supports raw reads of the LUX value and the latter will generate proximity events. To integrate this properly with Linux we also add a supply regulator for the VDD pin (driving both functions) and add device tree bindings to define the RSET resistor that in turn configures the luminosity range of the ALS sensor. Since the sensor needs to be on more or less constantly, we restrict the power management to system suspend/resume: we disable the IR LED and disable the regulator for VDD on suspend and take them back up on resume. Tests: cd /sys/bus/iio/devices/iio:device1 cat in_illuminance_raw 304 (hold hand over sensor) cat in_illuminance_raw 17 iio_event_monitor cm3605 Found IIO device with name cm3605 with device number 1 (hold hand over sensor) Event: time: 2444842301447, type: proximity, channel: 0, evtype: thresh, direction: falling (remove hand over sensor) Event: time: 2445583440706, type: proximity, channel: 0, evtype: thresh, direction: rising Cc: Capella Microsystems <capellamicro@gmail.com> Cc: Kevin Tsai <ktsai@capellamicro.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
This adds device tree bindings for the Capella Microsystems CM3605 ambient light sensor and short range proximity sensor. Cc: devicetree@vger.kernel.org Cc: Capella Microsystems <capellamicro@gmail.com> Cc: Kevin Tsai <ktsai@capellamicro.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Kweh, Hock Leong 提交于
There is one light sensor type defined in the sensor hub specification, which has one Illuminance field. It doesn't distinguish between ambient light sensor or color sensor. Currently it is presented as IIO_INTENSITY channel. There are some user spaces specifically looking for IIO_LIGHT channel. To satisfy such user spaces this change also add a duplicate IIO_LIGHT channel. The units of measurement of Illuminance field is Lux, so it is still compatible to IIO ABI. Signed-off-by: NKweh, Hock Leong <hock.leong.kweh@intel.com> Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 30 12月, 2016 5 次提交
-
-
由 Marcin Niestroj 提交于
Both devices are using the same iio_chan_spec to define which settings are exported with sysfs. Both are properly configured to set/get sampling frequency for pressure and temperature. They also properly export available sampling frequencies. The only missing thing is sampling_frequency sysfs file, which allows to set/get this property from userspace. Add sampling frequency to iio channel info mask, so sampling_frequency file is properly exported using sysfs. Signed-off-by: NMarcin Niestroj <m.niestroj@grinn-global.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Marcin Niestroj 提交于
Datasheet of each device (lps331ap, lps25h, lps001wp, lps22hb) says that the pressure and temperature data is a 2's complement. I'm sending this the slow way, as negative pressures on these are pretty unusual and the nature of the fixing of multiple device introduction patches will make it hard to apply to older kernels - Jonathan. Fixes: 217494e5 ("iio:pressure: Add STMicroelectronics pressures driver") Fixes: 2f5effcb ("iio: pressure-core: st: Expand and rename LPS331AP's channel descriptor") Fixes: 7885a8ce ("iio: pressure: st: Add support for new LPS001WP pressure sensor") Fixes: e039e2f5 ("iio:st_pressure:initial lps22hb sensor support") Signed-off-by: NMarcin Niestroj <m.niestroj@grinn-global.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Marcin Niestroj 提交于
This adds documentation for Bosch BMI160 Inertial Measurement Unit device-tree bindings. Signed-off-by: NMarcin Niestroj <m.niestroj@grinn-global.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Marcin Niestroj 提交于
From now on we can add bmi160 device to device-tree by specifying compatible string. Signed-off-by: NMarcin Niestroj <m.niestroj@grinn-global.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Marcin Niestroj 提交于
From now on we can add bmi160 device to device-tree by specifying compatible string. Signed-off-by: NMarcin Niestroj <m.niestroj@grinn-global.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 11 12月, 2016 3 次提交
-
-
由 Nizam Haider 提交于
according to datasheet complete control register is of 2 bytes. http://www.analog.com/media/en/technical-documentation/data-sheets/AD5933.pdfSigned-off-by: NNizam Haider <nijam.h@hcl.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Rama Krishna Phani A 提交于
Several ADC channels are supported in PMIC which can be used to measure voltage, temperature, current etc. Different scaling can be applied on the obtained voltage to report in physical units. Scaling functionality can be different per channel. Add scaling support per channel. Every channel present in adc has an unique conversion formula for obtained voltage. Add support to report in Raw as well as in processed format. Scaling is applied when processed read is requested and is not applied when a Raw read is requested. Signed-off-by: NRama Krishna Phani A <rphani@codeaurora.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Rama Krishna Phani A 提交于
Several channels are supported in ADC of PMIC which can be used to measure voltage, temperature, current etc., Hardware provides readings for all channels in adc code. That adc code needs to be converted to voltage. Logic for conversion of adc code to voltage is common for all ADC channels(voltage, temperature, current .,etc). Implement separate function for generic conversion logic. Signed-off-by: NRama Krishna Phani A <rphani@codeaurora.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 04 12月, 2016 5 次提交
-
-
由 Brian Masney 提交于
The alignment of the #defines at the top of the file is not consistent. This changes all of the defines to use consistent alignment to improve the code readability. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Brian Masney 提交于
isl29028_chip_init() contains the device driver defaults and two I2C calls that detect the presence of the chip. This patch moves these into isl29028_probe() so that this function can be used by the power management runtinme in a followup patch. This patch also renames isl29028_chip_init() to isl29028_chip_init_and_power_on(). Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Brian Masney 提交于
There are two callers to the function isl29028_set_als_ir_mode() and both instances use a nested if statement to only change the chip state if it is not in the proper mode. This patch moves this check into the isl29028_set_als_ir_mode() function to remove the nested if statements. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Pan Bian 提交于
At the end of function ad7150_write_event_config(), directly returns 0. As a result, the errors will be ignored by the callers. It may be better to return variable "ret". Signed-off-by: NPan Bian <bianpan2016@163.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Pan Bian 提交于
In function cm3232_reg_init(), it returns 0 even if the last call to i2c_smbus_write_byte_data() returns a negative value (indicates error). As a result, the return value may be inconsistent with the execution status, and the caller of cm3232_reg_init() will not be able to detect the error. This patch fixes the bug. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188641Signed-off-by: NPan Bian <bianpan2016@163.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 03 12月, 2016 11 次提交
-
-
由 Amit Kumar Kushwaha 提交于
This patch fixes the following checkpatch.pl warning in ad7150.c WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred Occured during build. Signed-off-by: NAmit Kushwaha <kushwaha.a@samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Srinivas Pandruvada 提交于
Added timestamp channel. With this change, each sample has a timestamp. This timestamp can be from the sensor hub when present or local kernel timestamp. HID sensors can send timestamp with input data using usage id HID_USAGE_SENSOR_TIME_TIMESTAMP. This timestamp value is converted to nano seconds before pushing this sample to the iio core. Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 David Lechner 提交于
This adds a new driver for the TI ADS7950 family of ADC chips. These communicate using SPI and come in 8/10/12-bit and 4/8/12/16 channel varieties. Signed-off-by: NDavid Lechner <david@lechnology.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Aniroop Mathur 提交于
msleep(1~20) may not do what the caller intends, and will often sleep longer. (~20 ms actual sleep for any value given in the 1~20ms range) This is not the desired behaviour for many cases like device resume time, device suspend time, device enable time, data reading time, etc. Thus, change msleep to usleep_range for precise wakeups. Signed-off-by: NAniroop Mathur <a.mathur@samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Reto Schneider 提交于
The copyright year can not be in the future. Signed-off-by: NReto Schneider <code@reto-schneider.ch> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Reto Schneider 提交于
The module descriptions for the ADIS 16201, 16203 and 16209 drivers do not match the actual function of the devices. Update them accordingly to fix this. Signed-off-by: NReto Schneider <code@reto-schneider.ch> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Martin Kepplinger 提交于
smatch warned: sval_binop_signed: invalid divide LLONG_MIN/-1 and this fixes it. It's actually good to have, in order to avoid accidental checking for negative return values here. Signed-off-by: NMartin Kepplinger <martink@posteo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Shrirang Bagul 提交于
Support driver probe by reading unique HID on systems based on ACPI instead of DT compatible strings. Signed-off-by: NShrirang Bagul <shrirang.bagul@canonical.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Shrirang Bagul 提交于
Compatible strings are not available on ACPI based systems. This patch adds support to use DSDT information read from platform BIOS instead for probing st pressure sensors. Signed-off-by: NShrirang Bagul <shrirang.bagul@canonical.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Shrirang Bagul 提交于
Add support to probe st_accel sensors on i2c bus using ACPI. Compatible strings are not avaialable on ACPI based systems. Signed-off-by: NShrirang Bagul <shrirang.bagul@canonical.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Shrirang Bagul 提交于
Add support to match st sensors using information passed from ACPI DST tables. Signed-off-by: NShrirang Bagul <shrirang.bagul@canonical.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 01 12月, 2016 13 次提交
-
-
由 Bryan Thompson 提交于
Remove two passthrough macros that are only called from a single location and make the resultant vmcall directly. Signed-off-by: NBryan Thompson <bryan.thompson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bryan Thompson 提交于
Use the already defined DIAG_SEVERITY values directly instead of special postcode macro names. Signed-off-by: NBryan Thompson <bryan.thompson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bryan Thompson 提交于
There were two instances of FAILURE being misspelled in the s-Par firmware postcode event enum that are fixed. Signed-off-by: NBryan Thompson <bryan.thompson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bryan Thompson 提交于
Remove guestlinuxdebug enum values that are no longer being used and renumber remaining values accordingly. Signed-off-by: NBryan Thompson <bryan.thompson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bryan Thompson 提交于
The visorchipset.c functionality was moved into the visorbus driver previously. This patch updates the s-Par firmware postcode values to reflect this status. Signed-off-by: NBryan Thompson <bryan.thompson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bryan Thompson 提交于
Call POSTCODE_LINUX directly instead of passing through POSTCODE_LINUX_4. Signed-off-by: NBryan Thompson <bryan.thompson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bryan Thompson 提交于
Call POSTCODE_LINUX directly instead of passing through POSTCODE_LINUX_3. Signed-off-by: NBryan Thompson <bryan.thompson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bryan Thompson 提交于
Call POSTCODE_LINUX directly instead of passing through POSTCODE_LINUX_2. Signed-off-by: NBryan Thompson <bryan.thompson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bryan Thompson 提交于
Use CURRENT_FILE_PC directly in the POSTCODE_LINUX macro instead of relying on passthrough macros to provide it. Signed-off-by: NBryan Thompson <bryan.thompson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bryan Thompson 提交于
Leverage the 3 existing s-Par postcode macros to do a bit more work and provide only 1 base postcode macro. Signed-off-by: NBryan Thompson <bryan.thompson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Erik Arfvidson 提交于
This patch removes all the unused pound defines currently in vbuschannel.h. Signed-off-by: NErik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Erik Arfvidson 提交于
This patch removes all the unused pound defines currently in vmcallinterface.h. Signed-off-by: NErik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: NDavid Kershner <david.kershner@unisys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Greg Kroah-Hartman 提交于
The dgnc driver has no business creating "custom" sysfs files just for a single tty driver. Combined with the odd way they are created, it's just a mess, so remove them entirely as I am tired of tripping over them when doing driver core changes. Cc: Lidza Louina <lidza.louina@gmail.com> Cc: Mark Hounschell <markh@compro.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-