linux/drivers/iio/imu/bmi323/bmi323_spi.c

// SPDX-License-Identifier: GPL-2.0
/*
 * SPI driver for Bosch BMI323 6-Axis IMU.
 *
 * Copyright (C) 2023, Jagath Jog J <[email protected]>
 */

#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>

#include "bmi323.h"

/*
 * From BMI323 datasheet section 4: Notes on the Serial Interface Support.
 * Each SPI register read operation requires to read one dummy byte before
 * the actual payload.
 */
static int bmi323_regmap_spi_read(void *context, const void *reg_buf,
				  size_t reg_size, void *val_buf,
				  size_t val_size)
{}

static int bmi323_regmap_spi_write(void *context, const void *data,
				   size_t count)
{}

static struct regmap_bus bmi323_regmap_bus =;

static const struct regmap_config bmi323_spi_regmap_config =;

static int bmi323_spi_probe(struct spi_device *spi)
{}

static const struct spi_device_id bmi323_spi_ids[] =;
MODULE_DEVICE_TABLE(spi, bmi323_spi_ids);

static const struct of_device_id bmi323_of_spi_match[] =;
MODULE_DEVICE_TABLE(of, bmi323_of_spi_match);

static struct spi_driver bmi323_spi_driver =;
module_spi_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_IMPORT_NS();