Lines Matching full:i2c_ic
34 struct aspeed_i2c_ic *i2c_ic = irq_desc_get_handler_data(desc); in aspeed_i2c_ic_irq_handler() local
39 status = readl(i2c_ic->base); in aspeed_i2c_ic_irq_handler()
41 generic_handle_domain_irq(i2c_ic->irq_domain, bit); in aspeed_i2c_ic_irq_handler()
66 struct aspeed_i2c_ic *i2c_ic; in aspeed_i2c_ic_of_init() local
69 i2c_ic = kzalloc(sizeof(*i2c_ic), GFP_KERNEL); in aspeed_i2c_ic_of_init()
70 if (!i2c_ic) in aspeed_i2c_ic_of_init()
73 i2c_ic->base = of_iomap(node, 0); in aspeed_i2c_ic_of_init()
74 if (!i2c_ic->base) { in aspeed_i2c_ic_of_init()
79 i2c_ic->parent_irq = irq_of_parse_and_map(node, 0); in aspeed_i2c_ic_of_init()
80 if (!i2c_ic->parent_irq) { in aspeed_i2c_ic_of_init()
85 i2c_ic->irq_domain = irq_domain_add_linear(node, ASPEED_I2C_IC_NUM_BUS, in aspeed_i2c_ic_of_init()
88 if (!i2c_ic->irq_domain) { in aspeed_i2c_ic_of_init()
93 i2c_ic->irq_domain->name = "aspeed-i2c-domain"; in aspeed_i2c_ic_of_init()
95 irq_set_chained_handler_and_data(i2c_ic->parent_irq, in aspeed_i2c_ic_of_init()
96 aspeed_i2c_ic_irq_handler, i2c_ic); in aspeed_i2c_ic_of_init()
98 pr_info("i2c controller registered, irq %d\n", i2c_ic->parent_irq); in aspeed_i2c_ic_of_init()
103 iounmap(i2c_ic->base); in aspeed_i2c_ic_of_init()
105 kfree(i2c_ic); in aspeed_i2c_ic_of_init()