On Thu, Jun 10, 2021 at 3:24 PM Stephan Gerhold <stephan@xxxxxxxxxxx> wrote: > > Commit c1d1c4a62db5 ("iio: accel: bma180: BMA254 support") added > BMA254 support to the bma180 driver and changed some naming to BMA25x > to make it easier to add support for BMA253 and BMA255. > > Unfortunately, there is quite some overlap between the bma180 driver > and the bmc150-accel driver. Back when the commit was made, the > bmc150-accel driver actually already had support for BMA255, and > adding support for BMA254 would have been as simple as adding a new > compatible to bmc150-accel. > > The bmc150-accel driver is a bit better for BMA254 since it also > supports the motion trigger/interrupt functionality. Fortunately, > moving BMA254 support over to bmc150-accel is fairly simple because > the drivers have compatible device tree bindings. > > Revert most of the changes for BMA254 support in bma180 and move > BMA254 over to bmc150-accel. This has the following advantages: > > - Support for motion trigger/interrupt > - Fix incorrect scale values (BMA254 currently uses the same as > BMA250 but actually they're different because of 10 vs 12 bits > data size) > - Less code than before :) > > BMA250 could be potentially also moved but it's more complicated > because its chip_id conflicts with the one for BMA222 in bmc150-accel. > Perhaps there are also other register differences, I did not investigate > further yet (and I have no way to test it). ... > Say Y here if you want to build a driver for the Bosch BMA023, BMA150 > - BMA180, SMB380, or BMA25x triaxial acceleration sensor. > + BMA180, SMB380, or BMA250 triaxial acceleration sensor. Unsorted before and after. ... > - .name = "BMC150/BMI055/BMA253/BMA255", > + .name = "BMC150/BMI055/BMA253/BMA254/BMA255", Ditto. -- With Best Regards, Andy Shevchenko