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

Sascha Hauer s.hauer at pengutronix.de
Wed Jun 20 05:21:57 EDT 2012


On Wed, Jun 20, 2012 at 10:35:21AM +0200, Linus Walleij wrote:
> 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.

If there would be such a register it would almost certainly be on different
register offsets on different SoCs...

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the linux-arm-kernel mailing list