Thread (2 messages) flat view 2 messages, 2 authors, 2011-07-06

Re: [PATCH 1/2] gpio/mxc: get rid of the uses of cpu_is_mx()

From: Sascha Hauer <hidden>
Date: 2011-07-05 16:42:38
Also in: linux-arm-kernel

On Tue, Jul 05, 2011 at 11:32:28AM +0800, Shawn Guo wrote:
On Mon, Jul 04, 2011 at 09:04:55PM -0600, Grant Likely wrote:
quoted
On Mon, Jul 4, 2011 at 9:01 PM, Shawn Guo [off-list ref] wrote:
quoted
On Mon, Jul 04, 2011 at 06:44:57PM +0200, Sascha Hauer wrote:
quoted
Read again. We have three different types of gpio irq controllers, they
are first seen in the imx1, imx21 and imx31. So all others can be made
compatible with these three. No need for imx-gpio, imx25-gpio and
imx27-gpio. The mxc_gpio_devtype would look like this:

static struct platform_device_id mxc_gpio_devtype[] = {
      {
              .name = "imx1-gpio",
              .driver_data = IMX1_GPIO,
      }, {
              .name = "imx21-gpio",
              .driver_data = IMX21_GPIO,
      }, {
              .name = "imx31-gpio",
              .driver_data = IMX31_GPIO,
      }, {
      }
};
This is really what I want to do with dt match table.  But before we
totally remove platform device probe and switch it over to dt, I'm
unsure we want to do this.  It will require the following changes on
platform device code registration right now.  I guess this is
something you do not want, right?
What is the problem with the below changes?  I see no issue with
changing the static platform_device registrations in this way.
We end up to register "imx21-gpio" in imx27_soc_init, and "imx31-gpio"
in imx25/35/50/51/53 per-soc-init function.  The may confuse people
who only look at platform device registration code.  This is something
may concern Sascha.  Let's see what he thinks.
If we vote for doing this in the device tree then I see no problem doing
so in the platform registration code aswell.


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 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help