diff options
Diffstat (limited to 'drivers/iio/pressure')
-rw-r--r-- | drivers/iio/pressure/abp060mg.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/bmp280-core.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/cros_ec_baro.c | 3 | ||||
-rw-r--r-- | drivers/iio/pressure/hid-sensor-press.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/hp03.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/hp206c.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/mpl115.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/mpl3115.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/ms5611_core.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/ms5637.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/st_pressure.h | 4 | ||||
-rw-r--r-- | drivers/iio/pressure/st_pressure_core.c | 78 | ||||
-rw-r--r-- | drivers/iio/pressure/st_pressure_i2c.c | 10 | ||||
-rw-r--r-- | drivers/iio/pressure/st_pressure_spi.c | 10 | ||||
-rw-r--r-- | drivers/iio/pressure/t5403.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/zpa2326.c | 2 |
16 files changed, 79 insertions, 38 deletions
diff --git a/drivers/iio/pressure/abp060mg.c b/drivers/iio/pressure/abp060mg.c index 43bdd0b9155f..46a220c70d6a 100644 --- a/drivers/iio/pressure/abp060mg.c +++ b/drivers/iio/pressure/abp060mg.c @@ -168,7 +168,6 @@ static int abp060mg_read_raw(struct iio_dev *indio_dev, } static const struct iio_info abp060mg_info = { - .driver_module = THIS_MODULE, .read_raw = abp060mg_read_raw, }; diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c index 8f26428804a2..fd1da26a62e4 100644 --- a/drivers/iio/pressure/bmp280-core.c +++ b/drivers/iio/pressure/bmp280-core.c @@ -561,7 +561,6 @@ static const struct attribute_group bmp280_attrs_group = { }; static const struct iio_info bmp280_info = { - .driver_module = THIS_MODULE, .read_raw = &bmp280_read_raw, .write_raw = &bmp280_write_raw, .attrs = &bmp280_attrs_group, diff --git a/drivers/iio/pressure/cros_ec_baro.c b/drivers/iio/pressure/cros_ec_baro.c index 48b2a30f57ae..4599fde4dd25 100644 --- a/drivers/iio/pressure/cros_ec_baro.c +++ b/drivers/iio/pressure/cros_ec_baro.c @@ -120,14 +120,12 @@ static int cros_ec_baro_write(struct iio_dev *indio_dev, static const struct iio_info cros_ec_baro_info = { .read_raw = &cros_ec_baro_read, .write_raw = &cros_ec_baro_write, - .driver_module = THIS_MODULE, }; static int cros_ec_baro_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent); - struct cros_ec_device *ec_device; struct iio_dev *indio_dev; struct cros_ec_baro_state *state; struct iio_chan_spec *channel; @@ -137,7 +135,6 @@ static int cros_ec_baro_probe(struct platform_device *pdev) dev_warn(dev, "No CROS EC device found.\n"); return -EINVAL; } - ec_device = ec_dev->ec_dev; indio_dev = devm_iio_device_alloc(dev, sizeof(*state)); if (!indio_dev) diff --git a/drivers/iio/pressure/hid-sensor-press.c b/drivers/iio/pressure/hid-sensor-press.c index 6848d8c80eff..4c437918f1d2 100644 --- a/drivers/iio/pressure/hid-sensor-press.c +++ b/drivers/iio/pressure/hid-sensor-press.c @@ -160,7 +160,6 @@ static int press_write_raw(struct iio_dev *indio_dev, } static const struct iio_info press_info = { - .driver_module = THIS_MODULE, .read_raw = &press_read_raw, .write_raw = &press_write_raw, }; diff --git a/drivers/iio/pressure/hp03.c b/drivers/iio/pressure/hp03.c index 8c7b3ec3d84a..406934ea6228 100644 --- a/drivers/iio/pressure/hp03.c +++ b/drivers/iio/pressure/hp03.c @@ -208,7 +208,6 @@ static int hp03_read_raw(struct iio_dev *indio_dev, } static const struct iio_info hp03_info = { - .driver_module = THIS_MODULE, .read_raw = &hp03_read_raw, }; diff --git a/drivers/iio/pressure/hp206c.c b/drivers/iio/pressure/hp206c.c index 12f769e86355..c38c19678cf6 100644 --- a/drivers/iio/pressure/hp206c.c +++ b/drivers/iio/pressure/hp206c.c @@ -351,7 +351,6 @@ static const struct iio_info hp206c_info = { .attrs = &hp206c_attribute_group, .read_raw = hp206c_read_raw, .write_raw = hp206c_write_raw, - .driver_module = THIS_MODULE, }; static int hp206c_probe(struct i2c_client *client, diff --git a/drivers/iio/pressure/mpl115.c b/drivers/iio/pressure/mpl115.c index 8f2bce213248..ab4786d0102b 100644 --- a/drivers/iio/pressure/mpl115.c +++ b/drivers/iio/pressure/mpl115.c @@ -144,7 +144,6 @@ static const struct iio_chan_spec mpl115_channels[] = { static const struct iio_info mpl115_info = { .read_raw = &mpl115_read_raw, - .driver_module = THIS_MODULE, }; int mpl115_probe(struct device *dev, const char *name, diff --git a/drivers/iio/pressure/mpl3115.c b/drivers/iio/pressure/mpl3115.c index 619b963714c7..7537547fb7ee 100644 --- a/drivers/iio/pressure/mpl3115.c +++ b/drivers/iio/pressure/mpl3115.c @@ -218,7 +218,6 @@ static const struct iio_chan_spec mpl3115_channels[] = { static const struct iio_info mpl3115_info = { .read_raw = &mpl3115_read_raw, - .driver_module = THIS_MODULE, }; static int mpl3115_probe(struct i2c_client *client, diff --git a/drivers/iio/pressure/ms5611_core.c b/drivers/iio/pressure/ms5611_core.c index 2a77a2f15752..f950cfde5db9 100644 --- a/drivers/iio/pressure/ms5611_core.c +++ b/drivers/iio/pressure/ms5611_core.c @@ -384,7 +384,6 @@ static const struct iio_info ms5611_info = { .read_raw = &ms5611_read_raw, .write_raw = &ms5611_write_raw, .attrs = &ms5611_attribute_group, - .driver_module = THIS_MODULE, }; static int ms5611_init(struct iio_dev *indio_dev) diff --git a/drivers/iio/pressure/ms5637.c b/drivers/iio/pressure/ms5637.c index c413f8a84a63..e2f73e6dc58f 100644 --- a/drivers/iio/pressure/ms5637.c +++ b/drivers/iio/pressure/ms5637.c @@ -124,7 +124,6 @@ static const struct iio_info ms5637_info = { .read_raw = ms5637_read_raw, .write_raw = ms5637_write_raw, .attrs = &ms5637_attribute_group, - .driver_module = THIS_MODULE, }; static int ms5637_probe(struct i2c_client *client, diff --git a/drivers/iio/pressure/st_pressure.h b/drivers/iio/pressure/st_pressure.h index 7d995937adba..e67eb0d971bf 100644 --- a/drivers/iio/pressure/st_pressure.h +++ b/drivers/iio/pressure/st_pressure.h @@ -19,6 +19,8 @@ enum st_press_type { LPS25H, LPS331AP, LPS22HB, + LPS33HW, + LPS35HW, ST_PRESS_MAX, }; @@ -26,6 +28,8 @@ enum st_press_type { #define LPS25H_PRESS_DEV_NAME "lps25h" #define LPS331AP_PRESS_DEV_NAME "lps331ap" #define LPS22HB_PRESS_DEV_NAME "lps22hb" +#define LPS33HW_PRESS_DEV_NAME "lps33hw" +#define LPS35HW_PRESS_DEV_NAME "lps35hw" /** * struct st_sensors_platform_data - default press platform data diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c index 34611a8ea2ce..349e5c713c03 100644 --- a/drivers/iio/pressure/st_pressure_core.c +++ b/drivers/iio/pressure/st_pressure_core.c @@ -280,14 +280,28 @@ static const struct st_sensor_settings st_press_sensors_settings[] = { .mask = 0x04, }, .drdy_irq = { - .addr = 0x22, - .mask_int1 = 0x04, - .mask_int2 = 0x20, + .int1 = { + .addr = 0x22, + .mask = 0x04, + .addr_od = 0x22, + .mask_od = 0x40, + }, + .int2 = { + .addr = 0x22, + .mask = 0x20, + .addr_od = 0x22, + .mask_od = 0x40, + }, .addr_ihl = 0x22, .mask_ihl = 0x80, - .addr_od = 0x22, - .mask_od = 0x40, - .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, + .stat_drdy = { + .addr = ST_SENSORS_DEFAULT_STAT_ADDR, + .mask = 0x03, + }, + }, + .sim = { + .addr = 0x20, + .value = BIT(0), }, .multi_read_bit = true, .bootime = 2, @@ -335,8 +349,9 @@ static const struct st_sensor_settings st_press_sensors_settings[] = { .addr = 0x20, .mask = 0x04, }, - .drdy_irq = { - .addr = 0, + .sim = { + .addr = 0x20, + .value = BIT(0), }, .multi_read_bit = true, .bootime = 2, @@ -388,14 +403,22 @@ static const struct st_sensor_settings st_press_sensors_settings[] = { .mask = 0x04, }, .drdy_irq = { - .addr = 0x23, - .mask_int1 = 0x01, - .mask_int2 = 0x00, + .int1 = { + .addr = 0x23, + .mask = 0x01, + .addr_od = 0x22, + .mask_od = 0x40, + }, .addr_ihl = 0x22, .mask_ihl = 0x80, - .addr_od = 0x22, - .mask_od = 0x40, - .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, + .stat_drdy = { + .addr = ST_SENSORS_DEFAULT_STAT_ADDR, + .mask = 0x03, + }, + }, + .sim = { + .addr = 0x20, + .value = BIT(0), }, .multi_read_bit = true, .bootime = 2, @@ -410,6 +433,8 @@ static const struct st_sensor_settings st_press_sensors_settings[] = { .wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS, .sensors_supported = { [0] = LPS22HB_PRESS_DEV_NAME, + [1] = LPS33HW_PRESS_DEV_NAME, + [2] = LPS35HW_PRESS_DEV_NAME, }, .ch = (struct iio_chan_spec *)st_press_lps22hb_channels, .num_ch = ARRAY_SIZE(st_press_lps22hb_channels), @@ -447,14 +472,22 @@ static const struct st_sensor_settings st_press_sensors_settings[] = { .mask = 0x02, }, .drdy_irq = { - .addr = 0x12, - .mask_int1 = 0x04, - .mask_int2 = 0x00, + .int1 = { + .addr = 0x12, + .mask = 0x04, + .addr_od = 0x12, + .mask_od = 0x40, + }, .addr_ihl = 0x12, .mask_ihl = 0x80, - .addr_od = 0x12, - .mask_od = 0x40, - .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, + .stat_drdy = { + .addr = ST_SENSORS_DEFAULT_STAT_ADDR, + .mask = 0x03, + }, + }, + .sim = { + .addr = 0x10, + .value = BIT(0), }, .multi_read_bit = false, .bootime = 2, @@ -547,7 +580,6 @@ static const struct attribute_group st_press_attribute_group = { }; static const struct iio_info press_info = { - .driver_module = THIS_MODULE, .attrs = &st_press_attribute_group, .read_raw = &st_press_read_raw, .write_raw = &st_press_write_raw, @@ -556,7 +588,6 @@ static const struct iio_info press_info = { #ifdef CONFIG_IIO_TRIGGER static const struct iio_trigger_ops st_press_trigger_ops = { - .owner = THIS_MODULE, .set_trigger_state = ST_PRESS_TRIGGER_SET_STATE, .validate_device = st_sensors_validate_device, }; @@ -605,7 +636,8 @@ int st_press_common_probe(struct iio_dev *indio_dev) press_data->odr = press_data->sensor_settings->odr.odr_avl[0].hz; /* Some devices don't support a data ready pin. */ - if (!pdata && press_data->sensor_settings->drdy_irq.addr) + if (!pdata && (press_data->sensor_settings->drdy_irq.int1.addr || + press_data->sensor_settings->drdy_irq.int2.addr)) pdata = (struct st_sensors_platform_data *)&default_press_pdata; err = st_sensors_init_sensor(indio_dev, press_data->dev->platform_data); diff --git a/drivers/iio/pressure/st_pressure_i2c.c b/drivers/iio/pressure/st_pressure_i2c.c index 7f15e927fa2b..fbb59059e942 100644 --- a/drivers/iio/pressure/st_pressure_i2c.c +++ b/drivers/iio/pressure/st_pressure_i2c.c @@ -37,6 +37,14 @@ static const struct of_device_id st_press_of_match[] = { .compatible = "st,lps22hb-press", .data = LPS22HB_PRESS_DEV_NAME, }, + { + .compatible = "st,lps33hw", + .data = LPS33HW_PRESS_DEV_NAME, + }, + { + .compatible = "st,lps35hw", + .data = LPS35HW_PRESS_DEV_NAME, + }, {}, }; MODULE_DEVICE_TABLE(of, st_press_of_match); @@ -59,6 +67,8 @@ static const struct i2c_device_id st_press_id_table[] = { { LPS25H_PRESS_DEV_NAME, LPS25H }, { LPS331AP_PRESS_DEV_NAME, LPS331AP }, { LPS22HB_PRESS_DEV_NAME, LPS22HB }, + { LPS33HW_PRESS_DEV_NAME, LPS33HW }, + { LPS35HW_PRESS_DEV_NAME, LPS35HW }, {}, }; MODULE_DEVICE_TABLE(i2c, st_press_id_table); diff --git a/drivers/iio/pressure/st_pressure_spi.c b/drivers/iio/pressure/st_pressure_spi.c index f5ebd36bb4bf..9a3441b128e7 100644 --- a/drivers/iio/pressure/st_pressure_spi.c +++ b/drivers/iio/pressure/st_pressure_spi.c @@ -41,6 +41,14 @@ static const struct of_device_id st_press_of_match[] = { .compatible = "st,lps22hb-press", .data = LPS22HB_PRESS_DEV_NAME, }, + { + .compatible = "st,lps33hw", + .data = LPS33HW_PRESS_DEV_NAME, + }, + { + .compatible = "st,lps35hw", + .data = LPS35HW_PRESS_DEV_NAME, + }, {}, }; MODULE_DEVICE_TABLE(of, st_press_of_match); @@ -83,6 +91,8 @@ static const struct spi_device_id st_press_id_table[] = { { LPS25H_PRESS_DEV_NAME }, { LPS331AP_PRESS_DEV_NAME }, { LPS22HB_PRESS_DEV_NAME }, + { LPS33HW_PRESS_DEV_NAME }, + { LPS35HW_PRESS_DEV_NAME }, {}, }; MODULE_DEVICE_TABLE(spi, st_press_id_table); diff --git a/drivers/iio/pressure/t5403.c b/drivers/iio/pressure/t5403.c index 2667e71721f5..92c00f603b1d 100644 --- a/drivers/iio/pressure/t5403.c +++ b/drivers/iio/pressure/t5403.c @@ -209,7 +209,6 @@ static const struct iio_info t5403_info = { .read_raw = &t5403_read_raw, .write_raw = &t5403_write_raw, .attrs = &t5403_attribute_group, - .driver_module = THIS_MODULE, }; static int t5403_probe(struct i2c_client *client, diff --git a/drivers/iio/pressure/zpa2326.c b/drivers/iio/pressure/zpa2326.c index 91431454eb85..81d8f24eaeb4 100644 --- a/drivers/iio/pressure/zpa2326.c +++ b/drivers/iio/pressure/zpa2326.c @@ -1390,7 +1390,6 @@ static int zpa2326_set_trigger_state(struct iio_trigger *trig, bool state) } static const struct iio_trigger_ops zpa2326_trigger_ops = { - .owner = THIS_MODULE, .set_trigger_state = zpa2326_set_trigger_state, }; @@ -1590,7 +1589,6 @@ static const struct iio_chan_spec zpa2326_channels[] = { }; static const struct iio_info zpa2326_info = { - .driver_module = THIS_MODULE, .attrs = &zpa2326_attribute_group, .read_raw = zpa2326_read_raw, .write_raw = zpa2326_write_raw, |