From patchwork Thu Mar 28 16:11:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 15751 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A64C123E10 for ; Thu, 28 Mar 2013 16:13:00 +0000 (UTC) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by fiordland.canonical.com (Postfix) with ESMTP id 466A6A18873 for ; Thu, 28 Mar 2013 16:13:00 +0000 (UTC) Received: by mail-vc0-f175.google.com with SMTP id hf12so7756540vcb.20 for ; Thu, 28 Mar 2013 09:12:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=Bvsd7ySnfxIjmyuMiFVos9h9+GZo9ccvg2LW0KNKjLo=; b=g6JUzjJAc4YNm/IlIsHYsmU4hdt64+UVqII5DK6F9XvKObS5rwItN2vX5+NmmIbuu9 KpZAe8xY8HmaJqCek/8oYbFSecqKfc+tFizN9WGt+wBsxQ5UHAzXePyTt6QOTZuHa1aq 8+LEltn4WvreGl8R5NH+GRpFIoQGnNKgda1wb9OsVYWG+RcyvY2fYK6KNMH9zph3bgkY munMYBmDNjvIxexU+VpYu8AQUo1UeYwup6RVgkHtl3cpTywAH9CgyBX5gLXoztG78kBy YngiFDM1Zh81vmEZZANhOl3hdmgzG0olrxQwwxkI/2+kwRvn43bVWP3Drkp2TeNFV+Kh LkSA== X-Received: by 10.220.150.74 with SMTP id x10mr7362027vcv.68.1364487179837; Thu, 28 Mar 2013 09:12:59 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp22451ved; Thu, 28 Mar 2013 09:12:59 -0700 (PDT) X-Received: by 10.180.12.33 with SMTP id v1mr17358086wib.24.1364487174667; Thu, 28 Mar 2013 09:12:54 -0700 (PDT) Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]) by mx.google.com with ESMTPS id ew9si10109816wjd.112.2013.03.28.09.12.54 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:12:54 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22d is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::22d; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c05::22d is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wi0-f173.google.com with SMTP id ez12so3478861wid.6 for ; Thu, 28 Mar 2013 09:12:54 -0700 (PDT) X-Received: by 10.180.87.170 with SMTP id az10mr17635589wib.3.1364487174281; Thu, 28 Mar 2013 09:12:54 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id o5sm16765926wix.3.2013.03.28.09.12.52 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:12:53 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Lee Jones Subject: [PATCH 31/33] ARM: ux500: Pass regulator platform data using the new format Date: Thu, 28 Mar 2013 16:11:31 +0000 Message-Id: <1364487093-19551-32-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364487093-19551-1-git-send-email-lee.jones@linaro.org> References: <1364487093-19551-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQk6fEWDNQFXqpTSFUFOB6MlZEYOXJt5PdSJh+1SJQlKYrbs8UNxbXoYjr0cvleH5aG5bvKs Regulator platform data is now passed though a single structure as opposed to the old way where four separate struct elements were required. This patch makes use of the new format. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500.c | 5 +---- include/linux/mfd/abx500/ab8500.h | 11 ++--------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index b034578..b1124bd 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -198,10 +198,7 @@ static struct platform_device snowball_sbnet_dev = { struct ab8500_platform_data ab8500_platdata = { .irq_base = MOP500_AB8500_IRQ_BASE, - .regulator_reg_init = ab8500_regulator_reg_init, - .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init), - .regulator = ab8500_regulators, - .num_regulator = ARRAY_SIZE(ab8500_regulators), + .regulator = &ab8500_regulator_plat_data, .gpio = &ab8500_gpio_pdata, .codec = &ab8500_codec_pdata, }; diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 9db0bda..84f4494 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h @@ -364,8 +364,7 @@ struct ab8500 { const int *irq_reg_offset; }; -struct regulator_reg_init; -struct regulator_init_data; +struct ab8500_regulator_platform_data; struct ab8500_gpio_platform_data; struct ab8500_codec_platform_data; struct ab8500_sysctrl_platform_data; @@ -375,19 +374,13 @@ struct ab8500_sysctrl_platform_data; * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used * @pm_power_off: Should machine pm power off hook be registered or not * @init: board-specific initialization after detection of ab8500 - * @num_regulator_reg_init: number of regulator init registers - * @regulator_reg_init: regulator init registers - * @num_regulator: number of regulators * @regulator: machine-specific constraints for regulators */ struct ab8500_platform_data { int irq_base; bool pm_power_off; void (*init) (struct ab8500 *); - int num_regulator_reg_init; - struct ab8500_regulator_reg_init *regulator_reg_init; - int num_regulator; - struct regulator_init_data *regulator; + struct ab8500_regulator_platform_data *regulator; struct abx500_gpio_platform_data *gpio; struct ab8500_codec_platform_data *codec; struct ab8500_sysctrl_platform_data *sysctrl;