#include <linux/errno.h>
#include <linux/gnss.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/sched.h>
#include <linux/serdev.h>
#include <linux/slab.h>
#include <linux/wait.h>
#define SIRF_BOOT_DELAY …
#define SIRF_ON_OFF_PULSE_TIME …
#define SIRF_ACTIVATE_TIMEOUT …
#define SIRF_HIBERNATE_TIMEOUT …
#define SIRF_REPORT_CYCLE …
struct sirf_data { … };
static int sirf_serdev_open(struct sirf_data *data)
{ … }
static void sirf_serdev_close(struct sirf_data *data)
{ … }
static int sirf_open(struct gnss_device *gdev)
{ … }
static void sirf_close(struct gnss_device *gdev)
{ … }
static int sirf_write_raw(struct gnss_device *gdev, const unsigned char *buf,
size_t count)
{ … }
static const struct gnss_operations sirf_gnss_ops = …;
static size_t sirf_receive_buf(struct serdev_device *serdev,
const u8 *buf, size_t count)
{ … }
static const struct serdev_device_ops sirf_serdev_ops = …;
static irqreturn_t sirf_wakeup_handler(int irq, void *dev_id)
{ … }
static int sirf_wait_for_power_state_nowakeup(struct sirf_data *data,
bool active,
unsigned long timeout)
{ … }
static int sirf_wait_for_power_state(struct sirf_data *data, bool active,
unsigned long timeout)
{ … }
static void sirf_pulse_on_off(struct sirf_data *data)
{ … }
static int sirf_set_active(struct sirf_data *data, bool active)
{ … }
static int sirf_runtime_suspend(struct device *dev)
{ … }
static int sirf_runtime_resume(struct device *dev)
{ … }
static int __maybe_unused sirf_suspend(struct device *dev)
{ … }
static int __maybe_unused sirf_resume(struct device *dev)
{ … }
static const struct dev_pm_ops sirf_pm_ops = …;
static int sirf_parse_dt(struct serdev_device *serdev)
{ … }
static int sirf_probe(struct serdev_device *serdev)
{ … }
static void sirf_remove(struct serdev_device *serdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id sirf_of_match[] = …;
MODULE_DEVICE_TABLE(of, sirf_of_match);
#endif
static struct serdev_device_driver sirf_driver = …;
module_serdev_device_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;