SPARC and OF_GPIO

From: Thierry Reding
Date: Mon Nov 05 2012 - 04:22:21 EST


Hi David,

There have been a number of reports that Linux kernel builds fail on
SPARC because it doesn't support OF_GPIO, which provides the of_node
field of the struct gpio_chip.

One of the drivers I wrote (gpio-adnp) accesses this unconditionally but
only depends on OF and not OF_GPIO, so it fails to build on SPARC. A
similar problem happens with the gpio-fan driver, which defines the OF
match table only if OF_GPIO is selected, but uses it even if only OF but
not OF_GPIO is selected.

While it is clearly the drivers which are at fault here it still raises
the question as to why SPARC still conflicts with OF_GPIO. Over two
years ago, commit 5ab5fc7 made most of the OF symbols available to all
platforms except SPARC. The commit message explicitly states that this
should probably be re-evaluated.

Are you aware of any reasons why this conflict would still be necessary?
This is not only the case for OF_GPIO but likely also for OF_SPI,
OF_I2C, OF_IRQ and OF_ADDRESS. Shouldn't those all work even on SPARC
nowadays?

Thierry

Attachment: pgp00000.pgp
Description: PGP signature