[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140108180030.GR31886@sirena.org.uk>
Date: Wed, 8 Jan 2014 18:00:30 +0000
From: Mark Brown <broonie@...nel.org>
To: Pawel Moll <pawel.moll@....com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Samuel Ortiz <sameo@...ux.intel.com>,
Arnd Bergmann <arnd@...db.de>, Jon Medhurst <tixy@...aro.org>,
"arm@...nel.org" <arm@...nel.org>, Olof Johansson <olof@...om.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [RFC 07/18] regmap: debugfs: Always create "registers" &
"access" files
On Wed, Jan 08, 2014 at 05:31:37PM +0000, Pawel Moll wrote:
> On Tue, 2013-12-24 at 12:19 +0000, Mark Brown wrote:
> > No, we need to find a better way of doing this such as checking to see
> > if register zero is accessible in some way. We want to avoid having
> > those files if there's no way of populating them since this is useful
> > information for tooling.
> Something like this then?
> 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)) {
Yes.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists