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

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

Merge tag 'iio-for-3.9d' of...

Merge tag 'iio-for-3.9d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

"4th set of IIO new drivers cleanups and fixes for the 3.9 cycle
+ a new spi helper function.

1) Introduce spi_sync_transfer and use it within IIO.  Originally
   it was envisioned that this nice little boilerplate replacement
   would go through the spi tree, but Grant Likely stated he'd
   prefer we take it through IIO as the example usecases were all
   in IIO (and are also in this pull request).  Note that given
   their may have been some unresolved elements related to the
   coccinelle element of the patch, that has been stripped out
   and will doubtlessly follow at a later date (along with
   lots of other patches for drivers elsewhere in the tree).

2) New Invensense MPU6050 driver.  This is stripped down to pretty
   much the basics from the original submission with the intent
   to build up all the fancy bits in an incremental (and hence
   reviewable fashion). It's been through a good few revisions
   so nice to finally merge this.

3) Change to iio_channel_get api to simplify device tree based
   mappings.  The actual mappings are currently under review.

4) Build fixes for !CONFIG_IIO_TRIGGER in the st_sensors driver.
   This one snuck past during review and testing but got picked
   up by Randy Dunlap in a randconfig build.

5) Some max1363 cleanups and enhancements.

6) Some comment fixes to make them coherent and comprehensible.

7) Trivial build warning fix in mxs-lradc"
parents 5305d746 09a642b7
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
What:           /sys/bus/iio/devices/iio:deviceX/in_gyro_matrix
What:           /sys/bus/iio/devices/iio:deviceX/in_accel_matrix
What:           /sys/bus/iio/devices/iio:deviceX/in_magn_matrix
KernelVersion:  3.4.0
Contact:        linux-iio@vger.kernel.org
Description:
		This is mounting matrix for motion sensors. Mounting matrix
		is a 3x3 unitary matrix. A typical mounting matrix would look like
		[0, 1, 0; 1, 0, 0; 0, 0, -1]. Using this information, it would be
		easy to tell the relative positions among sensors as well as their
		positions relative to the board that holds these sensors. Identity matrix
		[1, 0, 0; 0, 1, 0; 0, 0, 1] means sensor chip and device are perfectly
		aligned with each other. All axes are exactly the same.
+1 −2
Original line number Diff line number Diff line
@@ -135,8 +135,7 @@ static int adc_jack_probe(struct platform_device *pdev)
		;
	data->num_conditions = i;

	data->chan = iio_channel_get(dev_name(&pdev->dev),
			pdata->consumer_channel);
	data->chan = iio_channel_get(&pdev->dev, pdata->consumer_channel);
	if (IS_ERR(data->chan)) {
		err = PTR_ERR(data->chan);
		goto out;
+1 −5
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@ static int kxsd9_write_scale(struct iio_dev *indio_dev, int micro)

static int kxsd9_read(struct iio_dev *indio_dev, u8 address)
{
	struct spi_message msg;
	int ret;
	struct kxsd9_state *st = iio_priv(indio_dev);
	struct spi_transfer xfers[] = {
@@ -112,10 +111,7 @@ static int kxsd9_read(struct iio_dev *indio_dev, u8 address)

	mutex_lock(&st->buf_lock);
	st->tx[0] = KXSD9_READ(address);
	spi_message_init(&msg);
	spi_message_add_tail(&xfers[0], &msg);
	spi_message_add_tail(&xfers[1], &msg);
	ret = spi_sync(st->us, &msg);
	ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers));
	if (ret)
		return ret;
	return (((u16)(st->rx[0])) << 8) | (st->rx[1] & 0xF0);
+7 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include <linux/irq.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/trigger.h>
#include <linux/iio/buffer.h>

#include <linux/iio/common/st_sensors.h>
@@ -419,10 +419,15 @@ static const struct iio_info accel_info = {
	.write_raw = &st_accel_write_raw,
};

#ifdef CONFIG_IIO_TRIGGER
static const struct iio_trigger_ops st_accel_trigger_ops = {
	.owner = THIS_MODULE,
	.set_trigger_state = ST_ACCEL_TRIGGER_SET_STATE,
};
#define ST_ACCEL_TRIGGER_OPS (&st_accel_trigger_ops)
#else
#define ST_ACCEL_TRIGGER_OPS NULL
#endif

int st_accel_common_probe(struct iio_dev *indio_dev)
{
@@ -455,7 +460,7 @@ int st_accel_common_probe(struct iio_dev *indio_dev)
			goto st_accel_common_probe_error;

		err = st_sensors_allocate_trigger(indio_dev,
							&st_accel_trigger_ops);
						 ST_ACCEL_TRIGGER_OPS);
		if (err < 0)
			goto st_accel_probe_trigger_error;
	}
+0 −1
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/iio/iio.h>
#include <linux/iio/trigger.h>

#include <linux/iio/common/st_sensors.h>
#include <linux/iio/common/st_sensors_i2c.h>
Loading