From patchwork Thu Jan 30 13:26:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 23924 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 967E0202B2 for ; Thu, 30 Jan 2014 13:27:01 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id gq1sf10898969obb.8 for ; Thu, 30 Jan 2014 05:27:00 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=W80Jd5/TfFUaKWL3qVsMmNDCTKfzHBnSApAPzGARE/4=; b=BLxr4aQLQqudRDb0fpFpiQC7VBsq+C9ZYuv1g7IllPLQCm5YqnnpyZ0VBMiRKvlygm 6Dx8GhRA58/pINQ2S37Ewpb1pirZgikJAO1rD3rLyj1rV1uxnCKUHGxdOc0NXOEvbK+C fY2GitM7TUMsc6MH2AZsMiDQa2a+ze2YPGxUnkWDXWa99M1uF+i53+hlJA6Vd1oz34Of TUsCgYvQUXsfgnFiuBiK63YKr/P7Cbx280WwQ6jfecQHVF8tvO8gPGtBNxOH+cU/6oRX 2QPmm/iKcFyYNGNMpHa4b5ZHVeh0ZkHTh9wVATvuT6NxNmzQk4BQE43YavfD/KHAQTWN Muyg== X-Gm-Message-State: ALoCoQlBT15NCdhK7OBE6KSqJbuQeK1BTv6h8pn/XsMe/fp5qWptSPc8OP7IMVRtwE0fZBykYLGQ X-Received: by 10.42.235.132 with SMTP id kg4mr4898629icb.32.1391088420730; Thu, 30 Jan 2014 05:27:00 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.134 with SMTP id v6ls448604qgv.36.gmail; Thu, 30 Jan 2014 05:27:00 -0800 (PST) X-Received: by 10.58.191.38 with SMTP id gv6mr113364vec.33.1391088420595; Thu, 30 Jan 2014 05:27:00 -0800 (PST) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id a15si2071232vew.7.2014.01.30.05.27.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 05:27:00 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id w20so2062401vbb.27 for ; Thu, 30 Jan 2014 05:27:00 -0800 (PST) X-Received: by 10.58.58.3 with SMTP id m3mr121800veq.32.1391088420504; Thu, 30 Jan 2014 05:27:00 -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 u4csp12252vcz; Thu, 30 Jan 2014 05:27:00 -0800 (PST) X-Received: by 10.68.162.131 with SMTP id ya3mr14286930pbb.102.1391088419634; Thu, 30 Jan 2014 05:26:59 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tq3si6459971pab.270.2014.01.30.05.26.59; Thu, 30 Jan 2014 05:26:59 -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 S1753272AbaA3N0k (ORCPT + 27 others); Thu, 30 Jan 2014 08:26:40 -0500 Received: from fw-tnat.austin.arm.com ([217.140.110.23]:31663 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753255AbaA3N0i (ORCPT ); Thu, 30 Jan 2014 08:26:38 -0500 Received: from hornet.Cambridge.Arm.com (hornet.cambridge.arm.com [10.2.201.45]) by collaborate-mta1.arm.com (Postfix) with ESMTP id C78A613F827; Thu, 30 Jan 2014 07:26:37 -0600 (CST) From: Pawel Moll To: Mark Brown , linux-kernel@vger.kernel.org Cc: Pawel Moll Subject: [PATCH] regmap: debugfs: "registers" & "access" for single register maps Date: Thu, 30 Jan 2014 13:26:32 +0000 Message-Id: <1391088392-6504-1-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.8.3.2 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.212.54 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: , When a map covers a single register, max_register is equal to 0, so the "registers" & "access" files were not created. Now they will be, as register 0 must be readable for such map to make sense. Signed-off-by: Pawel Moll --- drivers/base/regmap/regmap-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index c5471cd..45d812c 100644 --- a/drivers/base/regmap/regmap-debugfs.c +++ b/drivers/base/regmap/regmap-debugfs.c @@ -511,7 +511,7 @@ void regmap_debugfs_init(struct regmap *map, const char *name) debugfs_create_file("range", 0400, map->debugfs, map, ®map_reg_ranges_fops); - if (map->max_register) { + if (map->max_register || regmap_readable(map, 0)) { debugfs_create_file("registers", 0400, map->debugfs, map, ®map_map_fops); debugfs_create_file("access", 0400, map->debugfs,