/* * From BMI323 datasheet section 4: Notes on the Serial Interface Support. * Each I2C register read operation requires to read two dummy bytes before * the actual payload.
*/ staticint bmi323_regmap_i2c_read(void *context, constvoid *reg_buf,
size_t reg_size, void *val_buf,
size_t val_size)
{ struct bmi323_i2c_priv *priv = context; struct i2c_msg msgs[2]; int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM;
priv->i2c = i2c;
regmap = devm_regmap_init(dev, &bmi323_regmap_bus, priv,
&bmi323_i2c_regmap_config); if (IS_ERR(regmap)) return dev_err_probe(dev, PTR_ERR(regmap), "Failed to initialize I2C Regmap\n");
return bmi323_core_probe(dev);
}
staticconststruct acpi_device_id bmi323_acpi_match[] = { /* * The "BOSC0200" identifier used here is not unique to bmi323 devices. * The same "BOSC0200" identifier is found in the ACPI tables of devices * using the bmc150 chip. This creates a conflict with duplicate ACPI * identifiers which multiple drivers want to use. If a non-bmi323 * device starts to load with this "BOSC0200" ACPI match here, then the * chip ID check portion should fail because the chip IDs received (via * i2c) are unique between bmc150 and bmi323 and the driver should * relinquish the device. If and when a different driver (such as * bmc150) starts to load with the "BOSC0200" ACPI match, a short reset * should ensure that the device is not in a bad state during that * driver initialization. This device reset does occur in both the * bmi323 and bmc150 init sequences.
*/
{ "BOSC0200" },
{ }
};
MODULE_DEVICE_TABLE(acpi, bmi323_acpi_match);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.