Lines Matching refs:sih
68 struct sih { struct
90 static const struct sih *sih_modules; argument
121 static const struct sih sih_modules_twl4030[6] = {
181 static const struct sih sih_modules_twl5031[8] = {
329 const struct sih *sih; in twl4030_init_sih_modules() local
342 sih = sih_modules; in twl4030_init_sih_modules()
343 for (i = 0; i < nr_sih_modules; i++, sih++) { in twl4030_init_sih_modules()
345 if (!sih->bytes_ixr) in twl4030_init_sih_modules()
349 if (sih->irq_lines <= line) in twl4030_init_sih_modules()
352 status = twl_i2c_write(sih->module, buf, in twl4030_init_sih_modules()
353 sih->mask[line].imr_offset, sih->bytes_ixr); in twl4030_init_sih_modules()
356 status, sih->name, "IMR"); in twl4030_init_sih_modules()
366 if (sih->set_cor) { in twl4030_init_sih_modules()
367 status = twl_i2c_write_u8(sih->module, in twl4030_init_sih_modules()
369 sih->control_offset); in twl4030_init_sih_modules()
372 status, sih->name, "SIH_CTRL"); in twl4030_init_sih_modules()
376 sih = sih_modules; in twl4030_init_sih_modules()
377 for (i = 0; i < nr_sih_modules; i++, sih++) { in twl4030_init_sih_modules()
382 if (!sih->bytes_ixr) in twl4030_init_sih_modules()
386 if (sih->irq_lines <= line) in twl4030_init_sih_modules()
396 status = twl_i2c_read(sih->module, rxbuf, in twl4030_init_sih_modules()
397 sih->mask[line].isr_offset, sih->bytes_ixr); in twl4030_init_sih_modules()
400 status, sih->name, "ISR"); in twl4030_init_sih_modules()
402 if (!sih->set_cor) { in twl4030_init_sih_modules()
403 status = twl_i2c_write(sih->module, buf, in twl4030_init_sih_modules()
404 sih->mask[line].isr_offset, in twl4030_init_sih_modules()
405 sih->bytes_ixr); in twl4030_init_sih_modules()
438 const struct sih *sih; member
497 const struct sih *sih = agent->sih; in twl4030_sih_bus_sync_unlock() local
511 status = twl_i2c_write(sih->module, imr.bytes, in twl4030_sih_bus_sync_unlock()
512 sih->mask[irq_line].imr_offset, in twl4030_sih_bus_sync_unlock()
513 sih->bytes_ixr); in twl4030_sih_bus_sync_unlock()
532 status = twl_i2c_read(sih->module, bytes, in twl4030_sih_bus_sync_unlock()
533 sih->edr_offset, sih->bytes_edr); in twl4030_sih_bus_sync_unlock()
559 status = twl_i2c_write(sih->module, bytes, in twl4030_sih_bus_sync_unlock()
560 sih->edr_offset, sih->bytes_edr); in twl4030_sih_bus_sync_unlock()
581 static inline int sih_read_isr(const struct sih *sih) in sih_read_isr() argument
592 status = twl_i2c_read(sih->module, isr.bytes, in sih_read_isr()
593 sih->mask[irq_line].isr_offset, sih->bytes_ixr); in sih_read_isr()
605 const struct sih *sih = agent->sih; in handle_twl4030_sih() local
609 isr = sih_read_isr(sih); in handle_twl4030_sih()
613 sih->name, isr); in handle_twl4030_sih()
623 if (irq < sih->bits) in handle_twl4030_sih()
627 sih->name, irq); in handle_twl4030_sih()
636 const struct sih *sih = NULL; in twl4030_sih_setup() local
642 for (sih_mod = 0, sih = sih_modules; sih_mod < nr_sih_modules; in twl4030_sih_setup()
643 sih_mod++, sih++) { in twl4030_sih_setup()
644 if (sih->module == module && sih->set_cor) { in twl4030_sih_setup()
658 agent->sih = sih; in twl4030_sih_setup()
662 for (i = 0; i < sih->bits; i++) { in twl4030_sih_setup()
675 agent->irq_name = kasprintf(GFP_KERNEL, "twl4030_%s", sih->name); in twl4030_sih_setup()
678 agent->irq_name ?: sih->name, NULL); in twl4030_sih_setup()
680 dev_info(dev, "%s (irq %d) chaining IRQs %d..%d\n", sih->name, in twl4030_sih_setup()