2024-09-12 17:07:19 -04:00
|
|
|
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
|
|
|
|
|
|
|
#ifndef BMI270_H_
|
|
|
|
#define BMI270_H_
|
|
|
|
|
|
|
|
#include <linux/regmap.h>
|
2024-10-01 23:36:22 -04:00
|
|
|
#include <linux/iio/iio.h>
|
2024-09-12 17:07:19 -04:00
|
|
|
|
2024-10-20 15:00:06 -07:00
|
|
|
struct bmi270_chip_info {
|
|
|
|
const char *name;
|
|
|
|
int chip_id;
|
|
|
|
const char *fw_name;
|
2024-09-12 17:07:19 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
extern const struct regmap_config bmi270_regmap_config;
|
iio: imu: bmi270: Add support for BMI260
Adds support for the Bosch BMI260 6-axis IMU to the Bosch BMI270
driver. Setup and operation is nearly identical to the Bosch BMI270,
but has a different chip ID and requires different firmware.
Firmware is requested and loaded from userspace.
Adds ACPI ID BMI0160, used by several devices including the GPD Win
Mini, Aya Neo AIR Pro, and OXP Mini Pro.
GPD Win Mini:
Device (BMI2)
{
Name (_ADR, Zero) // _ADR: Address
Name (_HID, "BMI0160") // _HID: Hardware ID
Name (_CID, "BMI0160") // _CID: Compatible ID
Name (_DDN, "Accelerometer") // _DDN: DOS Device Name
Name (_UID, One) // _UID: Unique ID
Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
{
Name (RBUF, ResourceTemplate ()
{
I2cSerialBusV2 (0x0068, ControllerInitiated, 0x00061A80,
AddressingMode7Bit, "\\_SB.I2CB",
0x00, ResourceConsumer, , Exclusive,
)
GpioInt (Edge, ActiveLow, Exclusive, PullDefault, 0x0000,
"\\_SB.GPIO", 0x00, ResourceConsumer, ,
)
{ // Pin list
0x008B
}
})
Return (RBUF) /* \_SB_.I2CB.BMI2._CRS.RBUF */
}
...
}
Signed-off-by: Justin Weiss <justin@justinweiss.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241027172029.160134-5-justin@justinweiss.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-10-27 10:20:25 -07:00
|
|
|
extern const struct bmi270_chip_info bmi260_chip_info;
|
2024-10-20 15:00:06 -07:00
|
|
|
extern const struct bmi270_chip_info bmi270_chip_info;
|
2024-09-12 17:07:19 -04:00
|
|
|
|
2025-02-19 20:54:45 -03:00
|
|
|
struct device;
|
2024-10-20 15:00:06 -07:00
|
|
|
int bmi270_core_probe(struct device *dev, struct regmap *regmap,
|
|
|
|
const struct bmi270_chip_info *chip_info);
|
2024-09-12 17:07:19 -04:00
|
|
|
|
2025-05-25 16:25:29 +02:00
|
|
|
extern const struct dev_pm_ops bmi270_core_pm_ops;
|
|
|
|
|
2024-09-12 17:07:19 -04:00
|
|
|
#endif /* BMI270_H_ */
|