• Home
  • Raw
  • Download

Lines Matching refs:seq

259 			      const struct idt_smb_seq *seq)  in idt_smb_write_byte()  argument
266 for (idx = 0; idx < seq->bytecnt; idx++) { in idt_smb_write_byte()
268 ccode = seq->ccode | CCODE_BYTE; in idt_smb_write_byte()
271 if (idx == seq->bytecnt - 1) in idt_smb_write_byte()
276 seq->data[idx]); in idt_smb_write_byte()
291 struct idt_smb_seq *seq) in idt_smb_read_byte() argument
298 for (idx = 0; idx < seq->bytecnt; idx++) { in idt_smb_read_byte()
300 ccode = seq->ccode | CCODE_BYTE; in idt_smb_read_byte()
303 if (idx == seq->bytecnt - 1) in idt_smb_read_byte()
311 seq->data[idx] = (u8)sts; in idt_smb_read_byte()
324 const struct idt_smb_seq *seq) in idt_smb_write_word() argument
331 evencnt = seq->bytecnt - (seq->bytecnt % 2); in idt_smb_write_word()
336 ccode = seq->ccode | CCODE_WORD; in idt_smb_write_word()
344 *(u16 *)&seq->data[idx]); in idt_smb_write_word()
350 if (seq->bytecnt != evencnt) { in idt_smb_write_word()
352 ccode = seq->ccode | CCODE_BYTE | CCODE_END; in idt_smb_write_word()
358 seq->data[idx]); in idt_smb_write_word()
373 struct idt_smb_seq *seq) in idt_smb_read_word() argument
380 evencnt = seq->bytecnt - (seq->bytecnt % 2); in idt_smb_read_word()
385 ccode = seq->ccode | CCODE_WORD; in idt_smb_read_word()
396 *(u16 *)&seq->data[idx] = (u16)sts; in idt_smb_read_word()
400 if (seq->bytecnt != evencnt) { in idt_smb_read_word()
402 ccode = seq->ccode | CCODE_BYTE | CCODE_END; in idt_smb_read_word()
411 seq->data[idx] = (u8)sts; in idt_smb_read_word()
424 const struct idt_smb_seq *seq) in idt_smb_write_block() argument
429 if (seq->bytecnt > I2C_SMBUS_BLOCK_MAX) in idt_smb_write_block()
433 ccode = seq->ccode | CCODE_BLOCK | CCODE_START | CCODE_END; in idt_smb_write_block()
436 return idt_smb_safe(write_block, pdev->client, ccode, seq->bytecnt, in idt_smb_write_block()
437 seq->data); in idt_smb_write_block()
447 struct idt_smb_seq *seq) in idt_smb_read_block() argument
453 if (seq->bytecnt > I2C_SMBUS_BLOCK_MAX) in idt_smb_read_block()
457 ccode = seq->ccode | CCODE_BLOCK | CCODE_START | CCODE_END; in idt_smb_read_block()
460 sts = idt_smb_safe(read_block, pdev->client, ccode, seq->data); in idt_smb_read_block()
461 if (sts != seq->bytecnt) in idt_smb_read_block()
477 const struct idt_smb_seq *seq) in idt_smb_write_i2c_block() argument
482 if (seq->bytecnt > I2C_SMBUS_BLOCK_MAX) in idt_smb_write_i2c_block()
486 buf[0] = seq->bytecnt; in idt_smb_write_i2c_block()
487 memcpy(&buf[1], seq->data, seq->bytecnt); in idt_smb_write_i2c_block()
490 ccode = seq->ccode | CCODE_BLOCK | CCODE_START | CCODE_END; in idt_smb_write_i2c_block()
494 seq->bytecnt + 1, buf); in idt_smb_write_i2c_block()
507 struct idt_smb_seq *seq) in idt_smb_read_i2c_block() argument
513 if (seq->bytecnt > I2C_SMBUS_BLOCK_MAX) in idt_smb_read_i2c_block()
517 ccode = seq->ccode | CCODE_BLOCK | CCODE_START | CCODE_END; in idt_smb_read_i2c_block()
521 seq->bytecnt + 1, buf); in idt_smb_read_i2c_block()
522 if (sts != seq->bytecnt + 1) in idt_smb_read_i2c_block()
524 if (buf[0] != seq->bytecnt) in idt_smb_read_i2c_block()
528 memcpy(seq->data, &buf[1], seq->bytecnt); in idt_smb_read_i2c_block()