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()
127 struct mtk_sysirq_chip_data *chip_data; in mtk_sysirq_of_init() local
136 chip_data = kzalloc(sizeof(*chip_data), GFP_KERNEL); in mtk_sysirq_of_init()
137 if (!chip_data) in mtk_sysirq_of_init()
149 chip_data->intpol_words = kcalloc(nr_intpol_bases, in mtk_sysirq_of_init()
150 sizeof(*chip_data->intpol_words), in mtk_sysirq_of_init()
152 if (!chip_data->intpol_words) { in mtk_sysirq_of_init()
157 chip_data->intpol_bases = kcalloc(nr_intpol_bases, in mtk_sysirq_of_init()
158 sizeof(*chip_data->intpol_bases), in mtk_sysirq_of_init()
160 if (!chip_data->intpol_bases) { in mtk_sysirq_of_init()
171 chip_data->intpol_words[i] = size / 4; in mtk_sysirq_of_init()
172 chip_data->intpol_bases[i] = of_iomap(node, i); in mtk_sysirq_of_init()
173 if (ret || !chip_data->intpol_bases[i]) { in mtk_sysirq_of_init()
180 chip_data->intpol_idx = kcalloc(intpol_num, in mtk_sysirq_of_init()
181 sizeof(*chip_data->intpol_idx), in mtk_sysirq_of_init()
183 if (!chip_data->intpol_idx) { in mtk_sysirq_of_init()
188 chip_data->which_word = kcalloc(intpol_num, in mtk_sysirq_of_init()
189 sizeof(*chip_data->which_word), in mtk_sysirq_of_init()
191 if (!chip_data->which_word) { in mtk_sysirq_of_init()
203 for (j = 0; word >= chip_data->intpol_words[j] ; j++) in mtk_sysirq_of_init()
204 word -= chip_data->intpol_words[j]; in mtk_sysirq_of_init()
206 chip_data->intpol_idx[i] = j; in mtk_sysirq_of_init()
207 chip_data->which_word[i] = word; in mtk_sysirq_of_init()
211 &sysirq_domain_ops, chip_data); in mtk_sysirq_of_init()
216 raw_spin_lock_init(&chip_data->lock); in mtk_sysirq_of_init()
221 kfree(chip_data->which_word); in mtk_sysirq_of_init()
223 kfree(chip_data->intpol_idx); in mtk_sysirq_of_init()
226 if (chip_data->intpol_bases[i]) in mtk_sysirq_of_init()
227 iounmap(chip_data->intpol_bases[i]); in mtk_sysirq_of_init()
228 kfree(chip_data->intpol_bases); in mtk_sysirq_of_init()
230 kfree(chip_data->intpol_words); in mtk_sysirq_of_init()
232 kfree(chip_data); in mtk_sysirq_of_init()