Lines Matching refs:chip_data
29 struct mtk_sysirq_chip_data *chip_data = data->chip_data; in mtk_sysirq_set_type() local
30 u8 intpol_idx = chip_data->intpol_idx[hwirq]; in mtk_sysirq_set_type()
36 base = chip_data->intpol_bases[intpol_idx]; in mtk_sysirq_set_type()
37 reg_index = chip_data->which_word[hwirq]; in mtk_sysirq_set_type()
40 raw_spin_lock_irqsave(&chip_data->lock, flags); in mtk_sysirq_set_type()
56 raw_spin_unlock_irqrestore(&chip_data->lock, flags); in mtk_sysirq_set_type()
126 struct mtk_sysirq_chip_data *chip_data; in mtk_sysirq_of_init() local
135 chip_data = kzalloc(sizeof(*chip_data), GFP_KERNEL); in mtk_sysirq_of_init()
136 if (!chip_data) in mtk_sysirq_of_init()
148 chip_data->intpol_words = kcalloc(nr_intpol_bases, in mtk_sysirq_of_init()
149 sizeof(*chip_data->intpol_words), in mtk_sysirq_of_init()
151 if (!chip_data->intpol_words) { in mtk_sysirq_of_init()
156 chip_data->intpol_bases = kcalloc(nr_intpol_bases, in mtk_sysirq_of_init()
157 sizeof(*chip_data->intpol_bases), in mtk_sysirq_of_init()
159 if (!chip_data->intpol_bases) { in mtk_sysirq_of_init()
170 chip_data->intpol_words[i] = size / 4; in mtk_sysirq_of_init()
171 chip_data->intpol_bases[i] = of_iomap(node, i); in mtk_sysirq_of_init()
172 if (ret || !chip_data->intpol_bases[i]) { in mtk_sysirq_of_init()
179 chip_data->intpol_idx = kcalloc(intpol_num, in mtk_sysirq_of_init()
180 sizeof(*chip_data->intpol_idx), in mtk_sysirq_of_init()
182 if (!chip_data->intpol_idx) { in mtk_sysirq_of_init()
187 chip_data->which_word = kcalloc(intpol_num, in mtk_sysirq_of_init()
188 sizeof(*chip_data->which_word), in mtk_sysirq_of_init()
190 if (!chip_data->which_word) { in mtk_sysirq_of_init()
202 for (j = 0; word >= chip_data->intpol_words[j] ; j++) in mtk_sysirq_of_init()
203 word -= chip_data->intpol_words[j]; in mtk_sysirq_of_init()
205 chip_data->intpol_idx[i] = j; in mtk_sysirq_of_init()
206 chip_data->which_word[i] = word; in mtk_sysirq_of_init()
210 &sysirq_domain_ops, chip_data); in mtk_sysirq_of_init()
215 raw_spin_lock_init(&chip_data->lock); in mtk_sysirq_of_init()
220 kfree(chip_data->which_word); in mtk_sysirq_of_init()
222 kfree(chip_data->intpol_idx); in mtk_sysirq_of_init()
225 if (chip_data->intpol_bases[i]) in mtk_sysirq_of_init()
226 iounmap(chip_data->intpol_bases[i]); in mtk_sysirq_of_init()
227 kfree(chip_data->intpol_bases); in mtk_sysirq_of_init()
229 kfree(chip_data->intpol_words); in mtk_sysirq_of_init()
231 kfree(chip_data); in mtk_sysirq_of_init()