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

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

Merge tag 'iio-for-4.12b' of...

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

Jonathan writes:

2nd set of new device support, features and cleanups for IIO in the 4.12 cycle

A good collection of outreachy related patches in here - mostly staging
driver cleanup. Also a fair number of patches added explicit OF device ID
tables for i2c drivers - a precursor to dropping (eventually) the implicit
probing.

New Device Support
* Allwinner SoC ADC.
  - So far covers the sun4i-a10, sun5i-a13 and sun6i-a31 general purpose ADCs,
  including thermal side of things.
  This missed the last cycle due to my incompetence, so good to get in now,
  particularly as various patches dependent on it are appearing.
* ltc2632
  - new driver supporting ltc2632-l12, ltc2632-l10, ltc2632-l8, ltc2632-h12,
    ltc-2632-h10, ltc-2632-h8 dacs

Cleanups
* Documentation
  - drop a broken reference to i2c/trivial-devices
* ad2s1200
  - drop & from function pointers for consistency.
* ad2s1210
  - formatting fixes.
* ad7152
  - octal permissions instead of symbolic.
  - drop & from function pointers for consistent usage.
* ad7192
  - drop & from function pointers for consistent usage.
* ad7280
  - replace core mlock usage with a local lock as mlock is intended only to
  protect the current device state (direct reads, or triggered and buffered)
* ad7746
  - drop & from function pointers for consistent usage.
  - replace core mlock usage with a local lock as mlock is intended only to
  protect the current device state (direct reads, or triggered and buffered)
* ad7754
  - move contents of header file into source file as not used anywhere else.
* ad7759
  - move contents of header file into source file as not used anywhere else.
* ad7780
  - drop & from function pointers for consistent usage.
* ad7832
  - replace core mlock usage with a local lock as mlock is intended only to
  protect the current device state (direct reads, or triggered and buffered)
* ad9834
  - replace core mlock usage with a local lock as mlock is intended only to
  protect the current device state (direct reads, or triggered and buffered)
  - drop an unnecessary goto in favour of direct return.
* adis16060
  - drop & from function pointers as inconsistent.
* adis16201
  - drop a local mutex as the adis core already protects everything necessary.
  - drop & from function pointers for consistent usage.
* adis16203
  - drop & from function pointers for consistent usage.
* adis16209
  - drop a local mutex as the adis core already protects everything necessary.
  - use an enum for scan index giving slightly nicer code.
  - drop & from function pointers for consistent usage.
* adis16240
  - drop a local mutex as the adis core already protects everything necessary.
  - use an enum for scan index giving slightly nicer code.
  - drop & from function pointers for consistent usage.
* apds9960
  - add OF device ID table.
* bma180
  - add OF device ID table.
  - prefer unsigned int to bare use of unsigned.
* bmc150_magn
  - add OF device ID table.
* hmp03
  - add OF device ID table.
* ina2xx
  - add OF device ID table.
* itg3200
  - add OF device ID table.
* mag3110
  - add OF device ID table.
* max11100
  - remove .owner field as it is set by the spi core.
* max5821
  - add .of_match_table set to the ID table which was present but not used.
* mcp4725
  - add OF device ID table.
* mlx96014
  - add OF device ID table.
* mma7455
  - add OF device ID table.
* mma7660
  - add OF device ID table.
* mpl3115
  - add OF device ID table.
* mpu6050
  - add OF device ID table.
* pc104
  - mask pc104 drivers behind a global pc104 config option.
* ti-ads1015
  - add OF device ID table.
* tsl2563
  - add OF device ID table.
* us5182d
  - add OF device ID table.
parents 1770ae9d 02b829f9
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
Linear Technology LTC2632 DAC device driver

Required properties:
 - compatible: Has to contain one of the following:
	lltc,ltc2632-l12
	lltc,ltc2632-l10
	lltc,ltc2632-l8
	lltc,ltc2632-h12
	lltc,ltc2632-h10
	lltc,ltc2632-h8

Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
apply. In particular, "reg" and "spi-max-frequency" properties must be given.

Example:

	spi_master {
		dac: ltc2632@0 {
			compatible = "lltc,ltc2632-l12";
			reg = <0>; /* CS0 */
			spi-max-frequency = <1000000>;
		};
	};
+0 −1
Original line number Diff line number Diff line
@@ -3024,7 +3024,6 @@ CAPELLA MICROSYSTEMS LIGHT SENSOR DRIVER
M:	Kevin Tsai <ktsai@capellamicro.com>
S:	Maintained
F:	drivers/iio/light/cm*
F:	Documentation/devicetree/bindings/i2c/trivial-admin-guide/devices.rst

CAVIUM THUNDERX2 ARM64 SOC
M:	Jayachandran C <jnair@caviumnetworks.com>
+26 −6
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/bitops.h>
#include <linux/slab.h>
@@ -32,7 +33,7 @@
#define BMA180_DRV_NAME "bma180"
#define BMA180_IRQ_NAME "bma180_event"

enum {
enum chip_ids {
	BMA180,
	BMA250,
};
@@ -41,11 +42,11 @@ struct bma180_data;

struct bma180_part_info {
	const struct iio_chan_spec *channels;
	unsigned num_channels;
	unsigned int num_channels;
	const int *scale_table;
	unsigned num_scales;
	unsigned int num_scales;
	const int *bw_table;
	unsigned num_bw;
	unsigned int num_bw;

	u8 int_reset_reg, int_reset_mask;
	u8 sleep_reg, sleep_mask;
@@ -408,7 +409,7 @@ static void bma250_chip_disable(struct bma180_data *data)
	dev_err(&data->client->dev, "failed to disable the chip\n");
}

static ssize_t bma180_show_avail(char *buf, const int *vals, unsigned n,
static ssize_t bma180_show_avail(char *buf, const int *vals, unsigned int n,
				 bool micros)
{
	size_t len = 0;
@@ -707,6 +708,7 @@ static int bma180_probe(struct i2c_client *client,
{
	struct bma180_data *data;
	struct iio_dev *indio_dev;
	enum chip_ids chip;
	int ret;

	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
@@ -716,7 +718,11 @@ static int bma180_probe(struct i2c_client *client,
	data = iio_priv(indio_dev);
	i2c_set_clientdata(client, indio_dev);
	data->client = client;
	data->part_info = &bma180_part_info[id->driver_data];
	if (client->dev.of_node)
		chip = (enum chip_ids)of_device_get_match_data(&client->dev);
	else
		chip = id->driver_data;
	data->part_info = &bma180_part_info[chip];

	ret = data->part_info->chip_config(data);
	if (ret < 0)
@@ -844,10 +850,24 @@ static struct i2c_device_id bma180_ids[] = {

MODULE_DEVICE_TABLE(i2c, bma180_ids);

static const struct of_device_id bma180_of_match[] = {
	{
		.compatible = "bosch,bma180",
		.data = (void *)BMA180
	},
	{
		.compatible = "bosch,bma250",
		.data = (void *)BMA250
	},
	{ }
};
MODULE_DEVICE_TABLE(of, bma180_of_match);

static struct i2c_driver bma180_driver = {
	.driver = {
		.name	= "bma180",
		.pm	= BMA180_PM_OPS,
		.of_match_table = bma180_of_match,
	},
	.probe		= bma180_probe,
	.remove		= bma180_remove,
+8 −0
Original line number Diff line number Diff line
@@ -41,12 +41,20 @@ static const struct i2c_device_id mma7455_i2c_ids[] = {
};
MODULE_DEVICE_TABLE(i2c, mma7455_i2c_ids);

static const struct of_device_id mma7455_of_match[] = {
	{ .compatible = "fsl,mma7455" },
	{ .compatible = "fsl,mma7456" },
	{ }
};
MODULE_DEVICE_TABLE(of, mma7455_of_match);

static struct i2c_driver mma7455_i2c_driver = {
	.probe = mma7455_i2c_probe,
	.remove = mma7455_i2c_remove,
	.id_table = mma7455_i2c_ids,
	.driver = {
		.name	= "mma7455-i2c",
		.of_match_table = mma7455_of_match,
	},
};
module_i2c_driver(mma7455_i2c_driver);
+7 −0
Original line number Diff line number Diff line
@@ -253,6 +253,12 @@ static const struct i2c_device_id mma7660_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, mma7660_i2c_id);

static const struct of_device_id mma7660_of_match[] = {
	{ .compatible = "fsl,mma7660" },
	{ }
};
MODULE_DEVICE_TABLE(of, mma7660_of_match);

static const struct acpi_device_id mma7660_acpi_id[] = {
	{"MMA7660", 0},
	{}
@@ -264,6 +270,7 @@ static struct i2c_driver mma7660_driver = {
	.driver = {
		.name = "mma7660",
		.pm = MMA7660_PM_OPS,
		.of_match_table = mma7660_of_match,
		.acpi_match_table = ACPI_PTR(mma7660_acpi_id),
	},
	.probe		= mma7660_probe,
Loading