From: grinberg@compulab•co.il (Igor Grinberg)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 06/10] gpio: pxa: define nr gpios in platform data
Date: Mon, 28 Jan 2013 10:02:22 +0200 [thread overview]
Message-ID: <5106308E.8050303@compulab.co.il> (raw)
In-Reply-To: <1358929554-32265-7-git-send-email-haojian.zhuang@linaro.org>
On 01/23/13 10:25, Haojian Zhuang wrote:
> Avoid to define gpio numbers in gpio driver. Define it in platform data
> instead.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro•org>
> ---
> arch/arm/mach-mmp/aspenite.c | 1 +
> arch/arm/mach-mmp/avengers_lite.c | 1 +
> arch/arm/mach-mmp/brownstone.c | 1 +
> arch/arm/mach-mmp/flint.c | 1 +
> arch/arm/mach-mmp/gplugd.c | 1 +
> arch/arm/mach-mmp/tavorevb.c | 1 +
> arch/arm/mach-mmp/teton_bga.c | 1 +
> arch/arm/mach-mmp/ttc_dkb.c | 1 +
> arch/arm/mach-pxa/pxa25x.c | 3 +++
> arch/arm/mach-pxa/pxa27x.c | 1 +
> arch/arm/mach-pxa/pxa3xx.c | 15 +++++++++++-
> drivers/gpio/gpio-pxa.c | 48 +++++++------------------------------
> include/linux/gpio-pxa.h | 1 +
> 13 files changed, 35 insertions(+), 41 deletions(-)
[...]
> diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
> index 656a1bb..a0cc797 100644
> --- a/arch/arm/mach-pxa/pxa3xx.c
> +++ b/arch/arm/mach-pxa/pxa3xx.c
> @@ -435,6 +435,10 @@ void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info)
> pxa_register_device(&pxa3xx_device_i2c_power, info);
> }
>
> +static struct pxa_gpio_platform_data pxa3xx_gpio_info __initdata = {
> + .nr_gpios = 128,
> +};
This misses the:
#include <linux/gpio-pxa.h>
> +
> static struct platform_device *devices[] __initdata = {
> &pxa_device_gpio,
> &pxa27x_device_udc,
> @@ -482,8 +486,17 @@ static int __init pxa3xx_init(void)
> register_syscore_ops(&pxa3xx_mfp_syscore_ops);
> register_syscore_ops(&pxa3xx_clock_syscore_ops);
>
> - if (!of_have_populated_dt())
> + if (!of_have_populated_dt()) {
> + if (cpu_is_pxa93x())
> + pxa3xx_gpio_info.nr_gpios = 192;
> + ret = platform_device_add_data(&pxa_device_gpio,
> + &pxa3xx_gpio_info,
> + sizeof(struct pxa_gpio_platform_data);
Closing parenthesis is missing...
> + if (ret < 0)
> + break;
> +
> ret = platform_add_devices(devices, ARRAY_SIZE(devices));
> + }
> }
>
> return ret;
[...]
--
Regards,
Igor.
next prev parent reply other threads:[~2013-01-28 8:02 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 8:25 [PATCH 00/10] rework gpio pxa driver for pinctrl Haojian Zhuang
2013-01-23 8:25 ` [PATCH 01/10] gpio: pxa: set initcall level to module init Haojian Zhuang
2013-01-25 9:51 ` Linus Walleij
2013-01-25 21:01 ` Robert Jarzmik
2013-01-28 4:26 ` Haojian Zhuang
2013-01-28 10:27 ` Linus Walleij
2013-01-23 8:25 ` [PATCH 02/10] gpio: pxa: identify ed mask reg with platform data Haojian Zhuang
2013-01-25 9:54 ` Linus Walleij
2013-01-25 9:57 ` Linus Walleij
2013-01-25 10:00 ` Haojian Zhuang
2013-01-29 17:33 ` Olof Johansson
2013-01-23 8:25 ` [PATCH 03/10] gpio: pxa: avoid to use global irq base Haojian Zhuang
2013-01-28 11:07 ` Igor Grinberg
2013-01-29 16:13 ` Haojian Zhuang
2013-01-23 8:25 ` [PATCH 04/10] gpio: pxa: use platform data for gpio inverted Haojian Zhuang
2013-01-25 9:59 ` Linus Walleij
2013-01-23 8:25 ` [PATCH 05/10] gpio: pxa: remove gpio_type Haojian Zhuang
2013-01-25 10:01 ` Linus Walleij
2013-01-28 11:29 ` Igor Grinberg
2013-01-31 20:54 ` Linus Walleij
2013-01-23 8:25 ` [PATCH 06/10] gpio: pxa: define nr gpios in platform data Haojian Zhuang
2013-01-28 8:02 ` Igor Grinberg [this message]
2013-01-23 8:25 ` [PATCH 07/10] gpio: pxa: clean code for compatible name Haojian Zhuang
2013-01-23 8:25 ` [PATCH 08/10] gpio: pxa: remove arch related macro Haojian Zhuang
2013-01-23 8:25 ` [PATCH 09/10] gpio: pxa: move gpio properties into child node Haojian Zhuang
2013-01-28 11:27 ` Igor Grinberg
2013-01-23 8:25 ` [PATCH 10/10] gpio: pxa: bind to pinctrl by request Haojian Zhuang
2013-01-23 12:27 ` [PATCH 00/10] rework gpio pxa driver for pinctrl Linus Walleij
[not found] ` <20130123131503.GJ2239@intel.com>
2013-01-25 9:49 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5106308E.8050303@compulab.co.il \
--to=grinberg@compulab$(echo .)co.il \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox