#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/devm-helpers.h>
#include <linux/dma-mapping.h>
#include <linux/dmi.h>
#include <linux/interrupt.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/slab.h>
#include "amd_sfh_pcie.h"
#include "sfh1_1/amd_sfh_init.h"
#define DRIVER_NAME …
#define DRIVER_DESC …
#define ACEL_EN …
#define GYRO_EN …
#define MAGNO_EN …
#define HPD_EN …
#define ALS_EN …
#define ACS_EN …
static int sensor_mask_override = …;
module_param_named(sensor_mask, sensor_mask_override, int, 0444);
MODULE_PARM_DESC(…) …;
static bool intr_disable = …;
static int amd_sfh_wait_response_v2(struct amd_mp2_dev *mp2, u8 sid, u32 sensor_sts)
{ … }
static void amd_start_sensor_v2(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info)
{ … }
static void amd_stop_sensor_v2(struct amd_mp2_dev *privdata, u16 sensor_idx)
{ … }
static void amd_stop_all_sensor_v2(struct amd_mp2_dev *privdata)
{ … }
void amd_sfh_clear_intr_v2(struct amd_mp2_dev *privdata)
{ … }
void amd_sfh_clear_intr(struct amd_mp2_dev *privdata)
{ … }
static irqreturn_t amd_sfh_irq_handler(int irq, void *data)
{ … }
int amd_sfh_irq_init_v2(struct amd_mp2_dev *privdata)
{ … }
static int amd_sfh_dis_sts_v2(struct amd_mp2_dev *privdata)
{ … }
static void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info)
{ … }
static void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx)
{ … }
static void amd_stop_all_sensors(struct amd_mp2_dev *privdata)
{ … }
static const struct dmi_system_id dmi_sensor_mask_overrides[] = …;
int amd_mp2_get_sensor_num(struct amd_mp2_dev *privdata, u8 *sensor_id)
{ … }
static void amd_mp2_pci_remove(void *privdata)
{ … }
static struct amd_mp2_ops amd_sfh_ops_v2 = …;
static struct amd_mp2_ops amd_sfh_ops = …;
static void mp2_select_ops(struct amd_mp2_dev *privdata)
{ … }
int amd_sfh_irq_init(struct amd_mp2_dev *privdata)
{ … }
static int mp2_disable_intr(const struct dmi_system_id *id)
{ … }
static const struct dmi_system_id dmi_sfh_table[] = …;
static const struct dmi_system_id dmi_nodevs[] = …;
static void sfh1_1_init_work(struct work_struct *work)
{ … }
static void sfh_init_work(struct work_struct *work)
{ … }
static void amd_sfh_remove(struct pci_dev *pdev)
{ … }
static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{ … }
static void amd_sfh_shutdown(struct pci_dev *pdev)
{ … }
static int __maybe_unused amd_mp2_pci_resume(struct device *dev)
{ … }
static int __maybe_unused amd_mp2_pci_suspend(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(amd_mp2_pm_ops, amd_mp2_pci_suspend,
amd_mp2_pci_resume);
static const struct pci_device_id amd_mp2_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, amd_mp2_pci_tbl);
static struct pci_driver amd_mp2_pci_driver = …;
module_pci_driver(…) …;
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;