On 25.07.19 18:04, Lorenzo Bianconi wrote: > > On 25.07.19 09:04, Lorenzo Bianconi wrote: > > > > The LSM9DS1's accelerometer / gyroscope unit and it's magnetometer > > (separately > > supported in iio/magnetometer/st_magn*) are located on a separate > > i2c addresses > > on the bus. > > > > For the datasheet, see > > https://www.st.com/resource/en/datasheet/lsm9ds1.pdf > <https://www.st.com/resource/en/datasheet/lsm9ds1.pdf> > > <https://www.st.com/resource/en/datasheet/lsm9ds1.pdf > <https://www.st.com/resource/en/datasheet/lsm9ds1.pdf>> > > > > Treat it just like the LSM6* devices and, despite it's name, > hook it up > > to the st_lsm6dsx driver, using it's basic functionality. > > > > Signed-off-by: Martin Kepplinger <martin.kepplinger@xxxxxxx > <mailto:martin.kepplinger@xxxxxxx> > > <mailto:martin.kepplinger@xxxxxxx > <mailto:martin.kepplinger@xxxxxxx>>> > > > > > > > > Hi Martin, > > > > could you please check if LSM9DS1 and LSM6DS0 have a common > register map > > for the supported features (I think so)? If so I think it is better to > > rename LSM9DS1 in LSM6DS0 since st_lsm6dsx supports just acc and gyro > > (we will support LSM9DS1 with a proper dts configuration) > > > > Regards, > > Lorenzo > > Hi Lorenzo, > > The register mappings of LSM6DSO and LSM9DS1 don't match (gyro out for > example). The LSM9DS1 magnetometer is a *different* device on the bus > than accel/gyro (despite being on the same chip). That one is already > supported in drivers/iio/magnetometer/st_magn_* > > So LSM9DS1 in the imu driver (lsm6dsx) can also just support accel and > gyro in order to complete the support for the device. > > Besides, that's the device I have and test here. I can't really name it > differently. > > > I mean LSM6DS0, not LSMDSO..the datasheet is not on st website, but you > can find easily on the web..AFAIK this device shares the registermap > with LSM9DS1 imu device. So I guess we can rename the struct from > st_lsm9ds1 (which is not just an imu) to st_lsm6ds0. I guess it is more > correct. > Seems like they are equal enough (LSM6DS0 has only one interrupt line, but we should be able to add it anyways I guess). Makes sense to name things after that then, yes. At least in code. I'll update next week. thanks, martin