|
@@ -38,8 +38,8 @@
|
|
|
|
|
|
#include <linux/slab.h>
|
|
|
#include <linux/spinlock.h>
|
|
|
-#include <asm/io.h>
|
|
|
-#include <asm/uaccess.h>
|
|
|
+#include <linux/io.h>
|
|
|
+#include <linux/uaccess.h>
|
|
|
#include <linux/types.h>
|
|
|
#include <linux/version.h>
|
|
|
#include <linux/interrupt.h>
|
|
@@ -58,31 +58,31 @@
|
|
|
/* Defines
|
|
|
*/
|
|
|
|
|
|
-static int me4600_ao_query_range_by_min_max(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_range_by_min_max(me_subdevice_t *subdevice,
|
|
|
int unit,
|
|
|
int *min,
|
|
|
int *max, int *maxdata, int *range);
|
|
|
|
|
|
-static int me4600_ao_query_number_ranges(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_number_ranges(me_subdevice_t *subdevice,
|
|
|
int unit, int *count);
|
|
|
|
|
|
-static int me4600_ao_query_range_info(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_range_info(me_subdevice_t *subdevice,
|
|
|
int range,
|
|
|
int *unit,
|
|
|
int *min, int *max, int *maxdata);
|
|
|
|
|
|
-static int me4600_ao_query_timer(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_timer(me_subdevice_t *subdevice,
|
|
|
int timer,
|
|
|
int *base_frequency,
|
|
|
long long *min_ticks, long long *max_ticks);
|
|
|
|
|
|
-static int me4600_ao_query_number_channels(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_number_channels(me_subdevice_t *subdevice,
|
|
|
int *number);
|
|
|
|
|
|
-static int me4600_ao_query_subdevice_type(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_subdevice_type(me_subdevice_t *subdevice,
|
|
|
int *type, int *subtype);
|
|
|
|
|
|
-static int me4600_ao_query_subdevice_caps(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_subdevice_caps(me_subdevice_t *subdevice,
|
|
|
int *caps);
|
|
|
|
|
|
static int me4600_ao_query_subdevice_caps_args(struct me_subdevice *subdevice,
|
|
@@ -105,12 +105,12 @@ static void me4600_ao_destructor(struct me_subdevice *subdevice);
|
|
|
|
|
|
/** Reset subdevice. Stop all actions. Reset registry. Disable FIFO. Set output to 0V and status to 'none'.
|
|
|
*/
|
|
|
-static int me4600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_reset_subdevice(me_subdevice_t *subdevice,
|
|
|
struct file *filep, int flags);
|
|
|
|
|
|
/** Set output as single
|
|
|
*/
|
|
|
-static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_single_config(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int channel,
|
|
|
int single_config,
|
|
@@ -120,55 +120,55 @@ static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
|
|
|
|
|
|
/** Pass to user actual value of output.
|
|
|
*/
|
|
|
-static int me4600_ao_io_single_read(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_single_read(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int channel,
|
|
|
int *value, int time_out, int flags);
|
|
|
|
|
|
/** Write to output requed value.
|
|
|
*/
|
|
|
-static int me4600_ao_io_single_write(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_single_write(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int channel,
|
|
|
int value, int time_out, int flags);
|
|
|
|
|
|
/** Set output as streamed device.
|
|
|
*/
|
|
|
-static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_config(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
- meIOStreamConfig_t * config_list,
|
|
|
+ meIOStreamConfig_t *config_list,
|
|
|
int count,
|
|
|
- meIOStreamTrigger_t * trigger,
|
|
|
+ meIOStreamTrigger_t *trigger,
|
|
|
int fifo_irq_threshold, int flags);
|
|
|
|
|
|
/** Wait for / Check empty space in buffer.
|
|
|
*/
|
|
|
-static int me4600_ao_io_stream_new_values(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_new_values(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int time_out, int *count, int flags);
|
|
|
|
|
|
/** Start streaming.
|
|
|
*/
|
|
|
-static int me4600_ao_io_stream_start(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_start(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int start_mode, int time_out, int flags);
|
|
|
|
|
|
/** Check actual state. / Wait for end.
|
|
|
*/
|
|
|
-static int me4600_ao_io_stream_status(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_status(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int wait,
|
|
|
int *status, int *values, int flags);
|
|
|
|
|
|
/** Stop streaming.
|
|
|
*/
|
|
|
-static int me4600_ao_io_stream_stop(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_stop(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int stop_mode, int flags);
|
|
|
|
|
|
/** Write datas to buffor.
|
|
|
*/
|
|
|
-static int me4600_ao_io_stream_write(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_write(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int write_mode,
|
|
|
int *values, int *count, int flags);
|
|
@@ -178,27 +178,27 @@ static int me4600_ao_io_stream_write(me_subdevice_t * subdevice,
|
|
|
static irqreturn_t me4600_ao_isr(int irq, void *dev_id);
|
|
|
/** Copy data from circular buffer to fifo (fast) in wraparound mode.
|
|
|
*/
|
|
|
-int inline ao_write_data_wraparound(me4600_ao_subdevice_t * instance, int count,
|
|
|
+inline int ao_write_data_wraparound(me4600_ao_subdevice_t *instance, int count,
|
|
|
int start_pos);
|
|
|
|
|
|
/** Copy data from circular buffer to fifo (fast).
|
|
|
*/
|
|
|
-int inline ao_write_data(me4600_ao_subdevice_t * instance, int count,
|
|
|
+inline int ao_write_data(me4600_ao_subdevice_t *instance, int count,
|
|
|
int start_pos);
|
|
|
|
|
|
/** Copy data from circular buffer to fifo (slow).
|
|
|
*/
|
|
|
-int inline ao_write_data_pooling(me4600_ao_subdevice_t * instance, int count,
|
|
|
+inline int ao_write_data_pooling(me4600_ao_subdevice_t *instance, int count,
|
|
|
int start_pos);
|
|
|
|
|
|
/** Copy data from user space to circular buffer.
|
|
|
*/
|
|
|
-int inline ao_get_data_from_user(me4600_ao_subdevice_t * instance, int count,
|
|
|
+inline int ao_get_data_from_user(me4600_ao_subdevice_t *instance, int count,
|
|
|
int *user_values);
|
|
|
|
|
|
/** Stop presentation. Preserve FIFOs.
|
|
|
*/
|
|
|
-int inline ao_stop_immediately(me4600_ao_subdevice_t * instance);
|
|
|
+inline int ao_stop_immediately(me4600_ao_subdevice_t *instance);
|
|
|
|
|
|
/** Task for asynchronical state verifying.
|
|
|
*/
|
|
@@ -206,7 +206,7 @@ static void me4600_ao_work_control_task(struct work_struct *work);
|
|
|
/* Functions
|
|
|
*/
|
|
|
|
|
|
-static int me4600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_reset_subdevice(me_subdevice_t *subdevice,
|
|
|
struct file *filep, int flags)
|
|
|
{
|
|
|
me4600_ao_subdevice_t *instance;
|
|
@@ -280,7 +280,7 @@ static int me4600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_single_config(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int channel,
|
|
|
int single_config,
|
|
@@ -453,7 +453,7 @@ static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_single_read(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_single_read(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int channel,
|
|
|
int *value, int time_out, int flags)
|
|
@@ -537,7 +537,7 @@ static int me4600_ao_io_single_read(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_single_write(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_single_write(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int channel,
|
|
|
int value, int time_out, int flags)
|
|
@@ -979,11 +979,11 @@ static int me4600_ao_io_single_write(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_config(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
- meIOStreamConfig_t * config_list,
|
|
|
+ meIOStreamConfig_t *config_list,
|
|
|
int count,
|
|
|
- meIOStreamTrigger_t * trigger,
|
|
|
+ meIOStreamTrigger_t *trigger,
|
|
|
int fifo_irq_threshold, int flags)
|
|
|
{
|
|
|
me4600_ao_subdevice_t *instance;
|
|
@@ -1317,7 +1317,7 @@ static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_new_values(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_new_values(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int time_out, int *count, int flags)
|
|
|
{
|
|
@@ -1398,7 +1398,7 @@ static int me4600_ao_io_stream_new_values(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_start(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_start(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int start_mode, int time_out, int flags)
|
|
|
{
|
|
@@ -1835,7 +1835,7 @@ static int me4600_ao_io_stream_start(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_status(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_status(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int wait,
|
|
|
int *status, int *values, int flags)
|
|
@@ -1933,7 +1933,7 @@ static int me4600_ao_io_stream_status(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_stop(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_stop(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int stop_mode, int flags)
|
|
|
{ // Stop work and empty buffer and FIFO
|
|
@@ -2038,7 +2038,7 @@ static int me4600_ao_io_stream_stop(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_write(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_write(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int write_mode,
|
|
|
int *values, int *count, int flags)
|
|
@@ -2484,8 +2484,8 @@ static void me4600_ao_destructor(struct me_subdevice *subdevice)
|
|
|
}
|
|
|
|
|
|
me4600_ao_subdevice_t *me4600_ao_constructor(uint32_t reg_base,
|
|
|
- spinlock_t * preload_reg_lock,
|
|
|
- uint32_t * preload_flags,
|
|
|
+ spinlock_t *preload_reg_lock,
|
|
|
+ uint32_t *preload_flags,
|
|
|
int ao_idx,
|
|
|
int fifo,
|
|
|
int irq,
|
|
@@ -2690,7 +2690,7 @@ me4600_ao_subdevice_t *me4600_ao_constructor(uint32_t reg_base,
|
|
|
*
|
|
|
* @param instance The subdevice instance (pointer).
|
|
|
*/
|
|
|
-int inline ao_stop_immediately(me4600_ao_subdevice_t * instance)
|
|
|
+inline int ao_stop_immediately(me4600_ao_subdevice_t *instance)
|
|
|
{
|
|
|
unsigned long cpu_flags;
|
|
|
uint32_t ctrl;
|
|
@@ -2743,7 +2743,7 @@ int inline ao_stop_immediately(me4600_ao_subdevice_t * instance)
|
|
|
* @return On error/success: 0. No datas were copied => no data in buffer.
|
|
|
* @return On error: -ME_ERRNO_FIFO_BUFFER_OVERFLOW.
|
|
|
*/
|
|
|
-int inline ao_write_data_wraparound(me4600_ao_subdevice_t * instance, int count,
|
|
|
+inline int ao_write_data_wraparound(me4600_ao_subdevice_t *instance, int count,
|
|
|
int start_pos)
|
|
|
{ /// @note This is time critical function!
|
|
|
uint32_t status;
|
|
@@ -2808,7 +2808,7 @@ int inline ao_write_data_wraparound(me4600_ao_subdevice_t * instance, int count,
|
|
|
* @return On error/success: 0. No datas were copied => no data in buffer.
|
|
|
* @return On error: -ME_ERRNO_FIFO_BUFFER_OVERFLOW.
|
|
|
*/
|
|
|
-int inline ao_write_data(me4600_ao_subdevice_t * instance, int count,
|
|
|
+inline int ao_write_data(me4600_ao_subdevice_t *instance, int count,
|
|
|
int start_pos)
|
|
|
{ /// @note This is time critical function!
|
|
|
uint32_t status;
|
|
@@ -2878,7 +2878,7 @@ int inline ao_write_data(me4600_ao_subdevice_t * instance, int count,
|
|
|
* @return On error/success: 0. FIFO was full at begining.
|
|
|
* @return On error: -ME_ERRNO_RING_BUFFER_UNDEFFLOW.
|
|
|
*/
|
|
|
-int inline ao_write_data_pooling(me4600_ao_subdevice_t * instance, int count,
|
|
|
+inline int ao_write_data_pooling(me4600_ao_subdevice_t *instance, int count,
|
|
|
int start_pos)
|
|
|
{ /// @note This is slow function!
|
|
|
uint32_t status;
|
|
@@ -2936,7 +2936,7 @@ int inline ao_write_data_pooling(me4600_ao_subdevice_t * instance, int count,
|
|
|
* @return On success: Number of copied values.
|
|
|
* @return On error: -ME_ERRNO_INTERNAL.
|
|
|
*/
|
|
|
-int inline ao_get_data_from_user(me4600_ao_subdevice_t * instance, int count,
|
|
|
+inline int ao_get_data_from_user(me4600_ao_subdevice_t *instance, int count,
|
|
|
int *user_values)
|
|
|
{
|
|
|
int i, err;
|
|
@@ -3294,7 +3294,7 @@ static void me4600_ao_work_control_task(struct work_struct *work)
|
|
|
#else
|
|
|
/// @note SPECIAL BUILD FOR BOSCH
|
|
|
/// @author Guenter Gebhardt
|
|
|
-static int me4600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_reset_subdevice(me_subdevice_t *subdevice,
|
|
|
struct file *filep, int flags)
|
|
|
{
|
|
|
me4600_ao_subdevice_t *instance;
|
|
@@ -3336,7 +3336,7 @@ static int me4600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_single_config(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int channel,
|
|
|
int single_config,
|
|
@@ -3607,7 +3607,7 @@ static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
|
|
|
goto ERROR;
|
|
|
}
|
|
|
|
|
|
- ERROR:
|
|
|
+ERROR:
|
|
|
|
|
|
spin_unlock_irqrestore(&instance->subdevice_lock, cpu_flags);
|
|
|
|
|
@@ -3616,7 +3616,7 @@ static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_single_read(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_single_read(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int channel,
|
|
|
int *value, int time_out, int flags)
|
|
@@ -3653,7 +3653,7 @@ static int me4600_ao_io_single_read(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_single_write(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_single_write(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int channel,
|
|
|
int value, int time_out, int flags)
|
|
@@ -3801,18 +3801,18 @@ static int me4600_ao_io_single_write(me_subdevice_t * subdevice,
|
|
|
spin_unlock_irqrestore(&instance->subdevice_lock, cpu_flags);
|
|
|
}
|
|
|
|
|
|
- ERROR:
|
|
|
+ERROR:
|
|
|
|
|
|
ME_SUBDEVICE_EXIT;
|
|
|
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_config(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
- meIOStreamConfig_t * config_list,
|
|
|
+ meIOStreamConfig_t *config_list,
|
|
|
int count,
|
|
|
- meIOStreamTrigger_t * trigger,
|
|
|
+ meIOStreamTrigger_t *trigger,
|
|
|
int fifo_irq_threshold, int flags)
|
|
|
{
|
|
|
me4600_ao_subdevice_t *instance;
|
|
@@ -4121,7 +4121,7 @@ static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
|
|
|
PDEBUG("Ctrl word = 0x%lX.\n", ctrl);
|
|
|
outl(ctrl, instance->ctrl_reg); // Write the control word
|
|
|
|
|
|
- ERROR:
|
|
|
+ERROR:
|
|
|
|
|
|
spin_unlock_irqrestore(&instance->subdevice_lock, cpu_flags);
|
|
|
|
|
@@ -4130,7 +4130,7 @@ static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_new_values(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_new_values(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int time_out, int *count, int flags)
|
|
|
{
|
|
@@ -4209,7 +4209,7 @@ static int me4600_ao_io_stream_new_values(me_subdevice_t * subdevice,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static void stop_immediately(me4600_ao_subdevice_t * instance)
|
|
|
+static void stop_immediately(me4600_ao_subdevice_t *instance)
|
|
|
{
|
|
|
unsigned long cpu_flags;
|
|
|
uint32_t tmp;
|
|
@@ -4224,7 +4224,7 @@ static void stop_immediately(me4600_ao_subdevice_t * instance)
|
|
|
spin_unlock_irqrestore(&instance->subdevice_lock, cpu_flags);
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_start(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_start(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int start_mode, int time_out, int flags)
|
|
|
{
|
|
@@ -4749,14 +4749,14 @@ static int me4600_ao_io_stream_start(me_subdevice_t * subdevice,
|
|
|
goto ERROR;
|
|
|
}
|
|
|
|
|
|
- ERROR:
|
|
|
+ERROR:
|
|
|
|
|
|
ME_SUBDEVICE_EXIT;
|
|
|
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_status(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_status(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int wait,
|
|
|
int *status, int *values, int flags)
|
|
@@ -4813,14 +4813,14 @@ static int me4600_ao_io_stream_status(me_subdevice_t * subdevice,
|
|
|
goto ERROR;
|
|
|
}
|
|
|
|
|
|
- ERROR:
|
|
|
+ERROR:
|
|
|
|
|
|
ME_SUBDEVICE_EXIT;
|
|
|
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_stop(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_stop(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int stop_mode, int flags)
|
|
|
{
|
|
@@ -4862,14 +4862,14 @@ static int me4600_ao_io_stream_stop(me_subdevice_t * subdevice,
|
|
|
goto ERROR;
|
|
|
}
|
|
|
|
|
|
- ERROR:
|
|
|
+ERROR:
|
|
|
|
|
|
ME_SUBDEVICE_EXIT;
|
|
|
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_io_stream_write(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_io_stream_write(me_subdevice_t *subdevice,
|
|
|
struct file *filep,
|
|
|
int write_mode,
|
|
|
int *values, int *count, int flags)
|
|
@@ -5403,7 +5403,7 @@ static int me4600_ao_io_stream_write(me_subdevice_t * subdevice,
|
|
|
goto ERROR;
|
|
|
}
|
|
|
|
|
|
- ERROR:
|
|
|
+ERROR:
|
|
|
|
|
|
ME_SUBDEVICE_EXIT;
|
|
|
|
|
@@ -5627,8 +5627,8 @@ static void me4600_ao_destructor(struct me_subdevice *subdevice)
|
|
|
}
|
|
|
|
|
|
me4600_ao_subdevice_t *me4600_ao_constructor(uint32_t reg_base,
|
|
|
- spinlock_t * preload_reg_lock,
|
|
|
- uint32_t * preload_flags,
|
|
|
+ spinlock_t *preload_reg_lock,
|
|
|
+ uint32_t *preload_flags,
|
|
|
int ao_idx, int fifo, int irq)
|
|
|
{
|
|
|
me4600_ao_subdevice_t *subdevice;
|
|
@@ -5790,7 +5790,7 @@ me4600_ao_subdevice_t *me4600_ao_constructor(uint32_t reg_base,
|
|
|
/* Common functions
|
|
|
*/
|
|
|
|
|
|
-static int me4600_ao_query_range_by_min_max(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_range_by_min_max(me_subdevice_t *subdevice,
|
|
|
int unit,
|
|
|
int *min,
|
|
|
int *max, int *maxdata, int *range)
|
|
@@ -5825,7 +5825,7 @@ static int me4600_ao_query_range_by_min_max(me_subdevice_t * subdevice,
|
|
|
return ME_ERRNO_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_query_number_ranges(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_number_ranges(me_subdevice_t *subdevice,
|
|
|
int unit, int *count)
|
|
|
{
|
|
|
me4600_ao_subdevice_t *instance;
|
|
@@ -5843,7 +5843,7 @@ static int me4600_ao_query_number_ranges(me_subdevice_t * subdevice,
|
|
|
return ME_ERRNO_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_query_range_info(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_range_info(me_subdevice_t *subdevice,
|
|
|
int range,
|
|
|
int *unit,
|
|
|
int *min, int *max, int *maxdata)
|
|
@@ -5867,7 +5867,7 @@ static int me4600_ao_query_range_info(me_subdevice_t * subdevice,
|
|
|
return ME_ERRNO_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_query_timer(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_timer(me_subdevice_t *subdevice,
|
|
|
int timer,
|
|
|
int *base_frequency,
|
|
|
long long *min_ticks, long long *max_ticks)
|
|
@@ -5901,7 +5901,7 @@ static int me4600_ao_query_timer(me_subdevice_t * subdevice,
|
|
|
return ME_ERRNO_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_query_number_channels(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_number_channels(me_subdevice_t *subdevice,
|
|
|
int *number)
|
|
|
{
|
|
|
me4600_ao_subdevice_t *instance;
|
|
@@ -5914,7 +5914,7 @@ static int me4600_ao_query_number_channels(me_subdevice_t * subdevice,
|
|
|
return ME_ERRNO_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_query_subdevice_type(me_subdevice_t * subdevice,
|
|
|
+static int me4600_ao_query_subdevice_type(me_subdevice_t *subdevice,
|
|
|
int *type, int *subtype)
|
|
|
{
|
|
|
me4600_ao_subdevice_t *instance;
|
|
@@ -5929,7 +5929,7 @@ static int me4600_ao_query_subdevice_type(me_subdevice_t * subdevice,
|
|
|
return ME_ERRNO_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-static int me4600_ao_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
|
|
|
+static int me4600_ao_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
|
|
|
{
|
|
|
me4600_ao_subdevice_t *instance;
|
|
|
instance = (me4600_ao_subdevice_t *) subdevice;
|