From patchwork Wed Jun 20 12:56:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 9489 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 E675023E1B for ; Wed, 20 Jun 2012 12:57:05 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id B5CEDA1851B for ; Wed, 20 Jun 2012 12:57:05 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id z12so6026493ghb.11 for ; Wed, 20 Jun 2012 05:57:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=UTv9luZkqSrbgktu3Q2I8MFlH4mLgi2c2V2SxX3MFE0=; b=G7iSrOEDkZFHk5MViqdfg10vP/TF+Yj/o2GwGX5cSazWXd37G7mxt6OqcenEc0wy7X UhywA2aJr4/NTV+hxz4fvMYKF3AdB4YbjT38QJFP9AIIyLPHOFxoW4a7GfYjxjRQR5G8 HMyoBPtjRBMFnm2BDdqAopzKsnflLQKkeMv3uDgtcmouqW9cPQdl98Wv1yIYKwHrrQ85 nsxLvleUsnPO7ItVsxceOHVitGxE3HAgtG+ZI0RGmzT0R3QMPfxVHn9hYIIBuqOBR9QF +m0ETG0VEICcgebjDGHY/4Xq6mdLcVYf2t/bxtkXB6daLbFrc/N+OMhSqC0crVoeZN3x UVVw== Received: by 10.50.195.234 with SMTP id ih10mr4441654igc.0.1340197025331; Wed, 20 Jun 2012 05:57:05 -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.231.24.148 with SMTP id v20csp178527ibb; Wed, 20 Jun 2012 05:57:04 -0700 (PDT) Received: by 10.180.84.6 with SMTP id u6mr11916736wiy.11.1340197024047; Wed, 20 Jun 2012 05:57:04 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id u10si34400692wiw.43.2012.06.20.05.57.03 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jun 2012 05:57:04 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 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-wg0-f50.google.com with SMTP id ds11so7385651wgb.31 for ; Wed, 20 Jun 2012 05:57:03 -0700 (PDT) Received: by 10.180.83.168 with SMTP id r8mr11905307wiy.22.1340197023439; Wed, 20 Jun 2012 05:57:03 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id gc6sm38878374wib.0.2012.06.20.05.57.01 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jun 2012 05:57:02 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org Cc: linus.walleij@stericsson.com, arnd@arndb.de, grant.likely@secretlab.ca, linux@arm.linux.org.uk, broonie@opensource.wolfsonmicro.com, Lee Jones , Samuel Ortiz Subject: [PATCH 02/15] mfd: Generically describe interactions with the DB8500 PRCMU Date: Wed, 20 Jun 2012 13:56:38 +0100 Message-Id: <1340197011-5435-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1340197011-5435-1-git-send-email-lee.jones@linaro.org> References: <1340197011-5435-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQm2Gn9Tfp7zD/RCHhGWyH7u08oCsZfLwZ3+9vkT4M1yGV+7aLlhp6s53DdSEv6x4I+/7YAO There is only one method used to communicate with the DB8500 PRCMU, via I2C. Now this can be assumed, there is no requirement to specify the protocol in the function name. This patch removes protocol specifics and uses a more generic naming convention. Cc: Samuel Ortiz Signed-off-by: Lee Jones --- drivers/mfd/ab8500-core.c | 12 ++++++------ drivers/mfd/ab8500-debugfs.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index bf2ba0a..8de3b65 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -141,7 +141,7 @@ static const char ab8500_version_str[][7] = { [AB8500_VERSION_AB8540] = "AB8540", }; -static int ab8500_i2c_write(struct ab8500 *ab8500, u16 addr, u8 data) +static int ab8500_prcmu_write(struct ab8500 *ab8500, u16 addr, u8 data) { int ret; @@ -151,7 +151,7 @@ static int ab8500_i2c_write(struct ab8500 *ab8500, u16 addr, u8 data) return ret; } -static int ab8500_i2c_write_masked(struct ab8500 *ab8500, u16 addr, u8 mask, +static int ab8500_prcmu_write_masked(struct ab8500 *ab8500, u16 addr, u8 mask, u8 data) { int ret; @@ -163,7 +163,7 @@ static int ab8500_i2c_write_masked(struct ab8500 *ab8500, u16 addr, u8 mask, return ret; } -static int ab8500_i2c_read(struct ab8500 *ab8500, u16 addr) +static int ab8500_prcmu_read(struct ab8500 *ab8500, u16 addr) { int ret; u8 data; @@ -1267,9 +1267,9 @@ static int __devinit ab8500_probe(struct platform_device *pdev) ab8500->irq = resource->start; - ab8500->read = ab8500_i2c_read; - ab8500->write = ab8500_i2c_write; - ab8500->write_masked = ab8500_i2c_write_masked; + ab8500->read = ab8500_prcmu_read; + ab8500->write = ab8500_prcmu_write; + ab8500->write_masked = ab8500_prcmu_write_masked; mutex_init(&ab8500->lock); mutex_init(&ab8500->irq_lock); diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c index 50c4c89..361de52 100644 --- a/drivers/mfd/ab8500-debugfs.c +++ b/drivers/mfd/ab8500-debugfs.c @@ -31,12 +31,12 @@ struct ab8500_reg_range { }; /** - * struct ab8500_i2c_ranges + * struct ab8500_prcmu_ranges * @num_ranges: the number of ranges in the list * @bankid: bank identifier * @range: the list of register ranges */ -struct ab8500_i2c_ranges { +struct ab8500_prcmu_ranges { u8 num_ranges; u8 bankid; const struct ab8500_reg_range *range; @@ -47,7 +47,7 @@ struct ab8500_i2c_ranges { #define AB8500_REV_REG 0x80 -static struct ab8500_i2c_ranges debug_ranges[AB8500_NUM_BANKS] = { +static struct ab8500_prcmu_ranges debug_ranges[AB8500_NUM_BANKS] = { [0x0] = { .num_ranges = 0, .range = 0,