diff options
author | Daniel Baluta <daniel.baluta@intel.com> | 2016-02-03 17:50:38 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-02-06 19:18:13 +0100 |
commit | 713bbb4efb9dcda2e96c8338db1f21c68f2d822a (patch) | |
tree | 39ad0c0528497f7dcf79f783f71ba044d94e070a /drivers/iio/pressure/ms5611_i2c.c | |
parent | iio: pressure: ms5611: Add IIO_CHAN_INFO_SCALE to mask (diff) | |
download | linux-713bbb4efb9dcda2e96c8338db1f21c68f2d822a.tar.xz linux-713bbb4efb9dcda2e96c8338db1f21c68f2d822a.zip |
iio: pressure: ms5611: Add triggered buffer support
This will be used together with an external trigger (e.g hrtimer
based software trigger).
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/pressure/ms5611_i2c.c')
-rw-r--r-- | drivers/iio/pressure/ms5611_i2c.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iio/pressure/ms5611_i2c.c b/drivers/iio/pressure/ms5611_i2c.c index 245797d1ecf0..42706a89c6ee 100644 --- a/drivers/iio/pressure/ms5611_i2c.c +++ b/drivers/iio/pressure/ms5611_i2c.c @@ -99,6 +99,7 @@ static int ms5611_i2c_probe(struct i2c_client *client, return -ENOMEM; st = iio_priv(indio_dev); + i2c_set_clientdata(client, indio_dev); st->reset = ms5611_i2c_reset; st->read_prom_word = ms5611_i2c_read_prom_word; st->read_adc_temp_and_pressure = ms5611_i2c_read_adc_temp_and_pressure; @@ -107,6 +108,11 @@ static int ms5611_i2c_probe(struct i2c_client *client, return ms5611_probe(indio_dev, &client->dev, id->driver_data); } +static int ms5611_i2c_remove(struct i2c_client *client) +{ + return ms5611_remove(i2c_get_clientdata(client)); +} + static const struct i2c_device_id ms5611_id[] = { { "ms5611", MS5611 }, { "ms5607", MS5607 }, @@ -120,6 +126,7 @@ static struct i2c_driver ms5611_driver = { }, .id_table = ms5611_id, .probe = ms5611_i2c_probe, + .remove = ms5611_i2c_remove, }; module_i2c_driver(ms5611_driver); |