linux/drivers/iio/chemical/sps30.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Sensirion SPS30 particulate matter sensor driver
 *
 * Copyright (c) Tomasz Duszynski <[email protected]>
 */

#include <linux/crc8.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/iio/buffer.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/kernel.h>
#include <linux/module.h>

#include "sps30.h"

/* sensor measures reliably up to 3000 ug / m3 */
#define SPS30_MAX_PM
/* minimum and maximum self cleaning periods in seconds */
#define SPS30_AUTO_CLEANING_PERIOD_MIN
#define SPS30_AUTO_CLEANING_PERIOD_MAX

enum {};

enum {};

static s32 sps30_float_to_int_clamped(__be32 *fp)
{}

static int sps30_do_meas(struct sps30_state *state, s32 *data, int size)
{}

static int sps30_do_reset(struct sps30_state *state)
{}

static irqreturn_t sps30_trigger_handler(int irq, void *p)
{}

static int sps30_read_raw(struct iio_dev *indio_dev,
			  struct iio_chan_spec const *chan,
			  int *val, int *val2, long mask)
{}

static ssize_t start_cleaning_store(struct device *dev,
				    struct device_attribute *attr,
				    const char *buf, size_t len)
{}

static ssize_t cleaning_period_show(struct device *dev,
				    struct device_attribute *attr,
				    char *buf)
{}

static ssize_t cleaning_period_store(struct device *dev, struct device_attribute *attr,
				     const char *buf, size_t len)
{}

static ssize_t cleaning_period_available_show(struct device *dev,
					      struct device_attribute *attr,
					      char *buf)
{}

static IIO_DEVICE_ATTR_WO(start_cleaning, 0);
static IIO_DEVICE_ATTR_RW(cleaning_period, 0);
static IIO_DEVICE_ATTR_RO(cleaning_period_available, 0);

static struct attribute *sps30_attrs[] =;

static const struct attribute_group sps30_attr_group =;

static const struct iio_info sps30_info =;

#define SPS30_CHAN(_index, _mod)

static const struct iio_chan_spec sps30_channels[] =;

static void sps30_devm_stop_meas(void *data)
{}

static const unsigned long sps30_scan_masks[] =;

int sps30_probe(struct device *dev, const char *name, void *priv, const struct sps30_ops *ops)
{}
EXPORT_SYMBOL_NS_GPL();

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