/* * Copyright (C) 2010-2011 Canonical Ltd <jeremy.kerr@canonical.com> * Copyright (C) 2011-2012 Linaro Ltd <mturquette@linaro.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * Standard functionality for the common clock API. See Documentation/clk.txt */#include<linux/clk-private.h>#include<linux/module.h>#include<linux/mutex.h>#include<linux/spinlock.h>#include<linux/err.h>#include<linux/list.h>#include<linux/slab.h>staticDEFINE_SPINLOCK(enable_lock);staticDEFINE_MUTEX(prepare_lock);staticHLIST_HEAD(clk_root_list);staticHLIST_HEAD(clk_orphan_list);staticLIST_HEAD(clk_notifier_list);/*** debugfs support ***/#ifdef CONFIG_COMMON_CLK_DEBUG#include<linux/debugfs.h>staticstructdentry*rootdir;staticstructdentry*orphandir;staticintinited=0;/* caller must hold prepare_lock */staticintclk_debug_create_one(structclk*clk,structdentry*pdentry){structdentry*d;intret=-ENOMEM;