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

Merge tag 'iio-for-5.8c' of...

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

Jonathan writes:

Third set of IIO new device support, cleanups etc for the 5.8 cycle.

A rather late final set to pick up a couple of new drivers, a bunch
of cleanup and some fixes that can wait for the merge window.

In particularly I'd like to highlight the great core and driver
cleanup work that the Alex and the team at Analog devices are currently
doing.  Should see lots more of that in the next cycle give what is
currently under review.

This pull also has the first few fixes squashing a class of alignment
and small kernel data leak bugs that Lars-Peter Clausen picked up
on in a review.  Quite a few more of those to come.  They've been
there a long time so we aren't rushing the reviews.

New device support
* atlas ezo
  - new driver supporting this range of chemical and similar sensors
    with the odd interface of ascii strings over i2c.
* bma180
  - bma023, bma150 and smb380 support.  Note these are currently also
    supported by a driver in input which we will hopefully remove
    (eventually). There are Kconfig protections to avoid a clash
    in the meantime.
* vcnl3020
  - new driver for this proximity sensor.

Core change
* during buffer updates, change the current state variable before
  we actually call pre and post enable callbacks so drivers can know
  where we are going.  Note this is a precursor to only exposing
  one enable callback to drivers.  The (false) logic behind having two
  such callbacks has long been fixed, but only now is the mess getting
  cleaned up.

Features
* exynos adc.
  - add reporting of channels scale values.

Cleanups and minor fixes.
* core
  - drop now unused attrcount_orig variable.
* ad5360, ad5446, ad5449, ad5755, ad5761, ad5764, ad5380, ad5421,
  ad5592, ad5686 and vf610_dac
  - remove direct use of iio_dev->mlock from all these drivers.
    Its semantics used to be poorly defined, but now it is for core
    use only.  Removing it's use in drivers has been a long process
    of which this is the latest step!
* exynos_adc
  - drop a pointless check on the phy as the driver doesn't access it.
* ping
  - avoid a dance from iio_priv and iio_priv_to_dev back again by
    just passing the iio_dev into the functions.
* pms7003
  - alignment and potential data leak fix.
* sps30
  - alignment bug fix.

* tag 'iio-for-5.8c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (31 commits)
  iio:chemical:pms7003: Fix timestamp alignment and prevent data leak.
  iio:chemical:sps30: Fix timestamp alignment
  iio: adc: stm32-adc: fix a wrong error message when probing interrupts
  iio: light: gp2ap002: Take runtime PM reference on light read
  iio: proximity: ping: pass reference to IIO device as param to ping_read()
  iio: dac: ad5592r-base: Replace indio_dev->mlock with own device lock
  iio: proximity: Add driver support for vcnl3020 proximity sensor
  dt-bindings: proximity: provide vcnl3020 device tree binding document
  iio: buffer: remove attrcount_orig var from sysfs creation
  iio: chemical: add atlas-ezo-sensor initial support
  dt-bindings: iio: chemical: add CO2 EZO module documentation
  iio: adc: exynos: Simplify Exynos7-specific init
  iio: adc: Add scaling support to exynos adc driver
  iio: __iio_update_buffers: Update mode before preenable/after postdisable
  iio: dac: vf610_dac: Replace indio_dev->mlock with own device lock
  iio: dac: ad5686: Replace indio_dev->mlock with own device lock
  iio: dac: ad5421: Replace indio_dev->mlock with own device lock
  iio: dac: ad5380: Replace indio_dev->mlock with own device lock
  iio: dac: ad5764: Replace indio_dev->mlock with own device lock
  iio: dac: ad5761: Replace indio_dev->mlock with own device lock
  ...
parents 1dfb74b1 13e94563
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
* Bosch BMA180 / BMA25x triaxial acceleration sensor
* Bosch BMA023 / BMA150/ BMA180 / BMA25x / SMB380 triaxial acceleration sensor

https://media.digikey.com/pdf/Data%20Sheets/Bosch/BMA150.pdf
http://omapworld.com/BMA180_111_1002839.pdf
http://ae-bst.resource.bosch.com/media/products/dokumente/bma250/bst-bma250-ds002-05.pdf

Required properties:

  - compatible : should be one of:
    "bosch,bma023"
    "bosch,bma150"
    "bosch,bma180"
    "bosch,bma250"
    "bosch,bma254"
    "bosch,smb380"
  - reg : the I2C address of the sensor
  - vdd-supply : regulator phandle connected to the VDD pin
  - vddio-supply : regulator phandle connected to the VDDIO pin

Optional properties:

+4 −2
Original line number Diff line number Diff line
@@ -4,13 +4,13 @@
$id: http://devicetree.org/schemas/iio/chemical/atlas,sensor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atlas Scientific OEM sensors
title: Atlas Scientific OEM + EZO sensors

maintainers:
  - Matt Ranostay <matt.ranostay@konsulko.com>

description: |
  Atlas Scientific OEM sensors connected via I2C
  Atlas Scientific OEM + EZO sensors connected via I2C

  Datasheets:
    http://www.atlas-scientific.com/_files/_datasheets/_oem/DO_oem_datasheet.pdf
@@ -18,6 +18,7 @@ description: |
    http://www.atlas-scientific.com/_files/_datasheets/_oem/ORP_oem_datasheet.pdf
    http://www.atlas-scientific.com/_files/_datasheets/_oem/pH_oem_datasheet.pdf
    http://www.atlas-scientific.com/_files/_datasheets/_oem/RTD_oem_datasheet.pdf
    http://www.atlas-scientific.com/_files/_datasheets/_probe/EZO_CO2_Datasheet.pdf

properties:
  compatible:
@@ -27,6 +28,7 @@ properties:
      - atlas,orp-sm
      - atlas,ph-sm
      - atlas,rtd-sm
      - atlas,co2-ezo

  reg:
     maxItems: 1
+62 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/proximity/vishay,vcnl3020.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Integrated Proximity Sensor With Infrared Emitter

maintainers:
  - Ivan Mikhaylov <i.mikhaylov@yadro.com>

description: |
  The VCNL3020 is a fully integrated proximity sensor. Fully integrated means
  that the infrared emitter is included in the package. It has 16-bit
  resolution. It includes a signal processing IC and features standard I2C
  communication interface. It features an interrupt function.

  Specifications about the devices can be found at:
  https://www.vishay.com/docs/84150/vcnl3020.pdf

properties:
  compatible:
    enum:
      - vishay,vcnl3020

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vdd-supply:
    description: Regulator that provides power to the sensor

  vddio-supply:
    description: Regulator that provides power to the bus

  vishay,led-current-microamp:
    description:
      The driver current for the LED used in proximity sensing.
    enum: [0, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000,
          100000, 110000, 120000, 130000, 140000, 150000, 160000, 170000,
          180000, 190000, 200000]
    default: 20000

required:
  - compatible
  - reg

examples:
  - |
    i2c {

        #address-cells = <1>;
        #size-cells = <0>;

        proximity@13 {
              compatible = "vishay,vcnl3020";
              reg = <0x13>;
              vishay,led-current-microamp = <200000>;
        };
    };
+4 −4
Original line number Diff line number Diff line
@@ -89,13 +89,13 @@ config ADXL372_I2C
	  module will be called adxl372_i2c.

config BMA180
	tristate "Bosch BMA180/BMA25x 3-Axis Accelerometer Driver"
	depends on I2C
	tristate "Bosch BMA023/BMA1x0/BMA25x 3-Axis Accelerometer Driver"
	depends on I2C && INPUT_BMA150=n
	select IIO_BUFFER
	select IIO_TRIGGERED_BUFFER
	help
	  Say Y here if you want to build a driver for the Bosch BMA180 or
	  BMA25x triaxial acceleration sensor.
	  Say Y here if you want to build a driver for the Bosch BMA023, BMA150
	  BMA180, SMB380, or BMA25x triaxial acceleration sensor.

	  To compile this driver as a module, choose M here: the
	  module will be called bma180.
+195 −13
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
 * Support for BMA250 (c) Peter Meerwald <pmeerw@pmeerw.net>
 *
 * SPI is not supported by driver
 * BMA023/BMA150/SMB380: 7-bit I2C slave address 0x38
 * BMA180: 7-bit I2C slave address 0x40 or 0x41
 * BMA250: 7-bit I2C slave address 0x18 or 0x19
 * BMA254: 7-bit I2C slave address 0x18 or 0x19
@@ -33,6 +34,8 @@
#define BMA180_IRQ_NAME "bma180_event"

enum chip_ids {
	BMA023,
	BMA150,
	BMA180,
	BMA250,
	BMA254,
@@ -48,7 +51,7 @@ struct bma180_part_info {
	unsigned int num_scales;
	const int *bw_table;
	unsigned int num_bw;
	int center_temp;
	int temp_offset;

	u8 int_reset_reg, int_reset_mask;
	u8 sleep_reg, sleep_mask;
@@ -57,13 +60,25 @@ struct bma180_part_info {
	u8 power_reg, power_mask, lowpower_val;
	u8 int_enable_reg, int_enable_mask;
	u8 int_map_reg, int_enable_dataready_int1_mask;
	u8 softreset_reg;
	u8 softreset_reg, softreset_val;

	int (*chip_config)(struct bma180_data *data);
	void (*chip_disable)(struct bma180_data *data);
};

/* Register set */
#define BMA023_CTRL_REG0	0x0a
#define BMA023_CTRL_REG1	0x0b
#define BMA023_CTRL_REG2	0x14
#define BMA023_CTRL_REG3	0x15

#define BMA023_RANGE_MASK	GENMASK(4, 3) /* Range of accel values */
#define BMA023_BW_MASK		GENMASK(2, 0) /* Accel bandwidth */
#define BMA023_SLEEP		BIT(0)
#define BMA023_INT_RESET_MASK	BIT(6)
#define BMA023_NEW_DATA_INT	BIT(5) /* Intr every new accel data is ready */
#define BMA023_RESET_VAL	BIT(1)

#define BMA180_CHIP_ID		0x00 /* Need to distinguish BMA180 from other */
#define BMA180_ACC_X_LSB	0x02 /* First of 6 registers of accel data */
#define BMA180_TEMP		0x08
@@ -94,6 +109,7 @@ struct bma180_part_info {
/* We have to write this value in reset register to do soft reset */
#define BMA180_RESET_VAL	0xb6

#define BMA023_ID_REG_VAL	0x02
#define BMA180_ID_REG_VAL	0x03
#define BMA250_ID_REG_VAL	0x03
#define BMA254_ID_REG_VAL	0xfa /* 250 decimal */
@@ -156,6 +172,9 @@ enum bma180_chan {
	TEMP
};

static int bma023_bw_table[] = { 25, 50, 100, 190, 375, 750, 1500 }; /* Hz */
static int bma023_scale_table[] = { 2452, 4903, 9709, };

static int bma180_bw_table[] = { 10, 20, 40, 75, 150, 300 }; /* Hz */
static int bma180_scale_table[] = { 1275, 1863, 2452, 3727, 4903, 9709, 19417 };

@@ -319,7 +338,8 @@ static int bma180_set_pmode(struct bma180_data *data, bool mode)
static int bma180_soft_reset(struct bma180_data *data)
{
	int ret = i2c_smbus_write_byte_data(data->client,
		data->part_info->softreset_reg, BMA180_RESET_VAL);
		data->part_info->softreset_reg,
		data->part_info->softreset_val);

	if (ret)
		dev_err(&data->client->dev, "failed to reset the chip\n");
@@ -349,17 +369,37 @@ static int bma180_chip_init(struct bma180_data *data)
	 */
	msleep(20);

	ret = bma180_set_new_data_intr_state(data, false);
	return bma180_set_new_data_intr_state(data, false);
}

static int bma023_chip_config(struct bma180_data *data)
{
	int ret = bma180_chip_init(data);

	if (ret)
		return ret;
		goto err;

	ret = bma180_set_bw(data, 50); /* 50 Hz */
	if (ret)
		goto err;
	ret = bma180_set_scale(data, 2452); /* 2 G */
	if (ret)
		goto err;

	return bma180_set_pmode(data, false);
	return 0;

err:
	dev_err(&data->client->dev, "failed to config the chip\n");
	return ret;
}

static int bma180_chip_config(struct bma180_data *data)
{
	int ret = bma180_chip_init(data);

	if (ret)
		goto err;
	ret = bma180_set_pmode(data, false);
	if (ret)
		goto err;
	ret = bma180_set_bits(data, BMA180_CTRL_REG0, BMA180_DIS_WAKE_UP, 1);
@@ -389,6 +429,9 @@ static int bma25x_chip_config(struct bma180_data *data)
{
	int ret = bma180_chip_init(data);

	if (ret)
		goto err;
	ret = bma180_set_pmode(data, false);
	if (ret)
		goto err;
	ret = bma180_set_bw(data, 16); /* 16 Hz */
@@ -413,6 +456,17 @@ static int bma25x_chip_config(struct bma180_data *data)
	return ret;
}

static void bma023_chip_disable(struct bma180_data *data)
{
	if (bma180_set_sleep_state(data, true))
		goto err;

	return;

err:
	dev_err(&data->client->dev, "failed to disable the chip\n");
}

static void bma180_chip_disable(struct bma180_data *data)
{
	if (bma180_set_new_data_intr_state(data, false))
@@ -512,8 +566,12 @@ static int bma180_read_raw(struct iio_dev *indio_dev,
		iio_device_release_direct_mode(indio_dev);
		if (ret < 0)
			return ret;
		if (chan->scan_type.sign == 's') {
			*val = sign_extend32(ret >> chan->scan_type.shift,
				chan->scan_type.realbits - 1);
		} else {
			*val = ret;
		}
		return IIO_VAL_INT;
	case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY:
		*val = data->bw;
@@ -531,7 +589,7 @@ static int bma180_read_raw(struct iio_dev *indio_dev,
			return -EINVAL;
		}
	case IIO_CHAN_INFO_OFFSET:
		*val = data->part_info->center_temp;
		*val = data->part_info->temp_offset;
		return IIO_VAL_INT;
	default:
		return -EINVAL;
@@ -609,6 +667,11 @@ static const struct iio_enum bma180_power_mode_enum = {
	.set = bma180_set_power_mode,
};

static const struct iio_chan_spec_ext_info bma023_ext_info[] = {
	IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, bma180_accel_get_mount_matrix),
	{ }
};

static const struct iio_chan_spec_ext_info bma180_ext_info[] = {
	IIO_ENUM("power_mode", true, &bma180_power_mode_enum),
	IIO_ENUM_AVAILABLE("power_mode", &bma180_power_mode_enum),
@@ -616,6 +679,35 @@ static const struct iio_chan_spec_ext_info bma180_ext_info[] = {
	{ }
};

#define BMA023_ACC_CHANNEL(_axis, _bits) {				\
	.type = IIO_ACCEL,						\
	.modified = 1,							\
	.channel2 = IIO_MOD_##_axis,					\
	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),			\
	.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) |		\
		BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY),	\
	.scan_index = AXIS_##_axis,					\
	.scan_type = {							\
		.sign = 's',						\
		.realbits = _bits,					\
		.storagebits = 16,					\
		.shift = 16 - _bits,					\
	},								\
	.ext_info = bma023_ext_info,					\
}

#define BMA150_TEMP_CHANNEL {						\
	.type = IIO_TEMP,						\
	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |			\
		BIT(IIO_CHAN_INFO_SCALE) | BIT(IIO_CHAN_INFO_OFFSET),	\
	.scan_index = TEMP,						\
	.scan_type = {							\
		.sign = 'u',						\
		.realbits = 8,						\
		.storagebits = 16,					\
	},								\
}

#define BMA180_ACC_CHANNEL(_axis, _bits) {				\
	.type = IIO_ACCEL,						\
	.modified = 1,							\
@@ -645,6 +737,21 @@ static const struct iio_chan_spec_ext_info bma180_ext_info[] = {
	},								\
}

static const struct iio_chan_spec bma023_channels[] = {
	BMA023_ACC_CHANNEL(X, 10),
	BMA023_ACC_CHANNEL(Y, 10),
	BMA023_ACC_CHANNEL(Z, 10),
	IIO_CHAN_SOFT_TIMESTAMP(4),
};

static const struct iio_chan_spec bma150_channels[] = {
	BMA023_ACC_CHANNEL(X, 10),
	BMA023_ACC_CHANNEL(Y, 10),
	BMA023_ACC_CHANNEL(Z, 10),
	BMA150_TEMP_CHANNEL,
	IIO_CHAN_SOFT_TIMESTAMP(4),
};

static const struct iio_chan_spec bma180_channels[] = {
	BMA180_ACC_CHANNEL(X, 14),
	BMA180_ACC_CHANNEL(Y, 14),
@@ -670,6 +777,63 @@ static const struct iio_chan_spec bma254_channels[] = {
};

static const struct bma180_part_info bma180_part_info[] = {
	[BMA023] = {
		.chip_id = BMA023_ID_REG_VAL,
		.channels = bma023_channels,
		.num_channels = ARRAY_SIZE(bma023_channels),
		.scale_table = bma023_scale_table,
		.num_scales = ARRAY_SIZE(bma023_scale_table),
		.bw_table = bma023_bw_table,
		.num_bw = ARRAY_SIZE(bma023_bw_table),
		/* No temperature channel */
		.temp_offset = 0,
		.int_reset_reg = BMA023_CTRL_REG0,
		.int_reset_mask = BMA023_INT_RESET_MASK,
		.sleep_reg = BMA023_CTRL_REG0,
		.sleep_mask = BMA023_SLEEP,
		.bw_reg = BMA023_CTRL_REG2,
		.bw_mask = BMA023_BW_MASK,
		.scale_reg = BMA023_CTRL_REG2,
		.scale_mask = BMA023_RANGE_MASK,
		/* No power mode on bma023 */
		.power_reg = 0,
		.power_mask = 0,
		.lowpower_val = 0,
		.int_enable_reg = BMA023_CTRL_REG3,
		.int_enable_mask = BMA023_NEW_DATA_INT,
		.softreset_reg = BMA023_CTRL_REG0,
		.softreset_val = BMA023_RESET_VAL,
		.chip_config = bma023_chip_config,
		.chip_disable = bma023_chip_disable,
	},
	[BMA150] = {
		.chip_id = BMA023_ID_REG_VAL,
		.channels = bma150_channels,
		.num_channels = ARRAY_SIZE(bma150_channels),
		.scale_table = bma023_scale_table,
		.num_scales = ARRAY_SIZE(bma023_scale_table),
		.bw_table = bma023_bw_table,
		.num_bw = ARRAY_SIZE(bma023_bw_table),
		.temp_offset = -60, /* 0 LSB @ -30 degree C */
		.int_reset_reg = BMA023_CTRL_REG0,
		.int_reset_mask = BMA023_INT_RESET_MASK,
		.sleep_reg = BMA023_CTRL_REG0,
		.sleep_mask = BMA023_SLEEP,
		.bw_reg = BMA023_CTRL_REG2,
		.bw_mask = BMA023_BW_MASK,
		.scale_reg = BMA023_CTRL_REG2,
		.scale_mask = BMA023_RANGE_MASK,
		/* No power mode on bma150 */
		.power_reg = 0,
		.power_mask = 0,
		.lowpower_val = 0,
		.int_enable_reg = BMA023_CTRL_REG3,
		.int_enable_mask = BMA023_NEW_DATA_INT,
		.softreset_reg = BMA023_CTRL_REG0,
		.softreset_val = BMA023_RESET_VAL,
		.chip_config = bma023_chip_config,
		.chip_disable = bma023_chip_disable,
	},
	[BMA180] = {
		.chip_id = BMA180_ID_REG_VAL,
		.channels = bma180_channels,
@@ -678,7 +842,7 @@ static const struct bma180_part_info bma180_part_info[] = {
		.num_scales = ARRAY_SIZE(bma180_scale_table),
		.bw_table = bma180_bw_table,
		.num_bw = ARRAY_SIZE(bma180_bw_table),
		.center_temp = 48, /* 0 LSB @ 24 degree C */
		.temp_offset = 48, /* 0 LSB @ 24 degree C */
		.int_reset_reg = BMA180_CTRL_REG0,
		.int_reset_mask = BMA180_RESET_INT,
		.sleep_reg = BMA180_CTRL_REG0,
@@ -693,6 +857,7 @@ static const struct bma180_part_info bma180_part_info[] = {
		.int_enable_reg = BMA180_CTRL_REG3,
		.int_enable_mask = BMA180_NEW_DATA_INT,
		.softreset_reg = BMA180_RESET,
		.softreset_val = BMA180_RESET_VAL,
		.chip_config = bma180_chip_config,
		.chip_disable = bma180_chip_disable,
	},
@@ -704,7 +869,7 @@ static const struct bma180_part_info bma180_part_info[] = {
		.num_scales = ARRAY_SIZE(bma25x_scale_table),
		.bw_table = bma25x_bw_table,
		.num_bw = ARRAY_SIZE(bma25x_bw_table),
		.center_temp = 48, /* 0 LSB @ 24 degree C */
		.temp_offset = 48, /* 0 LSB @ 24 degree C */
		.int_reset_reg = BMA250_INT_RESET_REG,
		.int_reset_mask = BMA250_INT_RESET_MASK,
		.sleep_reg = BMA250_POWER_REG,
@@ -721,6 +886,7 @@ static const struct bma180_part_info bma180_part_info[] = {
		.int_map_reg = BMA250_INT_MAP_REG,
		.int_enable_dataready_int1_mask = BMA250_INT1_DATA_MASK,
		.softreset_reg = BMA250_RESET_REG,
		.softreset_val = BMA180_RESET_VAL,
		.chip_config = bma25x_chip_config,
		.chip_disable = bma25x_chip_disable,
	},
@@ -732,7 +898,7 @@ static const struct bma180_part_info bma180_part_info[] = {
		.num_scales = ARRAY_SIZE(bma25x_scale_table),
		.bw_table = bma25x_bw_table,
		.num_bw = ARRAY_SIZE(bma25x_bw_table),
		.center_temp = 46, /* 0 LSB @ 23 degree C */
		.temp_offset = 46, /* 0 LSB @ 23 degree C */
		.int_reset_reg = BMA254_INT_RESET_REG,
		.int_reset_mask = BMA254_INT_RESET_MASK,
		.sleep_reg = BMA254_POWER_REG,
@@ -749,6 +915,7 @@ static const struct bma180_part_info bma180_part_info[] = {
		.int_map_reg = BMA254_INT_MAP_REG,
		.int_enable_dataready_int1_mask = BMA254_INT1_DATA_MASK,
		.softreset_reg = BMA254_RESET_REG,
		.softreset_val = BMA180_RESET_VAL,
		.chip_config = bma25x_chip_config,
		.chip_disable = bma25x_chip_disable,
	},
@@ -990,15 +1157,26 @@ static SIMPLE_DEV_PM_OPS(bma180_pm_ops, bma180_suspend, bma180_resume);
#endif

static const struct i2c_device_id bma180_ids[] = {
	{ "bma023", BMA023 },
	{ "bma150", BMA150 },
	{ "bma180", BMA180 },
	{ "bma250", BMA250 },
	{ "bma254", BMA254 },
	{ "smb380", BMA150 },
	{ }
};

MODULE_DEVICE_TABLE(i2c, bma180_ids);

static const struct of_device_id bma180_of_match[] = {
	{
		.compatible = "bosch,bma023",
		.data = (void *)BMA023
	},
	{
		.compatible = "bosch,bma150",
		.data = (void *)BMA150
	},
	{
		.compatible = "bosch,bma180",
		.data = (void *)BMA180
@@ -1011,6 +1189,10 @@ static const struct of_device_id bma180_of_match[] = {
		.compatible = "bosch,bma254",
		.data = (void *)BMA254
	},
	{
		.compatible = "bosch,smb380",
		.data = (void *)BMA150
	},
	{ }
};
MODULE_DEVICE_TABLE(of, bma180_of_match);
@@ -1030,5 +1212,5 @@ module_i2c_driver(bma180_driver);

MODULE_AUTHOR("Kravchenko Oleksandr <x0199363@ti.com>");
MODULE_AUTHOR("Texas Instruments, Inc.");
MODULE_DESCRIPTION("Bosch BMA180/BMA25x triaxial acceleration sensor");
MODULE_DESCRIPTION("Bosch BMA023/BMA1x0/BMA25x triaxial acceleration sensor");
MODULE_LICENSE("GPL");
Loading