mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-20 01:24:39 +08:00
393fc2f594
pci1xxxx is a PCIe switch with a multi-function endpoint on one of its downstream ports. PIO function is one of the functions in the multi-function endpoint. PIO function combines a GPIO controller and also an interface to program pci1xxxx's OTP & EEPROM. This auxiliary bus driver is loaded for the PIO function and separate child devices are enumerated for GPIO controller and OTP/EEPROM interface. Signed-off-by: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com> Link: https://lore.kernel.org/r/20220824200047.150308-2-kumaravel.thiagarajan@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29 lines
640 B
C
29 lines
640 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (C) 2022 Microchip Technology Inc. */
|
|
|
|
#ifndef _GPIO_PCI1XXXX_H
|
|
#define _GPIO_PCI1XXXX_H
|
|
|
|
#include <linux/spinlock.h>
|
|
#include <linux/mutex.h>
|
|
#include <linux/kthread.h>
|
|
#include <linux/types.h>
|
|
#include <linux/auxiliary_bus.h>
|
|
|
|
/* Perform operations like variable length write, read and write with read back for OTP / EEPROM
|
|
* Perform bit mode write in OTP
|
|
*/
|
|
|
|
struct gp_aux_data_type {
|
|
int irq_num;
|
|
resource_size_t region_start;
|
|
resource_size_t region_length;
|
|
};
|
|
|
|
struct auxiliary_device_wrapper {
|
|
struct auxiliary_device aux_dev;
|
|
struct gp_aux_data_type gp_aux_data;
|
|
};
|
|
|
|
#endif
|