Skip to content

Commit d022c86

Browse files
simontrimmerLucas Tanure
authored andcommitted
mfd: clsic: expose RAS interrupt sources to clsic-tacna children
Change-Id: I83fbd51cbe7553a8f7cc55d3f0643bac6db3245b Signed-off-by: Simon Trimmer <[email protected]>
1 parent 29ee68e commit d022c86

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

drivers/mfd/clsic/clsic-tacna.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,28 @@ static struct mfd_cell clsic_tacna_devs[] = {
2525
},
2626
};
2727

28+
/*
29+
* Each clsic-tacna device is associated with a register access service
30+
* handler, delegate the IRQ handling to that RAS instance.
31+
*/
32+
int clsic_tacna_request_irq(struct tacna *tacna,
33+
unsigned int irq_id, const char *name,
34+
irq_handler_t handler, void *data)
35+
{
36+
struct clsic_ras_struct *ras = dev_get_platdata(tacna->dev);
37+
38+
return clsic_ras_request_irq(ras, irq_id, name, handler, data);
39+
}
40+
EXPORT_SYMBOL_GPL(clsic_tacna_request_irq);
41+
42+
void clsic_tacna_free_irq(struct tacna *tacna, unsigned int irq_id, void *data)
43+
{
44+
struct clsic_ras_struct *ras = dev_get_platdata(tacna->dev);
45+
46+
clsic_ras_free_irq(ras, irq_id, data);
47+
}
48+
EXPORT_SYMBOL_GPL(clsic_tacna_free_irq);
49+
2850
/*
2951
* Apply the default state of the pins specified as "active" in the device tree
3052
* on startup.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* clsic-tacna.h -- CLSIC Tacna IRQ handling
3+
*
4+
* Copyright (C) 2015-2019 Cirrus Logic, Inc. and
5+
* Cirrus Logic International Semiconductor Ltd.
6+
*
7+
* This program is free software; you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License version 2 as
9+
* published by the Free Software Foundation.
10+
*/
11+
12+
#ifndef CIRRUS_CLSIC_TACNA_H
13+
#define CIRRUS_CLSIC_TACNA_H
14+
15+
#include <linux/mfd/clsic/rassrv.h>
16+
17+
/* Provide a mapping for clients to reference DSP2 IRQs */
18+
#define CLSIC_TACNA_IRQ_DSP2_0 CLSIC_RAS_IRQ_DSP2_0
19+
#define CLSIC_TACNA_IRQ_DSP2_1 CLSIC_RAS_IRQ_DSP2_1
20+
#define CLSIC_TACNA_IRQ_DSP2_2 CLSIC_RAS_IRQ_DSP2_2
21+
#define CLSIC_TACNA_IRQ_DSP2_3 CLSIC_RAS_IRQ_DSP2_3
22+
#define CLSIC_TACNA_IRQ_DSP2_COUNT CLSIC_RAS_IRQ_DSP2_COUNT
23+
24+
extern int clsic_tacna_request_irq(struct tacna *tacna,
25+
unsigned int irq_id, const char *name,
26+
irq_handler_t handler, void *data);
27+
28+
extern void clsic_tacna_free_irq(struct tacna *tacna,
29+
unsigned int irq_id, void *data);
30+
#endif

0 commit comments

Comments
 (0)