linux/drivers/iio/common/scmi_sensors/scmi_iio.c

// SPDX-License-Identifier: GPL-2.0

/*
 * System Control and Management Interface(SCMI) based IIO sensor driver
 *
 * Copyright (C) 2021 Google LLC
 */

#include <linux/delay.h>
#include <linux/err.h>
#include <linux/iio/buffer.h>
#include <linux/iio/iio.h>
#include <linux/iio/kfifo_buf.h>
#include <linux/iio/sysfs.h>
#include <linux/kernel.h>
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/scmi_protocol.h>
#include <linux/time.h>
#include <linux/types.h>
#include <linux/units.h>

#define SCMI_IIO_NUM_OF_AXIS

struct scmi_iio_priv {};

static int scmi_iio_sensor_update_cb(struct notifier_block *nb,
				     unsigned long event, void *data)
{}

static int scmi_iio_buffer_preenable(struct iio_dev *iio_dev)
{}

static int scmi_iio_buffer_postdisable(struct iio_dev *iio_dev)
{}

static const struct iio_buffer_setup_ops scmi_iio_buffer_ops =;

static int scmi_iio_set_odr_val(struct iio_dev *iio_dev, int val, int val2)
{}

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

static int scmi_iio_read_avail(struct iio_dev *iio_dev,
			       struct iio_chan_spec const *chan,
			       const int **vals, int *type, int *length,
			       long mask)
{}

static void convert_ns_to_freq(u64 interval_ns, u64 *hz, u64 *uhz)
{}

static int scmi_iio_get_odr_val(struct iio_dev *iio_dev, int *val, int *val2)
{}

static int scmi_iio_read_channel_data(struct iio_dev *iio_dev,
			     struct iio_chan_spec const *ch, int *val, int *val2)
{}

static int scmi_iio_read_raw(struct iio_dev *iio_dev,
			     struct iio_chan_spec const *ch, int *val,
			     int *val2, long mask)
{}

static const struct iio_info scmi_iio_info =;

static ssize_t scmi_iio_get_raw_available(struct iio_dev *iio_dev,
					  uintptr_t private,
					  const struct iio_chan_spec *chan,
					  char *buf)
{}

static const struct iio_chan_spec_ext_info scmi_iio_ext_info[] =;

static void scmi_iio_set_timestamp_channel(struct iio_chan_spec *iio_chan,
					   int scan_index)
{}

static void scmi_iio_set_data_channel(struct iio_chan_spec *iio_chan,
				      enum iio_chan_type type,
				      enum iio_modifier mod, int scan_index)
{}

static int scmi_iio_get_chan_modifier(const char *name,
				      enum iio_modifier *modifier)
{}

static int scmi_iio_get_chan_type(u8 scmi_type, enum iio_chan_type *iio_type)
{}

static u64 scmi_iio_convert_interval_to_ns(u32 val)
{}

static int scmi_iio_set_sampling_freq_avail(struct iio_dev *iio_dev)
{}

static struct iio_dev *
scmi_alloc_iiodev(struct scmi_device *sdev,
		  const struct scmi_sensor_proto_ops *ops,
		  struct scmi_protocol_handle *ph,
		  const struct scmi_sensor_info *sensor_info)
{}

static int scmi_iio_dev_probe(struct scmi_device *sdev)
{}

static const struct scmi_device_id scmi_id_table[] =;

MODULE_DEVICE_TABLE(scmi, scmi_id_table);

static struct scmi_driver scmi_iiodev_driver =;

module_scmi_driver();

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