linux/drivers/iio/chemical/scd30_serial.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Sensirion SCD30 carbon dioxide sensor serial driver
 *
 * Copyright (c) 2020 Tomasz Duszynski <[email protected]>
 */
#include <linux/crc16.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/iio/iio.h>
#include <linux/jiffies.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/serdev.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/unaligned.h>

#include "scd30.h"

#define SCD30_SERDEV_ADDR
#define SCD30_SERDEV_WRITE
#define SCD30_SERDEV_READ
#define SCD30_SERDEV_MAX_BUF_SIZE
#define SCD30_SERDEV_RX_HEADER_SIZE
#define SCD30_SERDEV_CRC_SIZE
#define SCD30_SERDEV_TIMEOUT

struct scd30_serdev_priv {};

static u16 scd30_serdev_cmd_lookup_tbl[] =;

static u16 scd30_serdev_calc_crc(const char *buf, int size)
{}

static int scd30_serdev_xfer(struct scd30_state *state, char *txbuf, int txsize,
			     char *rxbuf, int rxsize)
{}

static int scd30_serdev_command(struct scd30_state *state, enum scd30_cmd cmd, u16 arg,
				void *response, int size)
{}

static size_t scd30_serdev_receive_buf(struct serdev_device *serdev,
				       const u8 *buf, size_t size)
{}

static const struct serdev_device_ops scd30_serdev_ops =;

static int scd30_serdev_probe(struct serdev_device *serdev)
{}

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

static struct serdev_device_driver scd30_serdev_driver =;
module_serdev_device_driver();

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