linux/drivers/pci/hotplug/pciehp_core.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * PCI Express Hot Plug Controller Driver
 *
 * Copyright (C) 1995,2001 Compaq Computer Corporation
 * Copyright (C) 2001 Greg Kroah-Hartman ([email protected])
 * Copyright (C) 2001 IBM Corp.
 * Copyright (C) 2003-2004 Intel Corporation
 *
 * All rights reserved.
 *
 * Send feedback to <[email protected]>, <[email protected]>
 *
 * Authors:
 *   Dan Zink <[email protected]>
 *   Greg Kroah-Hartman <[email protected]>
 *   Dely Sy <[email protected]>"
 */

#define pr_fmt(fmt)
#define dev_fmt

#include <linux/bitfield.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/pci.h>
#include "pciehp.h"

#include "../pci.h"

/* Global variables */
bool pciehp_poll_mode;
int pciehp_poll_time;

/*
 * not really modular, but the easiest way to keep compat with existing
 * bootargs behaviour is to continue using module_param here.
 */
module_param(pciehp_poll_mode, bool, 0644);
module_param(pciehp_poll_time, int, 0644);
MODULE_PARM_DESC();
MODULE_PARM_DESC();

static int set_attention_status(struct hotplug_slot *slot, u8 value);
static int get_power_status(struct hotplug_slot *slot, u8 *value);
static int get_latch_status(struct hotplug_slot *slot, u8 *value);
static int get_adapter_status(struct hotplug_slot *slot, u8 *value);

static int init_slot(struct controller *ctrl)
{}

static void cleanup_slot(struct controller *ctrl)
{}

/*
 * set_attention_status - Turns the Attention Indicator on, off or blinking
 */
static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 status)
{}

static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
{}

static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
{}

static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
{}

/**
 * pciehp_check_presence() - synthesize event if presence has changed
 * @ctrl: controller to check
 *
 * On probe and resume, an explicit presence check is necessary to bring up an
 * occupied slot or bring down an unoccupied slot.  This can't be triggered by
 * events in the Slot Status register, they may be stale and are therefore
 * cleared.  Secondly, sending an interrupt for "events that occur while
 * interrupt generation is disabled [when] interrupt generation is subsequently
 * enabled" is optional per PCIe r4.0, sec 6.7.3.4.
 */
static void pciehp_check_presence(struct controller *ctrl)
{}

static int pciehp_probe(struct pcie_device *dev)
{}

static void pciehp_remove(struct pcie_device *dev)
{}

#ifdef CONFIG_PM
static bool pme_is_native(struct pcie_device *dev)
{}

static void pciehp_disable_interrupt(struct pcie_device *dev)
{}

#ifdef CONFIG_PM_SLEEP
static int pciehp_suspend(struct pcie_device *dev)
{}

static bool pciehp_device_replaced(struct controller *ctrl)
{}

static int pciehp_resume_noirq(struct pcie_device *dev)
{}
#endif

static int pciehp_resume(struct pcie_device *dev)
{}

static int pciehp_runtime_suspend(struct pcie_device *dev)
{}

static int pciehp_runtime_resume(struct pcie_device *dev)
{}
#endif /* PM */

static struct pcie_port_service_driver hpdriver_portdrv =;

int __init pcie_hp_init(void)
{}