linux/drivers/misc/keba/cp500.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) KEBA Industrial Automation Gmbh 2024
 *
 * Driver for KEBA system FPGA
 *
 * The KEBA system FPGA implements various devices. This driver registers
 * auxiliary devices for every device within the FPGA.
 */

#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/misc/keba.h>
#include <linux/module.h>
#include <linux/pci.h>

#define CP500

#define PCI_VENDOR_ID_KEBA
#define PCI_DEVICE_ID_KEBA_CP035
#define PCI_DEVICE_ID_KEBA_CP505
#define PCI_DEVICE_ID_KEBA_CP520

#define CP500_SYS_BAR
#define CP500_ECM_BAR

/* BAR 0 registers */
#define CP500_VERSION_REG
#define CP500_RECONFIG_REG
#define CP500_AXI_REG

/* Bits in BUILD_REG */
#define CP500_BUILD_TEST

/* Bits in RECONFIG_REG */
#define CP500_RECFG_REQ

/* MSIX */
#define CP500_AXI_MSIX
#define CP500_NUM_MSIX
#define CP500_NUM_MSIX_NO_MMI
#define CP500_NUM_MSIX_NO_AXI

/* EEPROM */
#define CP500_HW_CPU_EEPROM_NAME

#define CP500_IS_CP035(dev)
#define CP500_IS_CP505(dev)
#define CP500_IS_CP520(dev)

struct cp500_dev_info {};

struct cp500_devs {};

/* list of devices within FPGA of CP035 family (CP035, CP056, CP057) */
static struct cp500_devs cp035_devices =;

/* list of devices within FPGA of CP505 family (CP503, CP505, CP507) */
static struct cp500_devs cp505_devices =;

/* list of devices within FPGA of CP520 family (CP520, CP530) */
static struct cp500_devs cp520_devices =;

struct cp500 {};

/* I2C devices */
static struct i2c_board_info cp500_i2c_info[] =;

static ssize_t cp500_get_fpga_version(struct cp500 *cp500, char *buf,
				      size_t max_len)
{}

static ssize_t version_show(struct device *dev, struct device_attribute *attr,
			    char *buf)
{}
static DEVICE_ATTR_RO(version);

static ssize_t keep_cfg_show(struct device *dev, struct device_attribute *attr,
			     char *buf)
{}

static ssize_t keep_cfg_store(struct device *dev, struct device_attribute *attr,
			      const char *buf, size_t count)
{}
static DEVICE_ATTR_RW(keep_cfg);

static struct attribute *cp500_attrs[] =;
ATTRIBUTE_GROUPS();

static void cp500_i2c_release(struct device *dev)
{}

static int cp500_register_i2c(struct cp500 *cp500)
{}

static void cp500_register_auxiliary_devs(struct cp500 *cp500)
{}

static void cp500_unregister_dev(struct auxiliary_device *auxdev)
{}

static void cp500_unregister_auxiliary_devs(struct cp500 *cp500)
{}

static irqreturn_t cp500_axi_handler(int irq, void *dev)
{}

static int cp500_enable(struct cp500 *cp500)
{}

static void cp500_disable(struct cp500 *cp500)
{}

static int cp500_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
{}

static void cp500_remove(struct pci_dev *pci_dev)
{}

static struct pci_device_id cp500_ids[] =;
MODULE_DEVICE_TABLE(pci, cp500_ids);

static struct pci_driver cp500_driver =;
module_pci_driver();

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