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