From patchwork Tue Feb 11 17:10:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 24483 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BA2D8203F3 for ; Tue, 11 Feb 2014 17:13:39 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id tp5sf27341012ieb.7 for ; Tue, 11 Feb 2014 09:13:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=P4yrt4BrMm/HctY2GpKaXyLBbNmCf/cm4l0YKdpQ/4o=; b=EZzqHQE6vg/Gc+GXmrQaZoz2QIzRs+sdAEdmUFw0QZL4nKGl1yCMwMdglQp3etH8mN hS0WJF4bUXidxrquc5PX5glT7+qcmPXKLlmLCDHX2Lcv7ZNUofdGsM3m3Ajdltsp5M/Z JsU2oHishotrH5lQI7tbRe9qR/tNgwGbQXbsYHRkzi62PVmONGrQhd5nVvfrvlRLJc1H nz9eWCu3LR7B7nulr8bbhpfhXCfEP4s/hmWpwzVdMJ8duD0W1roptTlkE74k5m+4HJfb dFwt6u+661TQ2gf/UY8h9+TzTEJLQKwhAFQPO7OSErm+7Ja4SoHjUeBjhji1/6JC9+C8 3Kew== X-Gm-Message-State: ALoCoQnDeWtLIS6JPl6XVxKaEQ6AfOLCDlD/1Sq7I+KI3V/XvCvwM8qPjd8fF/b6Tyj1paVSxSzu X-Received: by 10.182.118.194 with SMTP id ko2mr198800obb.32.1392138818845; Tue, 11 Feb 2014 09:13:38 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.18.148 with SMTP id 20ls1789342qgf.89.gmail; Tue, 11 Feb 2014 09:13:38 -0800 (PST) X-Received: by 10.220.162.196 with SMTP id w4mr185528vcx.58.1392138818623; Tue, 11 Feb 2014 09:13:38 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id dr8si6141356vcb.88.2014.02.11.09.13.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 09:13:38 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oz11so6455099veb.32 for ; Tue, 11 Feb 2014 09:13:38 -0800 (PST) X-Received: by 10.221.54.65 with SMTP id vt1mr202069vcb.46.1392138818539; Tue, 11 Feb 2014 09:13:38 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp262402vcz; Tue, 11 Feb 2014 09:13:38 -0800 (PST) X-Received: by 10.66.141.165 with SMTP id rp5mr33928983pab.90.1392138817524; Tue, 11 Feb 2014 09:13:37 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vb2si19614598pbc.307.2014.02.11.09.13.36; Tue, 11 Feb 2014 09:13:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752849AbaBKRN3 (ORCPT + 27 others); Tue, 11 Feb 2014 12:13:29 -0500 Received: from fw-tnat.austin.arm.com ([217.140.110.23]:25528 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752202AbaBKRKw (ORCPT ); Tue, 11 Feb 2014 12:10:52 -0500 Received: from hornet.Cambridge.Arm.com (hornet.cambridge.arm.com [10.2.201.45]) by collaborate-mta1.arm.com (Postfix) with ESMTP id 757961401C4; Tue, 11 Feb 2014 11:10:51 -0600 (CST) From: Pawel Moll To: arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Pawel Moll , Samuel Ortiz , Lee Jones Subject: [PATCH 07/12] mfd: syscon: Consider platform data a regmap config name Date: Tue, 11 Feb 2014 17:10:31 +0000 Message-Id: <1392138636-29240-8-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392138636-29240-1-git-send-email-pawel.moll@arm.com> References: <1392138636-29240-1-git-send-email-pawel.moll@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pawel.moll@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use the device platform data as a regmap config name. This is particularly useful in the regmap debugfs when there is more than one syscon device registered, to distinguish the register blocks. Cc: Samuel Ortiz Cc: Lee Jones Signed-off-by: Pawel Moll --- Alternatively I could define a syscon platform data structure, something like this: struct syscon_platform_data { const char *label; }; drivers/mfd/syscon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c index 71841f9..ea1770b 100644 --- a/drivers/mfd/syscon.c +++ b/drivers/mfd/syscon.c @@ -143,6 +143,7 @@ static int syscon_probe(struct platform_device *pdev) return -ENOMEM; syscon_regmap_config.max_register = res->end - res->start - 3; + syscon_regmap_config.name = dev_get_platdata(&pdev->dev); syscon->regmap = devm_regmap_init_mmio(dev, base, &syscon_regmap_config); if (IS_ERR(syscon->regmap)) {