Lines Matching refs:buf

63 	u8 *buf;		/* used for initialize speed */
80 priv->buf = kzalloc(256, GFP_KERNEL);
81 if (!priv->buf) {
88 kfree(priv->buf);
101 kfree(priv->buf);
115 kfree(priv->buf);
277 static int bulk_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
288 port->bulk_out_endpointAddress), buf,
298 static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
308 port->bulk_in_endpointAddress), buf,
322 u8 *buf;
323 buf = kmalloc(8, GFP_KERNEL);
324 if (!buf)
327 buf[0] = IUU_SET_LED;
328 buf[1] = R & 0xFF;
329 buf[2] = (R >> 8) & 0xFF;
330 buf[3] = G & 0xFF;
331 buf[4] = (G >> 8) & 0xFF;
332 buf[5] = B & 0xFF;
333 buf[6] = (B >> 8) & 0xFF;
334 buf[7] = f;
335 status = bulk_immediate(port, buf, 8);
336 kfree(buf);
344 static void iuu_rgbf_fill_buffer(u8 *buf, u8 r1, u8 r2, u8 g1, u8 g2, u8 b1,
347 *buf++ = IUU_SET_LED;
348 *buf++ = r1;
349 *buf++ = r2;
350 *buf++ = g1;
351 *buf++ = g2;
352 *buf++ = b1;
353 *buf++ = b2;
354 *buf = freq;
419 priv->buf[Count++] = IUU_UART_WRITE_I2C;
420 priv->buf[Count++] = FrqGenAdr << 1;
421 priv->buf[Count++] = 0x09;
422 priv->buf[Count++] = 0x00;
424 status = bulk_immediate(port, (u8 *) priv->buf, Count);
487 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
488 priv->buf[Count++] = FrqGenAdr << 1;
489 priv->buf[Count++] = 0x09;
490 priv->buf[Count++] = 0x20; /* Adr = 0x09 */
491 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
492 priv->buf[Count++] = FrqGenAdr << 1;
493 priv->buf[Count++] = 0x0C;
494 priv->buf[Count++] = DIV; /* Adr = 0x0C */
495 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
496 priv->buf[Count++] = FrqGenAdr << 1;
497 priv->buf[Count++] = 0x12;
498 priv->buf[Count++] = XDRV; /* Adr = 0x12 */
499 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
500 priv->buf[Count++] = FrqGenAdr << 1;
501 priv->buf[Count++] = 0x13;
502 priv->buf[Count++] = 0x6B; /* Adr = 0x13 */
503 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
504 priv->buf[Count++] = FrqGenAdr << 1;
505 priv->buf[Count++] = 0x40;
506 priv->buf[Count++] = (0xC0 | ((PUMP & 0x07) << 2)) |
508 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
509 priv->buf[Count++] = FrqGenAdr << 1;
510 priv->buf[Count++] = 0x41;
511 priv->buf[Count++] = PBlsb; /* Adr = 0x41 */
512 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
513 priv->buf[Count++] = FrqGenAdr << 1;
514 priv->buf[Count++] = 0x42;
515 priv->buf[Count++] = Q | (((PO & 0x01) << 7)); /* Adr = 0x42 */
516 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
517 priv->buf[Count++] = FrqGenAdr << 1;
518 priv->buf[Count++] = 0x44;
519 priv->buf[Count++] = (char)0xFF; /* Adr = 0x44 */
520 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
521 priv->buf[Count++] = FrqGenAdr << 1;
522 priv->buf[Count++] = 0x45;
523 priv->buf[Count++] = (char)0xFE; /* Adr = 0x45 */
524 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
525 priv->buf[Count++] = FrqGenAdr << 1;
526 priv->buf[Count++] = 0x46;
527 priv->buf[Count++] = 0x7F; /* Adr = 0x46 */
528 priv->buf[Count++] = IUU_UART_WRITE_I2C; /* 0x4C */
529 priv->buf[Count++] = FrqGenAdr << 1;
530 priv->buf[Count++] = 0x47;
531 priv->buf[Count++] = (char)0x84; /* Adr = 0x47 */
533 status = bulk_immediate(port, (u8 *) priv->buf, Count);
565 status = read_immediate(port, priv->buf, priv->len);
673 dev_dbg(&port->dev, "%s - call read buf - len to read is %i\n",
705 const u8 *buf, int count)
716 memcpy(priv->writebuf + priv->writelen, buf, count);
746 u8 *buf;
748 buf = kmalloc(sizeof(u8) * 4, GFP_KERNEL);
750 if (!buf)
753 buf[0] = IUU_UART_ENABLE;
754 buf[1] = (u8) ((IUU_BAUD_9600 >> 8) & 0x00FF);
755 buf[2] = (u8) (0x00FF & IUU_BAUD_9600);
756 buf[3] = (u8) (0x0F0 & IUU_ONE_STOP_BIT) | (0x07 & IUU_PARITY_EVEN);
758 status = bulk_immediate(port, buf, 4);
768 kfree(buf);
776 u8 *buf;
777 buf = kmalloc(1, GFP_KERNEL);
778 if (!buf)
780 buf[0] = IUU_UART_DISABLE;
782 status = bulk_immediate(port, buf, 1);
786 kfree(buf);
969 u8 *buf;
984 buf = kmalloc(10, GFP_KERNEL);
985 if (buf == NULL)
994 b, a, c, d, buf, 1, 1000); \
996 buf[0]); } while (0);
1007 /* sprintf(buf ,"%c%c%c%c",0x03,0x02,0x02,0x0); */
1010 kfree(buf);
1105 u8 *buf;
1107 buf = kmalloc(5, GFP_KERNEL);
1108 if (!buf)
1111 buf[0] = IUU_SET_VCC;
1112 buf[1] = vcc & 0xFF;
1113 buf[2] = (vcc >> 8) & 0xFF;
1114 buf[3] = (vcc >> 16) & 0xFF;
1115 buf[4] = (vcc >> 24) & 0xFF;
1117 status = bulk_immediate(port, buf, 5);
1118 kfree(buf);
1133 struct device_attribute *attr, char *buf)
1138 return sprintf(buf, "%d\n", priv->vcc);
1142 struct device_attribute *attr, const char *buf, size_t count)
1148 if (kstrtoul(buf, 10, &v)) {
1150 __func__, buf);