Re: [Patch 06/10] mfd: PCAP driver for the Motorola EZX GSM mobilephones

From: Daniel Ribeiro
Date: Tue Jul 08 2008 - 10:02:15 EST


Eric Miao escreveu:
> The irq2pcap[] array looks horrible to me. It's actually a sparse array.
> Isn't there a nice 1:1 mapping using a formular??
>
> Besides, the IRQ numbering scheme has now changed to a more generic way,
> I suggest to pull from Russell's latest git tree and rebase the IRQ
> part.

Will do as you suggested and get rid of the arrays.

> The following block of code:
>
> + if (pcap_data->cs >= 0) {
> + if (machine_is_ezx_a780() || machine_is_ezx_e680())
> + gpio_direction_output(pcap_data->cs, 1);
> + else
> + gpio_direction_output(pcap_data->cs, 0);
> + }
>
> has 3 occurrences in the driver (2 in ezx_ssp_pcap_putget, 1 in ezx_pcap_probe)
> which is good reason to fold this into the platform data.
>
> Well, if the above is done in platform data, I guess you won't mind another bit
> flag (e.g. PCAP_REDIRECT_IRQ or something alike) added in platform data, either

Moved to platform data. What should PCAP_REDIRECT_IRQ flag do?

--
Daniel Ribeiro
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/