linux/drivers/gpio/gpio-tangier.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Intel Tangier GPIO functions
 *
 * Copyright (c) 2016, 2021, 2023 Intel Corporation.
 *
 * Authors: Andy Shevchenko <[email protected]>
 *          Pandith N <[email protected]>
 *          Raag Jadav <[email protected]>
 */

#ifndef _GPIO_TANGIER_H_
#define _GPIO_TANGIER_H_

#include <linux/gpio/driver.h>
#include <linux/pm.h>
#include <linux/spinlock_types.h>
#include <linux/types.h>

struct device;

struct tng_gpio_context;

/* Elkhart Lake specific wake registers */
#define GWMR_EHL
#define GWSR_EHL
#define GSIR_EHL

/* Merrifield specific wake registers */
#define GWMR_MRFLD
#define GWSR_MRFLD
#define GSIR_MRFLD

/**
 * struct tng_wake_regs - Platform specific wake registers
 * @gwmr: Wake mask
 * @gwsr: Wake source
 * @gsir: Secure input
 */
struct tng_wake_regs {};

/**
 * struct tng_gpio_pinrange - Map pin numbers to gpio numbers
 * @gpio_base: Starting GPIO number of this range
 * @pin_base: Starting pin number of this range
 * @npins: Number of pins in this range
 */
struct tng_gpio_pinrange {};

#define GPIO_PINRANGE(gstart, gend, pstart)

/**
 * struct tng_gpio_pin_info - Platform specific pinout information
 * @pin_ranges: Pin to GPIO mapping
 * @nranges: Number of pin ranges
 * @name: Respective pinctrl device name
 */
struct tng_gpio_pin_info {};

/**
 * struct tng_gpio_info - Platform specific GPIO and IRQ information
 * @base: GPIO base to start numbering with
 * @ngpio: Amount of GPIOs supported by the controller
 * @first: First IRQ to start numbering with
 */
struct tng_gpio_info {};

/**
 * struct tng_gpio - Platform specific private data
 * @chip: Instance of the struct gpio_chip
 * @reg_base: Base address of MMIO registers
 * @irq: Interrupt for the GPIO device
 * @lock: Synchronization lock to prevent I/O race conditions
 * @dev: The GPIO device
 * @ctx: Context to be saved during suspend-resume
 * @wake_regs: Platform specific wake registers
 * @pin_info: Platform specific pinout information
 * @info: Platform specific GPIO and IRQ information
 */
struct tng_gpio {};

int devm_tng_gpio_probe(struct device *dev, struct tng_gpio *gpio);

extern const struct dev_pm_ops tng_gpio_pm_ops;

#endif /* _GPIO_TANGIER_H_ */