[PATCH v3 1/6] clk: qcom: Add support for GDSCs

Rajendra Nayak rnayak at codeaurora.org
Fri Mar 20 03:01:04 PDT 2015


[]...
>>> @@ -0,0 +1,46 @@
>>> +/*
>>> + * Copyright (c) 2015, The Linux Foundation. All rights reserved.
>>> + *
>>> + * This program is free software; you can redistribute it and/or modify
>>> + * it under the terms of the GNU General Public License version 2 and
>>> + * only version 2 as published by the Free Software Foundation.
>>> + *
>>> + * This program is distributed in the hope that it will be useful,
>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>> + * GNU General Public License for more details.
>>> + */
>>> +
>>> +#ifndef __QCOM_GDSC_H__
>>> +#define __QCOM_GDSC_H__
>>> +
>>> +#include <linux/pm_domain.h>
>>> +
>>> +struct regmap;

I realized, after Srini pointed out on irc that this fwd declaration
is a complete waste. I'll remove it when I do a repost.

>>> +
>>> +/**
>>> + * struct gdsc - Globally Distributed Switch Controller
>>> + * @pd: generic power domain
>>> + * @regmap: regmap for MMIO accesses
>>> + * @gdscr: gsdc control register
>>> + */
>>> +struct gdsc {
>>> +    struct generic_pm_domain    pd;
>>> +    struct regmap            *regmap;
>>> +    unsigned int            gdscr;
>>> +};
>>> +
>>> +#define domain_to_gdsc(domain) container_of(domain, struct gdsc, pd)
>>> +
>>> +#ifdef CONFIG_QCOM_GDSC
>>> +int gdsc_register(struct device *, struct gdsc **, size_t n, struct
>>> regmap *);
>>> +void gdsc_unregister(struct device *);
>>> +#else
>>> +int gdsc_register(struct device *d, struct gdsc **g, size_t n, struct
>>> regmap *r)



More information about the linux-arm-kernel mailing list