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