* [PATCH 0/2] Revert "iio: accel: bma180: Add support for BMA250E" @ 2017-06-06 20:35 Hans de Goede 2017-06-06 20:35 ` [PATCH 1/2] Revert "iio: accel: bma180: Add ACPI enumeration " Hans de Goede 2017-06-06 20:35 ` [PATCH 2/2] Revert "iio: accel: bma180: Add " Hans de Goede 0 siblings, 2 replies; 5+ messages in thread From: Hans de Goede @ 2017-06-06 20:35 UTC (permalink / raw) To: Greg Kroah-Hartman, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler Cc: linux-iio Hi Greg, et al., When I submitted my patch to add support for the BMA250E chip to the bma180 driver, I completely missed that this chip is already supported by the bmc150 driver (my bad). Since the patches to wrongly add th BMA250E support to the bma180 driver have already been added to staging-next, I'm submitting 2 reverts to undo the damage. Alternatively the 2 offending commits could be dropped from staging-next. Regards, Hans ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] Revert "iio: accel: bma180: Add ACPI enumeration support for BMA250E" 2017-06-06 20:35 [PATCH 0/2] Revert "iio: accel: bma180: Add support for BMA250E" Hans de Goede @ 2017-06-06 20:35 ` Hans de Goede 2017-06-11 13:53 ` Jonathan Cameron 2017-06-06 20:35 ` [PATCH 2/2] Revert "iio: accel: bma180: Add " Hans de Goede 1 sibling, 1 reply; 5+ messages in thread From: Hans de Goede @ 2017-06-06 20:35 UTC (permalink / raw) To: Greg Kroah-Hartman, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler Cc: linux-iio, Hans de Goede This reverts commit 5333e88661f2079d5ca8b94690ac920976300de3. The BMA250E is already handled by the bmc150-accel-i2c driver, which supports the "E" variants of the BMA??? accelerometers better then the bma180 driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/iio/accel/bma180.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 17b7953..3d66948 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -14,7 +14,6 @@ * BMA250: 7-bit I2C slave address 0x18 or 0x19 */ -#include <linux/acpi.h> #include <linux/module.h> #include <linux/i2c.h> #include <linux/interrupt.h> @@ -728,8 +727,6 @@ static const struct iio_trigger_ops bma180_trigger_ops = { static int bma180_probe(struct i2c_client *client, const struct i2c_device_id *id) { - struct device *dev = &client->dev; - const struct acpi_device_id *acpi_id; struct bma180_data *data; struct iio_dev *indio_dev; enum chip_ids chip; @@ -742,17 +739,10 @@ static int bma180_probe(struct i2c_client *client, data = iio_priv(indio_dev); i2c_set_clientdata(client, indio_dev); data->client = client; - if (dev->of_node) { + if (client->dev.of_node) chip = (enum chip_ids)of_device_get_match_data(&client->dev); - } else if (id) { + else chip = id->driver_data; - } else { - acpi_id = acpi_match_device(dev->driver->acpi_match_table, dev); - if (!acpi_id) - return -ENODEV; - - chip = acpi_id->driver_data; - } data->part_info = &bma180_part_info[chip]; ret = data->part_info->chip_config(data); @@ -873,12 +863,6 @@ static SIMPLE_DEV_PM_OPS(bma180_pm_ops, bma180_suspend, bma180_resume); #define BMA180_PM_OPS NULL #endif -static const struct acpi_device_id bma180_acpi_match[] = { - { "BMA250E", BMA250E }, - { } -}; -MODULE_DEVICE_TABLE(acpi, bma180_acpi_match); - static struct i2c_device_id bma180_ids[] = { { "bma180", BMA180 }, { "bma250", BMA250 }, @@ -904,7 +888,6 @@ MODULE_DEVICE_TABLE(of, bma180_of_match); static struct i2c_driver bma180_driver = { .driver = { .name = "bma180", - .acpi_match_table = ACPI_PTR(bma180_acpi_match), .pm = BMA180_PM_OPS, .of_match_table = bma180_of_match, }, -- 2.9.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Revert "iio: accel: bma180: Add ACPI enumeration support for BMA250E" 2017-06-06 20:35 ` [PATCH 1/2] Revert "iio: accel: bma180: Add ACPI enumeration " Hans de Goede @ 2017-06-11 13:53 ` Jonathan Cameron 0 siblings, 0 replies; 5+ messages in thread From: Jonathan Cameron @ 2017-06-11 13:53 UTC (permalink / raw) To: Hans de Goede Cc: Greg Kroah-Hartman, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio On Tue, 6 Jun 2017 22:35:37 +0200 Hans de Goede <hdegoede@redhat.com> wrote: > This reverts commit 5333e88661f2079d5ca8b94690ac920976300de3. > > The BMA250E is already handled by the bmc150-accel-i2c driver, which > supports the "E" variants of the BMA??? accelerometers better then the > bma180 driver. Doh. I missed that entirely... > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > drivers/iio/accel/bma180.c | 21 ++------------------- > 1 file changed, 2 insertions(+), 19 deletions(-) > > diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c > index 17b7953..3d66948 100644 > --- a/drivers/iio/accel/bma180.c > +++ b/drivers/iio/accel/bma180.c > @@ -14,7 +14,6 @@ > * BMA250: 7-bit I2C slave address 0x18 or 0x19 > */ > > -#include <linux/acpi.h> > #include <linux/module.h> > #include <linux/i2c.h> > #include <linux/interrupt.h> > @@ -728,8 +727,6 @@ static const struct iio_trigger_ops bma180_trigger_ops = { > static int bma180_probe(struct i2c_client *client, > const struct i2c_device_id *id) > { > - struct device *dev = &client->dev; > - const struct acpi_device_id *acpi_id; > struct bma180_data *data; > struct iio_dev *indio_dev; > enum chip_ids chip; > @@ -742,17 +739,10 @@ static int bma180_probe(struct i2c_client *client, > data = iio_priv(indio_dev); > i2c_set_clientdata(client, indio_dev); > data->client = client; > - if (dev->of_node) { > + if (client->dev.of_node) > chip = (enum chip_ids)of_device_get_match_data(&client->dev); > - } else if (id) { > + else > chip = id->driver_data; > - } else { > - acpi_id = acpi_match_device(dev->driver->acpi_match_table, dev); > - if (!acpi_id) > - return -ENODEV; > - > - chip = acpi_id->driver_data; > - } > data->part_info = &bma180_part_info[chip]; > > ret = data->part_info->chip_config(data); > @@ -873,12 +863,6 @@ static SIMPLE_DEV_PM_OPS(bma180_pm_ops, bma180_suspend, bma180_resume); > #define BMA180_PM_OPS NULL > #endif > > -static const struct acpi_device_id bma180_acpi_match[] = { > - { "BMA250E", BMA250E }, > - { } > -}; > -MODULE_DEVICE_TABLE(acpi, bma180_acpi_match); > - > static struct i2c_device_id bma180_ids[] = { > { "bma180", BMA180 }, > { "bma250", BMA250 }, > @@ -904,7 +888,6 @@ MODULE_DEVICE_TABLE(of, bma180_of_match); > static struct i2c_driver bma180_driver = { > .driver = { > .name = "bma180", > - .acpi_match_table = ACPI_PTR(bma180_acpi_match), > .pm = BMA180_PM_OPS, > .of_match_table = bma180_of_match, > }, ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] Revert "iio: accel: bma180: Add support for BMA250E" 2017-06-06 20:35 [PATCH 0/2] Revert "iio: accel: bma180: Add support for BMA250E" Hans de Goede 2017-06-06 20:35 ` [PATCH 1/2] Revert "iio: accel: bma180: Add ACPI enumeration " Hans de Goede @ 2017-06-06 20:35 ` Hans de Goede 2017-06-11 13:53 ` Jonathan Cameron 1 sibling, 1 reply; 5+ messages in thread From: Hans de Goede @ 2017-06-06 20:35 UTC (permalink / raw) To: Greg Kroah-Hartman, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler Cc: linux-iio, Hans de Goede This reverts commit f1320b09517bceb261fed887fe261d6cbab2094e. The BMA250E is already handled by the bmc150-accel-i2c driver, which supports the "E" variants of the BMA??? accelerometers better then the bma180 driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/iio/accel/bma180.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 3d66948..efc6773 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -36,7 +36,6 @@ enum chip_ids { BMA180, BMA250, - BMA250E, }; struct bma180_data; @@ -56,7 +55,6 @@ struct bma180_part_info { u8 power_reg, power_mask, lowpower_val; u8 int_enable_reg, int_enable_mask; u8 softreset_reg; - u8 chip_id; int (*chip_config)(struct bma180_data *data); void (*chip_disable)(struct bma180_data *data); @@ -114,8 +112,6 @@ struct bma180_part_info { #define BMA250_INT1_DATA_MASK BIT(0) #define BMA250_INT_RESET_MASK BIT(7) /* Reset pending interrupts */ -#define BMA250E_CHIP_ID 0xf9 - struct bma180_data { struct i2c_client *client; struct iio_trigger *trig; @@ -313,7 +309,7 @@ static int bma180_chip_init(struct bma180_data *data) if (ret < 0) return ret; - if (ret != data->part_info->chip_id) + if (ret != BMA180_ID_REG_VAL) return -ENODEV; ret = bma180_soft_reset(data); @@ -636,7 +632,6 @@ static const struct bma180_part_info bma180_part_info[] = { BMA180_TCO_Z, BMA180_MODE_CONFIG, BMA180_LOW_POWER, BMA180_CTRL_REG3, BMA180_NEW_DATA_INT, BMA180_RESET, - BMA180_CHIP_ID, bma180_chip_config, bma180_chip_disable, }, @@ -651,22 +646,6 @@ static const struct bma180_part_info bma180_part_info[] = { BMA250_POWER_REG, BMA250_LOWPOWER_MASK, 1, BMA250_INT_ENABLE_REG, BMA250_DATA_INTEN_MASK, BMA250_RESET_REG, - BMA180_CHIP_ID, - bma250_chip_config, - bma250_chip_disable, - }, - [BMA250E] = { - bma250_channels, ARRAY_SIZE(bma250_channels), - bma250_scale_table, ARRAY_SIZE(bma250_scale_table), - bma250_bw_table, ARRAY_SIZE(bma250_bw_table), - BMA250_INT_RESET_REG, BMA250_INT_RESET_MASK, - BMA250_POWER_REG, BMA250_SUSPEND_MASK, - BMA250_BW_REG, BMA250_BW_MASK, - BMA250_RANGE_REG, BMA250_RANGE_MASK, - BMA250_POWER_REG, BMA250_LOWPOWER_MASK, 1, - BMA250_INT_ENABLE_REG, BMA250_DATA_INTEN_MASK, - BMA250_RESET_REG, - BMA250E_CHIP_ID, bma250_chip_config, bma250_chip_disable, }, @@ -866,7 +845,6 @@ static SIMPLE_DEV_PM_OPS(bma180_pm_ops, bma180_suspend, bma180_resume); static struct i2c_device_id bma180_ids[] = { { "bma180", BMA180 }, { "bma250", BMA250 }, - { "bma250e", BMA250E }, { } }; -- 2.9.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Revert "iio: accel: bma180: Add support for BMA250E" 2017-06-06 20:35 ` [PATCH 2/2] Revert "iio: accel: bma180: Add " Hans de Goede @ 2017-06-11 13:53 ` Jonathan Cameron 0 siblings, 0 replies; 5+ messages in thread From: Jonathan Cameron @ 2017-06-11 13:53 UTC (permalink / raw) To: Hans de Goede Cc: Greg Kroah-Hartman, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio On Tue, 6 Jun 2017 22:35:38 +0200 Hans de Goede <hdegoede@redhat.com> wrote: > This reverts commit f1320b09517bceb261fed887fe261d6cbab2094e. > > The BMA250E is already handled by the bmc150-accel-i2c driver, which > supports the "E" variants of the BMA??? accelerometers better then the > bma180 driver. > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > drivers/iio/accel/bma180.c | 24 +----------------------- > 1 file changed, 1 insertion(+), 23 deletions(-) > > diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c > index 3d66948..efc6773 100644 > --- a/drivers/iio/accel/bma180.c > +++ b/drivers/iio/accel/bma180.c > @@ -36,7 +36,6 @@ > enum chip_ids { > BMA180, > BMA250, > - BMA250E, > }; > > struct bma180_data; > @@ -56,7 +55,6 @@ struct bma180_part_info { > u8 power_reg, power_mask, lowpower_val; > u8 int_enable_reg, int_enable_mask; > u8 softreset_reg; > - u8 chip_id; > > int (*chip_config)(struct bma180_data *data); > void (*chip_disable)(struct bma180_data *data); > @@ -114,8 +112,6 @@ struct bma180_part_info { > #define BMA250_INT1_DATA_MASK BIT(0) > #define BMA250_INT_RESET_MASK BIT(7) /* Reset pending interrupts */ > > -#define BMA250E_CHIP_ID 0xf9 > - > struct bma180_data { > struct i2c_client *client; > struct iio_trigger *trig; > @@ -313,7 +309,7 @@ static int bma180_chip_init(struct bma180_data *data) > > if (ret < 0) > return ret; > - if (ret != data->part_info->chip_id) > + if (ret != BMA180_ID_REG_VAL) > return -ENODEV; > > ret = bma180_soft_reset(data); > @@ -636,7 +632,6 @@ static const struct bma180_part_info bma180_part_info[] = { > BMA180_TCO_Z, BMA180_MODE_CONFIG, BMA180_LOW_POWER, > BMA180_CTRL_REG3, BMA180_NEW_DATA_INT, > BMA180_RESET, > - BMA180_CHIP_ID, > bma180_chip_config, > bma180_chip_disable, > }, > @@ -651,22 +646,6 @@ static const struct bma180_part_info bma180_part_info[] = { > BMA250_POWER_REG, BMA250_LOWPOWER_MASK, 1, > BMA250_INT_ENABLE_REG, BMA250_DATA_INTEN_MASK, > BMA250_RESET_REG, > - BMA180_CHIP_ID, > - bma250_chip_config, > - bma250_chip_disable, > - }, > - [BMA250E] = { > - bma250_channels, ARRAY_SIZE(bma250_channels), > - bma250_scale_table, ARRAY_SIZE(bma250_scale_table), > - bma250_bw_table, ARRAY_SIZE(bma250_bw_table), > - BMA250_INT_RESET_REG, BMA250_INT_RESET_MASK, > - BMA250_POWER_REG, BMA250_SUSPEND_MASK, > - BMA250_BW_REG, BMA250_BW_MASK, > - BMA250_RANGE_REG, BMA250_RANGE_MASK, > - BMA250_POWER_REG, BMA250_LOWPOWER_MASK, 1, > - BMA250_INT_ENABLE_REG, BMA250_DATA_INTEN_MASK, > - BMA250_RESET_REG, > - BMA250E_CHIP_ID, > bma250_chip_config, > bma250_chip_disable, > }, > @@ -866,7 +845,6 @@ static SIMPLE_DEV_PM_OPS(bma180_pm_ops, bma180_suspend, bma180_resume); > static struct i2c_device_id bma180_ids[] = { > { "bma180", BMA180 }, > { "bma250", BMA250 }, > - { "bma250e", BMA250E }, > { } > }; > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-11 13:54 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-06-06 20:35 [PATCH 0/2] Revert "iio: accel: bma180: Add support for BMA250E" Hans de Goede 2017-06-06 20:35 ` [PATCH 1/2] Revert "iio: accel: bma180: Add ACPI enumeration " Hans de Goede 2017-06-11 13:53 ` Jonathan Cameron 2017-06-06 20:35 ` [PATCH 2/2] Revert "iio: accel: bma180: Add " Hans de Goede 2017-06-11 13:53 ` Jonathan Cameron
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).