Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a732cd43 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'iio-fixes-for-4.2a' of...

Merge tag 'iio-fixes-for-4.2a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First set of IIO fixes for the 4.2 cycle.

* Fix a regression in hid sensors suspend time as a result of adding runtime
  pm.  The normal flow of waking up devices in order to go into suspend
  (given the devices are normally suspended when not reading) to a regression
  in suspend time on some laptops (reports of an additional 8 seconds).
  Fix this by checking to see if a user action resulting in the wake up, and
  make it a null operation if it didn't.  Note that for hid sensors, there is
  nothing useful to be done when moving into a full suspend from a runtime
  suspend so they might as well be left alone.
* rochip_saradc: fix some missing MODULE_* data including the licence so that
  the driver does not taint the kernel incorrectly and can build as a module.
* twl4030 - mark irq as oneshot as it always should have been.
* inv-mpu - write formats for attributes not specified, leading to miss
  interpretation of the gyro scale channel when written.
* Proximity ABI clarification.  This had snuck through as a mess.  Some
  drivers thought proximity went in one direction, some the other.  We went
  with the most common option, documented it and fixed up the drivers going
  the other way.  Fix for sx9500 included in this set.
* ad624r - fix a wrong shift in the output data.
* at91_adc - remove a false limit on the value of the STARTUP register
  applied by too small a type for the device tree parameter.
* cm3323 - clear the bits when setting the integration time (otherwise
  we can only ever set more bits in the relevant field).
* bmc150-accel - multiple triggers are registered, but on error were not being
  unwound in the opposite order leading to removal of triggers that had not
  yet successfully been registered (count down instead of up when unwinding).
* tcs3414 - ensure right part of val / val2 pair read so that the integration
  time is not always 0.
* cc10001_adc - bug in kconfig dependency. Use of OR when AND was intended.
parents cbe4f443 b2b3c3dc
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1234,10 +1234,8 @@ Description:
		object is near the sensor, usually be observing
		reflectivity of infrared or ultrasound emitted.
		Often these sensors are unit less and as such conversion
		to SI units is not possible.  Where it is, the units should
		be meters.  If such a conversion is not possible, the reported
		values should behave in the same way as a distance, i.e. lower
		values indicate something is closer to the sensor.
		to SI units is not possible. Higher proximity measurements
		indicate closer objects, and vice versa.

What:		/sys/.../iio:deviceX/in_illuminance_input
What:		/sys/.../iio:deviceX/in_illuminance_raw
+1 −1
Original line number Diff line number Diff line
@@ -1464,7 +1464,7 @@ static void bmc150_accel_unregister_triggers(struct bmc150_accel_data *data,
{
	int i;

	for (i = from; i >= 0; i++) {
	for (i = from; i >= 0; i--) {
		if (data->triggers[i].indio_trig) {
			iio_trigger_unregister(data->triggers[i].indio_trig);
			data->triggers[i].indio_trig = NULL;
+1 −2
Original line number Diff line number Diff line
@@ -153,8 +153,7 @@ config DA9150_GPADC

config CC10001_ADC
	tristate "Cosmic Circuits 10001 ADC driver"
	depends on HAVE_CLK || REGULATOR
	depends on HAS_IOMEM
	depends on HAS_IOMEM && HAVE_CLK && REGULATOR
	select IIO_BUFFER
	select IIO_TRIGGERED_BUFFER
	help
+4 −4
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ struct at91_adc_caps {
	u8	ts_pen_detect_sensitivity;

	/* startup time calculate function */
	u32 (*calc_startup_ticks)(u8 startup_time, u32 adc_clk_khz);
	u32 (*calc_startup_ticks)(u32 startup_time, u32 adc_clk_khz);

	u8	num_channels;
	struct at91_adc_reg_desc registers;
@@ -201,7 +201,7 @@ struct at91_adc_state {
	u8			num_channels;
	void __iomem		*reg_base;
	struct at91_adc_reg_desc *registers;
	u8			startup_time;
	u32			startup_time;
	u8			sample_hold_time;
	bool			sleep_mode;
	struct iio_trigger	**trig;
@@ -779,7 +779,7 @@ static int at91_adc_of_get_resolution(struct at91_adc_state *st,
	return ret;
}

static u32 calc_startup_ticks_9260(u8 startup_time, u32 adc_clk_khz)
static u32 calc_startup_ticks_9260(u32 startup_time, u32 adc_clk_khz)
{
	/*
	 * Number of ticks needed to cover the startup time of the ADC
@@ -790,7 +790,7 @@ static u32 calc_startup_ticks_9260(u8 startup_time, u32 adc_clk_khz)
	return round_up((startup_time * adc_clk_khz / 1000) - 1, 8) / 8;
}

static u32 calc_startup_ticks_9x5(u8 startup_time, u32 adc_clk_khz)
static u32 calc_startup_ticks_9x5(u32 startup_time, u32 adc_clk_khz)
{
	/*
	 * For sama5d3x and at91sam9x5, the formula changes to:
+4 −0
Original line number Diff line number Diff line
@@ -349,3 +349,7 @@ static struct platform_driver rockchip_saradc_driver = {
};

module_platform_driver(rockchip_saradc_driver);

MODULE_AUTHOR("Heiko Stuebner <heiko@sntech.de>");
MODULE_DESCRIPTION("Rockchip SARADC driver");
MODULE_LICENSE("GPL v2");
Loading