[PATCH] gpio/mxc: use the edge_sel feature if available

Linus Walleij linus.walleij at linaro.org
Wed Jun 20 04:35:21 EDT 2012


On Tue, Jun 19, 2012 at 2:00 PM, Benoît Thébaudeau
<benoit.thebaudeau at advansee.com> wrote:

> Can you give me an example
> that tells me by what you replaced those cpu_is_xxx()? By some feature test
> macros?

Since this is a DT-enabled driver, add a boolean attribute for
the DT node like "has-edge-select" and add that attribute to
the SoC .dtsi files for the SoCs that has this feature.

Another (better) option is if there are magic numbers in the
silicon register range that you can check for revision of that
hardware in itself. Such auto-detect plug-n-play is always best.

> E.g., there are still many of those cpu_is_xxx() in
> drivers/mtd/nand/mxc_nand.c in linux-next.

Two wrongs does not make one right or how you put it ;-)

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list