linux/drivers/gnss/core.c

// SPDX-License-Identifier: GPL-2.0
/*
 * GNSS receiver core
 *
 * Copyright (C) 2018 Johan Hovold <[email protected]>
 */

#define pr_fmt(fmt)

#include <linux/cdev.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/gnss.h>
#include <linux/idr.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/wait.h>

#define GNSS_FLAG_HAS_WRITE_RAW

#define GNSS_MINORS

static DEFINE_IDA(gnss_minors);
static dev_t gnss_first;

/* FIFO size must be a power of two */
#define GNSS_READ_FIFO_SIZE
#define GNSS_WRITE_BUF_SIZE

#define to_gnss_device(d)

static int gnss_open(struct inode *inode, struct file *file)
{}

static int gnss_release(struct inode *inode, struct file *file)
{}

static ssize_t gnss_read(struct file *file, char __user *buf,
				size_t count, loff_t *pos)
{}

static ssize_t gnss_write(struct file *file, const char __user *buf,
				size_t count, loff_t *pos)
{}

static __poll_t gnss_poll(struct file *file, poll_table *wait)
{}

static const struct file_operations gnss_fops =;

static struct class *gnss_class;

static void gnss_device_release(struct device *dev)
{}

struct gnss_device *gnss_allocate_device(struct device *parent)
{}
EXPORT_SYMBOL_GPL();

void gnss_put_device(struct gnss_device *gdev)
{}
EXPORT_SYMBOL_GPL();

int gnss_register_device(struct gnss_device *gdev)
{}
EXPORT_SYMBOL_GPL();

void gnss_deregister_device(struct gnss_device *gdev)
{}
EXPORT_SYMBOL_GPL();

/*
 * Caller guarantees serialisation.
 *
 * Must not be called for a closed device.
 */
int gnss_insert_raw(struct gnss_device *gdev, const unsigned char *buf,
				size_t count)
{}
EXPORT_SYMBOL_GPL();

static const char * const gnss_type_names[GNSS_TYPE_COUNT] =;

static const char *gnss_type_name(const struct gnss_device *gdev)
{}

static ssize_t type_show(struct device *dev, struct device_attribute *attr,
				char *buf)
{}
static DEVICE_ATTR_RO(type);

static struct attribute *gnss_attrs[] =;
ATTRIBUTE_GROUPS();

static int gnss_uevent(const struct device *dev, struct kobj_uevent_env *env)
{}

static int __init gnss_module_init(void)
{}
module_init();

static void __exit gnss_module_exit(void)
{}
module_exit(gnss_module_exit);

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