spinlock_t lock;
};
-/*
-struct neuronspi_file_data
-{
- struct spi_device** spi_device;
- struct mutex lock;
- struct neuronspi_op_buffer send_buf;
- struct neuronspi_op_buffer recv_buf;
- u32 message_len;
- u8 device_index;
- u8 has_first_message;
-};
-*/
struct neuronspi_direct_acc
{
}
}
+/*****************************************************************
+ * Probe data and functions
+ *
+ *****************************************************************/
+static const struct iio_info neuronspi_stm_ai_info = {
+ .read_raw = neuronspi_iio_stm_ai_read_raw,
+ .driver_module = THIS_MODULE,
+ .attrs = &neuron_stm_ai_group,
+};
+
+static const struct iio_info neuronspi_stm_ao_info = {
+ .read_raw = neuronspi_iio_stm_ao_read_raw,
+ .write_raw = neuronspi_iio_stm_ao_write_raw,
+ .driver_module = THIS_MODULE,
+ .attrs = &neuron_stm_ao_group,
+};
+
+static const struct iio_info neuronspi_sec_ai_info = {
+ .read_raw = neuronspi_iio_sec_ai_read_raw,
+ .driver_module = THIS_MODULE,
+ .attrs = &neuron_sec_ai_group,
+};
+
+static const struct iio_info neuronspi_sec_ao_info = {
+ .write_raw = neuronspi_iio_sec_ao_write_raw,
+ .driver_module = THIS_MODULE,
+ //.attrs = &neuron_sec_ao_group,
+};
+
struct iio_dev* neuronspi_stm_ai_probe(int io_count, int neuron_index, struct platform_device *board_device)
{
#include "unipi_common.h"
+
+/********************
+ * Data Definitions *
+ ********************/
+
+static const struct iio_chan_spec neuronspi_stm_ai_chan_spec[] = {
+ {
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 0,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+ .output = 0
+ },
+ {
+ .type = IIO_CURRENT,
+ .indexed = 1,
+ .channel = 1,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+ .output = 0
+ }
+};
+
+static const struct iio_chan_spec neuronspi_stm_ao_chan_spec[] = {
+ {
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 0,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+ .output = 1
+ },
+ {
+ .type = IIO_CURRENT,
+ .indexed = 1,
+ .channel = 1,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+ .output = 1
+ },
+ {
+ .type = IIO_RESISTANCE,
+ .indexed = 1,
+ .channel = 2,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+ .output = 0
+ }
+};
+
+static const struct iio_chan_spec neuronspi_sec_ai_chan_spec[] = {
+ {
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 0,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+ .output = 0
+ },
+ {
+ .type = IIO_CURRENT,
+ .indexed = 1,
+ .channel = 1,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+ .output = 0
+ },
+ {
+ .type = IIO_RESISTANCE,
+ .indexed = 1,
+ .channel = 2,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+ .output = 0
+ }
+};
+
+static const struct iio_chan_spec neuronspi_sec_ao_chan_spec[] = {
+ {
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 0,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
+ .output = 1
+ }
+};
+
+
/*************************
* Function Declarations *
*************************/
struct iio_dev** neuronspi_sec_ai_probe(int io_count, int neuron_index, struct platform_device *board_device);
struct iio_dev** neuronspi_sec_ao_probe(int io_count, int neuron_index, struct platform_device *board_device);
+
+
#endif /* MODULES_NEURON_SPI_SRC_UNIPI_IIO_H_ */
.can_multi_write = 1,
};
+/*
static const struct iio_chan_spec neuronspi_stm_ai_chan_spec[] = {
{
.type = IIO_VOLTAGE,
.driver_module = THIS_MODULE,
//.attrs = &neuron_sec_ao_group,
};
-
+*/
// These defines need to be at the end
#define to_neuronspi_uart_data(p,e) ((container_of((p), struct neuronspi_uart_data, e)))
#define to_neuronspi_port(p,e) ((container_of((p), struct neuronspi_port, e)))