linux/drivers/pinctrl/samsung/pinctrl-exynos.c

// SPDX-License-Identifier: GPL-2.0+
//
// Exynos specific support for Samsung pinctrl/gpiolib driver with eint support.
//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//		http://www.samsung.com
// Copyright (c) 2012 Linaro Ltd
//		http://www.linaro.org
//
// Author: Thomas Abraham <[email protected]>
//
// This file contains the Samsung Exynos specific information required by the
// the Samsung pinctrl/gpiolib driver. It also includes the implementation of
// external gpio and wakeup interrupt support.

#include <linux/clk.h>
#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/irqdomain.h>
#include <linux/irq.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/regmap.h>
#include <linux/err.h>
#include <linux/soc/samsung/exynos-pmu.h>
#include <linux/soc/samsung/exynos-regs-pmu.h>

#include "pinctrl-samsung.h"
#include "pinctrl-exynos.h"

struct exynos_irq_chip {};

static inline struct exynos_irq_chip *to_exynos_irq_chip(struct irq_chip *chip)
{}

static void exynos_irq_mask(struct irq_data *irqd)
{}

static void exynos_irq_ack(struct irq_data *irqd)
{}

static void exynos_irq_unmask(struct irq_data *irqd)
{}

static int exynos_irq_set_type(struct irq_data *irqd, unsigned int type)
{}

static int exynos_irq_set_affinity(struct irq_data *irqd,
				   const struct cpumask *dest, bool force)
{}

static int exynos_irq_request_resources(struct irq_data *irqd)
{}

static void exynos_irq_release_resources(struct irq_data *irqd)
{}

/*
 * irq_chip for gpio interrupts.
 */
static const struct exynos_irq_chip exynos_gpio_irq_chip __initconst =;

static int exynos_eint_irq_map(struct irq_domain *h, unsigned int virq,
					irq_hw_number_t hw)
{}

/*
 * irq domain callbacks for external gpio and wakeup interrupt controllers.
 */
static const struct irq_domain_ops exynos_eint_irqd_ops =;

static irqreturn_t exynos_eint_gpio_irq(int irq, void *data)
{}

struct exynos_eint_gpio_save {};

/*
 * exynos_eint_gpio_init() - setup handling of external gpio interrupts.
 * @d: driver data of samsung pinctrl driver.
 */
__init int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d)
{}

static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
{}

static void
exynos_pinctrl_set_eint_wakeup_mask(struct samsung_pinctrl_drv_data *drvdata,
				    struct exynos_irq_chip *irq_chip)
{}

static void
s5pv210_pinctrl_set_eint_wakeup_mask(struct samsung_pinctrl_drv_data *drvdata,
				    struct exynos_irq_chip *irq_chip)

{}

static u32 eint_wake_mask_value =;
/*
 * irq_chip for wakeup interrupts
 */
static const struct exynos_irq_chip s5pv210_wkup_irq_chip __initconst =;

static const struct exynos_irq_chip exynos4210_wkup_irq_chip __initconst =;

static const struct exynos_irq_chip exynos7_wkup_irq_chip __initconst =;

static const struct exynos_irq_chip exynosautov920_wkup_irq_chip __initconst =;

/* list of external wakeup controllers supported */
static const struct of_device_id exynos_wkup_irq_ids[] =;

/* interrupt handler for wakeup interrupts 0..15 */
static void exynos_irq_eint0_15(struct irq_desc *desc)
{}

static inline void exynos_irq_demux_eint(unsigned int pend,
						struct irq_domain *domain)
{}

/* interrupt handler for wakeup interrupt 16 */
static void exynos_irq_demux_eint16_31(struct irq_desc *desc)
{}

/*
 * exynos_eint_wkup_init() - setup handling of external wakeup interrupts.
 * @d: driver data of samsung pinctrl driver.
 */
__init int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
{}

static void exynos_pinctrl_suspend_bank(
				struct samsung_pinctrl_drv_data *drvdata,
				struct samsung_pin_bank *bank)
{}

static void exynosauto_pinctrl_suspend_bank(struct samsung_pinctrl_drv_data *drvdata,
					    struct samsung_pin_bank *bank)
{}

void exynos_pinctrl_suspend(struct samsung_pinctrl_drv_data *drvdata)
{}

static void exynos_pinctrl_resume_bank(
				struct samsung_pinctrl_drv_data *drvdata,
				struct samsung_pin_bank *bank)
{}

static void exynosauto_pinctrl_resume_bank(struct samsung_pinctrl_drv_data *drvdata,
					   struct samsung_pin_bank *bank)
{}

void exynos_pinctrl_resume(struct samsung_pinctrl_drv_data *drvdata)
{}

static void exynos_retention_enable(struct samsung_pinctrl_drv_data *drvdata)
{}

static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata)
{}

struct samsung_retention_ctrl *
exynos_retention_init(struct samsung_pinctrl_drv_data *drvdata,
		      const struct samsung_retention_data *data)
{}