linux/drivers/gpio/gpio-crystalcove.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Intel Crystal Cove GPIO Driver
 *
 * Copyright (C) 2012, 2014 Intel Corporation. All rights reserved.
 *
 * Author: Yang, Bin <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/mfd/intel_soc_pmic.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/seq_file.h>
#include <linux/types.h>

#define CRYSTALCOVE_GPIO_NUM
#define CRYSTALCOVE_VGPIO_NUM

#define UPDATE_IRQ_TYPE
#define UPDATE_IRQ_MASK

#define GPIO0IRQ
#define GPIO1IRQ
#define MGPIO0IRQS0
#define MGPIO1IRQS0
#define MGPIO0IRQSX
#define MGPIO1IRQSX
#define GPIO0P0CTLO
#define GPIO0P0CTLI
#define GPIO1P0CTLO
#define GPIO1P0CTLI
#define GPIOPANELCTL

#define CTLI_INTCNT_DIS
#define CTLI_INTCNT_NE
#define CTLI_INTCNT_PE
#define CTLI_INTCNT_BE

#define CTLO_DIR_IN
#define CTLO_DIR_OUT

#define CTLO_DRV_CMOS
#define CTLO_DRV_OD

#define CTLO_DRV_REN

#define CTLO_RVAL_2KDW
#define CTLO_RVAL_2KUP
#define CTLO_RVAL_50KDW
#define CTLO_RVAL_50KUP

#define CTLO_INPUT_SET
#define CTLO_OUTPUT_SET

enum ctrl_register {};

/**
 * struct crystalcove_gpio - Crystal Cove GPIO controller
 * @buslock: for bus lock/sync and unlock.
 * @chip: the abstract gpio_chip structure.
 * @regmap: the regmap from the parent device.
 * @update: pending IRQ setting update, to be written to the chip upon unlock.
 * @intcnt_value: the Interrupt Detect value to be written.
 * @set_irq_mask: true if the IRQ mask needs to be set, false to clear.
 */
struct crystalcove_gpio {};

static inline int to_reg(int gpio, enum ctrl_register reg_type)
{}

static void crystalcove_update_irq_mask(struct crystalcove_gpio *cg, int gpio)
{}

static void crystalcove_update_irq_ctrl(struct crystalcove_gpio *cg, int gpio)
{}

static int crystalcove_gpio_dir_in(struct gpio_chip *chip, unsigned int gpio)
{}

static int crystalcove_gpio_dir_out(struct gpio_chip *chip, unsigned int gpio, int value)
{}

static int crystalcove_gpio_get(struct gpio_chip *chip, unsigned int gpio)
{}

static void crystalcove_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value)
{}

static int crystalcove_irq_type(struct irq_data *data, unsigned int type)
{}

static void crystalcove_bus_lock(struct irq_data *data)
{}

static void crystalcove_bus_sync_unlock(struct irq_data *data)
{}

static void crystalcove_irq_unmask(struct irq_data *data)
{}

static void crystalcove_irq_mask(struct irq_data *data)
{}

static const struct irq_chip crystalcove_irqchip =;

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

static void crystalcove_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
{}

static int crystalcove_gpio_probe(struct platform_device *pdev)
{}

static struct platform_driver crystalcove_gpio_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();