#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/export.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/ktime.h>
#include <linux/pm_domain.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/reset-controller.h>
#include <linux/slab.h>
#include "gdsc.h"
#define PWR_ON_MASK …
#define EN_REST_WAIT_MASK …
#define EN_FEW_WAIT_MASK …
#define CLK_DIS_WAIT_MASK …
#define SW_OVERRIDE_MASK …
#define HW_CONTROL_MASK …
#define SW_COLLAPSE_MASK …
#define GMEM_CLAMP_IO_MASK …
#define GMEM_RESET_MASK …
#define GDSC_POWER_UP_COMPLETE …
#define GDSC_POWER_DOWN_COMPLETE …
#define GDSC_RETAIN_FF_ENABLE …
#define CFG_GDSCR_OFFSET …
#define EN_REST_WAIT_VAL …
#define EN_FEW_WAIT_VAL …
#define CLK_DIS_WAIT_VAL …
#define EN_REST_WAIT_SHIFT …
#define EN_FEW_WAIT_SHIFT …
#define CLK_DIS_WAIT_SHIFT …
#define RETAIN_MEM …
#define RETAIN_PERIPH …
#define STATUS_POLL_TIMEOUT_US …
#define TIMEOUT_US …
#define domain_to_gdsc(domain) …
enum gdsc_status { … };
static int gdsc_check_status(struct gdsc *sc, enum gdsc_status status)
{ … }
static int gdsc_hwctrl(struct gdsc *sc, bool en)
{ … }
static int gdsc_poll_status(struct gdsc *sc, enum gdsc_status status)
{ … }
static int gdsc_update_collapse_bit(struct gdsc *sc, bool val)
{ … }
static int gdsc_toggle_logic(struct gdsc *sc, enum gdsc_status status,
bool wait)
{ … }
static inline int gdsc_deassert_reset(struct gdsc *sc)
{ … }
static inline int gdsc_assert_reset(struct gdsc *sc)
{ … }
static inline void gdsc_force_mem_on(struct gdsc *sc)
{ … }
static inline void gdsc_clear_mem_on(struct gdsc *sc)
{ … }
static inline void gdsc_deassert_clamp_io(struct gdsc *sc)
{ … }
static inline void gdsc_assert_clamp_io(struct gdsc *sc)
{ … }
static inline void gdsc_assert_reset_aon(struct gdsc *sc)
{ … }
static void gdsc_retain_ff_on(struct gdsc *sc)
{ … }
static int gdsc_enable(struct generic_pm_domain *domain)
{ … }
static int gdsc_disable(struct generic_pm_domain *domain)
{ … }
static int gdsc_set_hwmode(struct generic_pm_domain *domain, struct device *dev, bool mode)
{ … }
static bool gdsc_get_hwmode(struct generic_pm_domain *domain, struct device *dev)
{ … }
static int gdsc_init(struct gdsc *sc)
{ … }
int gdsc_register(struct gdsc_desc *desc,
struct reset_controller_dev *rcdev, struct regmap *regmap)
{ … }
void gdsc_unregister(struct gdsc_desc *desc)
{ … }
int gdsc_gx_do_nothing_enable(struct generic_pm_domain *domain)
{ … }
EXPORT_SYMBOL_GPL(…);