Commit 6a438139 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: comedi: remove C99 comments in c6xdigio.c

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d6d9bd32
......@@ -77,7 +77,7 @@ struct pwmbitstype {
unsigned sb4:2;
};
union pwmcmdtype {
unsigned cmd; // assuming here that int is 32bit
unsigned cmd; /* assuming here that int is 32bit */
struct pwmbitstype bits;
};
struct encbitstype {
......@@ -110,7 +110,7 @@ static void C6X_pwmInit(unsigned long baseAddr)
{
int timeout = 0;
//printk("Inside C6X_pwmInit\n");
/* printk("Inside C6X_pwmInit\n"); */
WriteByteToHwPort(baseAddr, 0x70);
while (((ReadByteFromHwPort(baseAddr + 1) & 0x80) == 0)
......@@ -148,7 +148,7 @@ static void C6X_pwmOutput(unsigned long baseAddr, unsigned channel, int value)
int timeout = 0;
unsigned tmp;
//printk("Inside C6X_pwmOutput\n");
/* printk("Inside C6X_pwmOutput\n"); */
pwm.cmd = value;
if (pwm.cmd > 498)
......@@ -158,7 +158,7 @@ static void C6X_pwmOutput(unsigned long baseAddr, unsigned channel, int value)
if (channel == 0) {
ppcmd = 0x28;
} else { // if channel == 1
} else { /* if channel == 1 */
ppcmd = 0x30;
} /* endif */
......@@ -216,7 +216,7 @@ static int C6X_encInput(unsigned long baseAddr, unsigned channel)
int timeout = 0;
int tmp;
//printk("Inside C6X_encInput\n");
/* printk("Inside C6X_encInput\n"); */
enc.value = 0;
if (channel == 0) {
......@@ -311,7 +311,7 @@ static void C6X_encResetAll(unsigned long baseAddr)
{
unsigned timeout = 0;
//printk("Inside C6X_encResetAll\n");
/* printk("Inside C6X_encResetAll\n"); */
WriteByteToHwPort(baseAddr, 0x68);
while (((ReadByteFromHwPort(baseAddr + 1) & 0x80) == 0)
......@@ -351,7 +351,7 @@ static int c6xdigio_pwmo_insn_write(struct comedi_device * dev,
int i;
int chan = CR_CHAN(insn->chanspec);
// printk("c6xdigio_pwmo_insn_write %x\n", insn->n);
/* printk("c6xdigio_pwmo_insn_write %x\n", insn->n); */
for (i = 0; i < insn->n; i++) {
C6X_pwmOutput(dev->iobase, chan, data[i]);
/* devpriv->ao_readback[chan] = data[i]; */
......@@ -359,32 +359,30 @@ static int c6xdigio_pwmo_insn_write(struct comedi_device * dev,
return i;
}
//static int c6xdigio_ei_init_insn_read(struct comedi_device *dev,
// struct comedi_subdevice *s,
// struct comedi_insn *insn,
// unsigned int *data)
//{
// printk("c6xdigio_ei_init_insn_read %x\n", insn->n);
// return insn->n;
//}
//static int c6xdigio_ei_init_insn_write(struct comedi_device *dev,
// struct comedi_subdevice *s,
// struct comedi_insn *insn,
// unsigned int *data)
//{
// int i;
// int chan = CR_CHAN(insn->chanspec);
//
// C6X_encResetAll( dev->iobase );
//
// return insn->n;
//}
/* static int c6xdigio_ei_init_insn_read(struct comedi_device *dev, */
/* struct comedi_subdevice *s, */
/* struct comedi_insn *insn, */
/* unsigned int *data) */
/* { */
/* printk("c6xdigio_ei_init_insn_read %x\n", insn->n); */
/* return insn->n; */
/* } */
/* static int c6xdigio_ei_init_insn_write(struct comedi_device *dev, */
/* struct comedi_subdevice *s, */
/* struct comedi_insn *insn, */
/* unsigned int *data) */
/* { */
/* int i; */
/* int chan = CR_CHAN(insn->chanspec); */
/* *//* C6X_encResetAll( dev->iobase ); */
/* *//* return insn->n; */
/* } */
static int c6xdigio_ei_insn_read(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
// printk("c6xdigio_ei__insn_read %x\n", insn->n);
/* printk("c6xdigio_ei__insn_read %x\n", insn->n); */
int n;
int chan = CR_CHAN(insn->chanspec);
......@@ -398,16 +396,16 @@ static int c6xdigio_ei_insn_read(struct comedi_device * dev,
static void board_init(struct comedi_device * dev)
{
//printk("Inside board_init\n");
/* printk("Inside board_init\n"); */
C6X_pwmInit(dev->iobase);
C6X_encResetAll(dev->iobase);
}
//static void board_halt(struct comedi_device *dev) {
// C6X_pwmInit(dev->iobase);
//}
/* static void board_halt(struct comedi_device *dev) { */
/* C6X_pwmInit(dev->iobase); */
/* } */
/*
options[0] - I/O port
......@@ -444,11 +442,11 @@ static int c6xdigio_attach(struct comedi_device * dev, struct comedi_devconfig *
dev->iobase = iobase;
dev->board_name = "c6xdigio";
result = alloc_subdevices(dev, 2); // 3 with encoder_init write
result = alloc_subdevices(dev, 2); /* 3 with encoder_init write */
if (result < 0)
return result;
// Make sure that PnP ports gets activated
/* Make sure that PnP ports gets activated */
pnp_register_driver(&c6xdigio_pnp_driver);
irq = it->options[1];
......@@ -460,14 +458,14 @@ static int c6xdigio_attach(struct comedi_device * dev, struct comedi_devconfig *
s = dev->subdevices + 0;
/* pwm output subdevice */
s->type = COMEDI_SUBD_AO; // Not sure what to put here
s->type = COMEDI_SUBD_AO; /* Not sure what to put here */
s->subdev_flags = SDF_WRITEABLE;
s->n_chan = 2;
/* s->trig[0] = c6xdigio_pwmo; */
s->insn_read = c6xdigio_pwmo_insn_read;
s->insn_write = c6xdigio_pwmo_insn_write;
s->maxdata = 500;
s->range_table = &range_bipolar10; // A suitable lie
s->range_table = &range_bipolar10; /* A suitable lie */
s = dev->subdevices + 1;
/* encoder (counter) subdevice */
......@@ -479,19 +477,19 @@ static int c6xdigio_attach(struct comedi_device * dev, struct comedi_devconfig *
s->maxdata = 0xffffff;
s->range_table = &range_unknown;
// s = dev->subdevices + 2;
// /* pwm output subdevice */
// s->type = COMEDI_SUBD_COUNTER; // Not sure what to put here
// s->subdev_flags = SDF_WRITEABLE;
// s->n_chan = 1;
// /* s->trig[0] = c6xdigio_ei_init; */
// s->insn_read = c6xdigio_ei_init_insn_read;
// s->insn_write = c6xdigio_ei_init_insn_write;
// s->maxdata = 0xFFFF; // Really just a don't care
// s->range_table = &range_unknown; // Not sure what to put here
// I will call this init anyway but more than likely the DSP board will not be connect
// when device driver is loaded.
/* s = dev->subdevices + 2; */
/* pwm output subdevice */
/* s->type = COMEDI_SUBD_COUNTER; // Not sure what to put here */
/* s->subdev_flags = SDF_WRITEABLE; */
/* s->n_chan = 1; */
/* s->trig[0] = c6xdigio_ei_init; */
/* s->insn_read = c6xdigio_ei_init_insn_read; */
/* s->insn_write = c6xdigio_ei_init_insn_write; */
/* s->maxdata = 0xFFFF; // Really just a don't care */
/* s->range_table = &range_unknown; // Not sure what to put here */
/* I will call this init anyway but more than likely the DSP board will not be connect */
/* when device driver is loaded. */
board_init(dev);
return 0;
......@@ -499,7 +497,7 @@ static int c6xdigio_attach(struct comedi_device * dev, struct comedi_devconfig *
static int c6xdigio_detach(struct comedi_device * dev)
{
// board_halt(dev); // may not need this
/* board_halt(dev); may not need this */
printk("comedi%d: c6xdigio: remove\n", dev->minor);
......@@ -508,7 +506,7 @@ static int c6xdigio_detach(struct comedi_device * dev)
}
if (dev->irq) {
free_irq(dev->irq, dev);
} // Not using IRQ so I am not sure if I need this
} /* Not using IRQ so I am not sure if I need this */
pnp_unregister_driver(&c6xdigio_pnp_driver);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment