[PATCH 1/2] clk: bcm2835: expose raw clock-registers via debugfs

Martin Sperl kernel at martin.sperl.org
Tue Mar 1 05:31:04 PST 2016

On 29.02.2016 21:39, Eric Anholt wrote:
> kernel at martin.sperl.org writes:
>> From: Martin Sperl <kernel at martin.sperl.org>
>> For debugging purposes under some circumstance
>> it helps to be able to see the actual clock registers.
>> E.g: when looking at the clock divider it is helpful to
>> see what the actual clock divider is.
>> This patch exposes all the clock registers specific to each
>> clock/pll/pll-divider via debugfs.
>> Signed-off-by: Martin Sperl <kernel at martin.sperl.org>
> This one definitely seems useful to me.  I think the debugfs bits need
> to be under #ifdef CONFIG_DEBUG_FS though.
> With that fixed,
> Acked-by: Eric Anholt <eric at anholt.net>
Note that include/linux/debugfs.h contains such ifdef and generates
dummy code like this:
static inline struct dentry *debugfs_create_regset32(const char *name,
                                    umode_t mode, struct dentry *parent,
                                    struct debugfs_regset32 *regset)
         return ERR_PTR(-ENODEV);
(see also Documentation/filesystem/debugfs.txt )

On the other hand the clock framework calls debug_init only
if debugfs is enabled.

So all the code is essentially "dead" when debugfs is disabled.

I assume I will not ifdef this just in case.

Thanks, Martin

More information about the linux-rpi-kernel mailing list