#include <linux/iio/iio.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/mfd/core.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/property.h>
#include "ssp.h"
#define SSP_WDT_TIME …
#define SSP_LIMIT_RESET_CNT …
#define SSP_LIMIT_TIMEOUT_CNT …
#define SSP_BOOT_SPI_HZ …
struct ssp_instruction { … } __attribute__((packed));
static const u8 ssp_magnitude_table[] = …;
static const struct ssp_sensorhub_info ssp_rinato_info = …;
static const struct ssp_sensorhub_info ssp_thermostat_info = …;
static const struct mfd_cell sensorhub_sensor_devs[] = …;
static void ssp_toggle_mcu_reset_gpio(struct ssp_data *data)
{ … }
static void ssp_sync_available_sensors(struct ssp_data *data)
{ … }
static void ssp_enable_mcu(struct ssp_data *data, bool enable)
{ … }
static int ssp_check_fwbl(struct ssp_data *data)
{ … }
static void ssp_reset_mcu(struct ssp_data *data)
{ … }
static void ssp_wdt_work_func(struct work_struct *work)
{ … }
static void ssp_wdt_timer_func(struct timer_list *t)
{ … }
static void ssp_enable_wdt_timer(struct ssp_data *data)
{ … }
static void ssp_disable_wdt_timer(struct ssp_data *data)
{ … }
u32 ssp_get_sensor_delay(struct ssp_data *data, enum ssp_sensor_type type)
{ … }
EXPORT_SYMBOL_NS(…);
int ssp_enable_sensor(struct ssp_data *data, enum ssp_sensor_type type,
u32 delay)
{ … }
EXPORT_SYMBOL_NS(…);
int ssp_change_delay(struct ssp_data *data, enum ssp_sensor_type type,
u32 delay)
{ … }
EXPORT_SYMBOL_NS(…);
int ssp_disable_sensor(struct ssp_data *data, enum ssp_sensor_type type)
{ … }
EXPORT_SYMBOL_NS(…);
static irqreturn_t ssp_irq_thread_fn(int irq, void *dev_id)
{ … }
static int ssp_initialize_mcu(struct ssp_data *data)
{ … }
static void ssp_refresh_task(struct work_struct *work)
{ … }
int ssp_queue_ssp_refresh_task(struct ssp_data *data, unsigned int delay)
{ … }
static const struct of_device_id ssp_of_match[] = …;
MODULE_DEVICE_TABLE(of, ssp_of_match);
static struct ssp_data *ssp_parse_dt(struct device *dev)
{ … }
void ssp_register_consumer(struct iio_dev *indio_dev, enum ssp_sensor_type type)
{ … }
EXPORT_SYMBOL_NS(…);
static int ssp_probe(struct spi_device *spi)
{ … }
static void ssp_remove(struct spi_device *spi)
{ … }
static int ssp_suspend(struct device *dev)
{ … }
static int ssp_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(ssp_pm_ops, ssp_suspend, ssp_resume);
static struct spi_driver ssp_driver = …;
module_spi_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;