diff options
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r-- | include/linux/irq.h | 79 |
1 files changed, 65 insertions, 14 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 80fcb53057bc..e9f847d56c4d 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -292,8 +292,7 @@ set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | |||
292 | * IRQ_NOREQUEST and IRQ_NOPROBE) | 292 | * IRQ_NOREQUEST and IRQ_NOPROBE) |
293 | */ | 293 | */ |
294 | static inline void | 294 | static inline void |
295 | set_irq_chained_handler(unsigned int irq, | 295 | set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle) |
296 | irq_flow_handler_t handle) | ||
297 | { | 296 | { |
298 | __set_irq_handler(irq, handle, 1, NULL); | 297 | __set_irq_handler(irq, handle, 1, NULL); |
299 | } | 298 | } |
@@ -312,12 +311,12 @@ static inline void irq_clear_status_flags(unsigned int irq, unsigned long clr) | |||
312 | irq_modify_status(irq, clr, 0); | 311 | irq_modify_status(irq, clr, 0); |
313 | } | 312 | } |
314 | 313 | ||
315 | static inline void set_irq_noprobe(unsigned int irq) | 314 | static inline void irq_set_noprobe(unsigned int irq) |
316 | { | 315 | { |
317 | irq_modify_status(irq, 0, IRQ_NOPROBE); | 316 | irq_modify_status(irq, 0, IRQ_NOPROBE); |
318 | } | 317 | } |
319 | 318 | ||
320 | static inline void set_irq_probe(unsigned int irq) | 319 | static inline void irq_set_probe(unsigned int irq) |
321 | { | 320 | { |
322 | irq_modify_status(irq, IRQ_NOPROBE, 0); | 321 | irq_modify_status(irq, IRQ_NOPROBE, 0); |
323 | } | 322 | } |
@@ -338,14 +337,14 @@ static inline void dynamic_irq_init(unsigned int irq) | |||
338 | } | 337 | } |
339 | 338 | ||
340 | /* Set/get chip/data for an IRQ: */ | 339 | /* Set/get chip/data for an IRQ: */ |
341 | extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); | 340 | extern int irq_set_chip(unsigned int irq, struct irq_chip *chip); |
342 | extern int set_irq_data(unsigned int irq, void *data); | 341 | extern int irq_set_handler_data(unsigned int irq, void *data); |
343 | extern int set_irq_chip_data(unsigned int irq, void *data); | 342 | extern int irq_set_chip_data(unsigned int irq, void *data); |
344 | extern int set_irq_type(unsigned int irq, unsigned int type); | 343 | extern int irq_set_irq_type(unsigned int irq, unsigned int type); |
345 | extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); | 344 | extern int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry); |
346 | extern struct irq_data *irq_get_irq_data(unsigned int irq); | 345 | extern struct irq_data *irq_get_irq_data(unsigned int irq); |
347 | 346 | ||
348 | static inline struct irq_chip *get_irq_chip(unsigned int irq) | 347 | static inline struct irq_chip *irq_get_chip(unsigned int irq) |
349 | { | 348 | { |
350 | struct irq_data *d = irq_get_irq_data(irq); | 349 | struct irq_data *d = irq_get_irq_data(irq); |
351 | return d ? d->chip : NULL; | 350 | return d ? d->chip : NULL; |
@@ -356,7 +355,7 @@ static inline struct irq_chip *irq_data_get_irq_chip(struct irq_data *d) | |||
356 | return d->chip; | 355 | return d->chip; |
357 | } | 356 | } |
358 | 357 | ||
359 | static inline void *get_irq_chip_data(unsigned int irq) | 358 | static inline void *irq_get_chip_data(unsigned int irq) |
360 | { | 359 | { |
361 | struct irq_data *d = irq_get_irq_data(irq); | 360 | struct irq_data *d = irq_get_irq_data(irq); |
362 | return d ? d->chip_data : NULL; | 361 | return d ? d->chip_data : NULL; |
@@ -367,18 +366,18 @@ static inline void *irq_data_get_irq_chip_data(struct irq_data *d) | |||
367 | return d->chip_data; | 366 | return d->chip_data; |
368 | } | 367 | } |
369 | 368 | ||
370 | static inline void *get_irq_data(unsigned int irq) | 369 | static inline void *irq_get_handler_data(unsigned int irq) |
371 | { | 370 | { |
372 | struct irq_data *d = irq_get_irq_data(irq); | 371 | struct irq_data *d = irq_get_irq_data(irq); |
373 | return d ? d->handler_data : NULL; | 372 | return d ? d->handler_data : NULL; |
374 | } | 373 | } |
375 | 374 | ||
376 | static inline void *irq_data_get_irq_data(struct irq_data *d) | 375 | static inline void *irq_data_get_irq_handler_data(struct irq_data *d) |
377 | { | 376 | { |
378 | return d->handler_data; | 377 | return d->handler_data; |
379 | } | 378 | } |
380 | 379 | ||
381 | static inline struct msi_desc *get_irq_msi(unsigned int irq) | 380 | static inline struct msi_desc *irq_get_msi_desc(unsigned int irq) |
382 | { | 381 | { |
383 | struct irq_data *d = irq_get_irq_data(irq); | 382 | struct irq_data *d = irq_get_irq_data(irq); |
384 | return d ? d->msi_desc : NULL; | 383 | return d ? d->msi_desc : NULL; |
@@ -389,6 +388,58 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d) | |||
389 | return d->msi_desc; | 388 | return d->msi_desc; |
390 | } | 389 | } |
391 | 390 | ||
391 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
392 | /* Please do not use: Use the replacement functions instead */ | ||
393 | static inline int set_irq_chip(unsigned int irq, struct irq_chip *chip) | ||
394 | { | ||
395 | return irq_set_chip(irq, chip); | ||
396 | } | ||
397 | static inline int set_irq_data(unsigned int irq, void *data) | ||
398 | { | ||
399 | return irq_set_handler_data(irq, data); | ||
400 | } | ||
401 | static inline int set_irq_chip_data(unsigned int irq, void *data) | ||
402 | { | ||
403 | return irq_set_chip_data(irq, data); | ||
404 | } | ||
405 | static inline int set_irq_type(unsigned int irq, unsigned int type) | ||
406 | { | ||
407 | return irq_set_irq_type(irq, type); | ||
408 | } | ||
409 | static inline int set_irq_msi(unsigned int irq, struct msi_desc *entry) | ||
410 | { | ||
411 | return irq_set_msi_desc(irq, entry); | ||
412 | } | ||
413 | static inline struct irq_chip *get_irq_chip(unsigned int irq) | ||
414 | { | ||
415 | return irq_get_chip(irq); | ||
416 | } | ||
417 | static inline void *get_irq_chip_data(unsigned int irq) | ||
418 | { | ||
419 | return irq_get_chip_data(irq); | ||
420 | } | ||
421 | static inline void *get_irq_data(unsigned int irq) | ||
422 | { | ||
423 | return irq_get_handler_data(irq); | ||
424 | } | ||
425 | static inline void *irq_data_get_irq_data(struct irq_data *d) | ||
426 | { | ||
427 | return irq_data_get_irq_handler_data(d); | ||
428 | } | ||
429 | static inline struct msi_desc *get_irq_msi(unsigned int irq) | ||
430 | { | ||
431 | return irq_get_msi_desc(irq); | ||
432 | } | ||
433 | static inline void set_irq_noprobe(unsigned int irq) | ||
434 | { | ||
435 | irq_set_noprobe(irq); | ||
436 | } | ||
437 | static inline void set_irq_probe(unsigned int irq) | ||
438 | { | ||
439 | irq_set_probe(irq); | ||
440 | } | ||
441 | #endif | ||
442 | |||
392 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); | 443 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); |
393 | void irq_free_descs(unsigned int irq, unsigned int cnt); | 444 | void irq_free_descs(unsigned int irq, unsigned int cnt); |
394 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); | 445 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); |