Thread (21 messages) 21 messages, 4 authors, 2010-09-10

Re: [PATCH] powerpc/mpc8xxx_gpio.c: extend the driver to support mpc512x gpios

From: Grant Likely <hidden>
Date: 2010-08-07 16:58:43

On Sat, Aug 7, 2010 at 10:39 AM, Anatolij Gustschin [off-list ref] wrote:
Grant Likely [off-list ref] wrote:
quoted
quoted
@@ -226,6 +272,9 @@ static struct irq_chip mpc8xxx_irq_chip =3D {
=A0static int mpc8xxx_gpio_irq_map(struct irq_host *h, unsigned int vi=
rq,
quoted
quoted
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0irq_hw_=
number_t hw)
quoted
quoted
=A0{
+ =A0 =A0 =A0 if (of_device_is_compatible(h->of_node, "fsl,mpc5121-gpi=
o"))
quoted
quoted
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 mpc8xxx_irq_chip.set_type =3D mpc512x_ir=
q_set_type;
quoted
quoted
+
You can put the set type hook into the of_match_table data which you
will need for of_find_matching_node() (see below).
How can I get this match table data reference in mpc8xxx_gpio_irq_map() ?
of_match_node() will return the matching entry in the table.
Is it okay to set data field of struct device_node to the set type
hook? I could do it in mpc8xxx_add_gpiochips() but I'm not sure whether
the data field will be used for other purposes somewhere else.
You are safe to use the .data field.

g.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help