linux/drivers/misc/gehc-achc.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * datasheet: https://www.nxp.com/docs/en/data-sheet/K20P144M120SF3.pdf
 *
 * Copyright (C) 2018-2021 Collabora
 * Copyright (C) 2018-2021 GE Healthcare
 */

#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/gpio/consumer.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/spi/spi.h>

#define ACHC_MAX_FREQ_HZ
#define ACHC_FAST_READ_FREQ_HZ

struct achc_data {};

#define EZPORT_RESET_DELAY_MS
#define EZPORT_STARTUP_DELAY_MS
#define EZPORT_WRITE_WAIT_MS
#define EZPORT_TRANSFER_SIZE

#define EZPORT_CMD_SP
#define EZPORT_CMD_RDSR
#define EZPORT_CMD_WREN
#define EZPORT_CMD_FAST_READ
#define EZPORT_CMD_RESET
#define EZPORT_CMD_BE
#define EZPORT_CMD_SE

#define EZPORT_SECTOR_SIZE
#define EZPORT_SECTOR_MASK

#define EZPORT_STATUS_WIP
#define EZPORT_STATUS_WEN
#define EZPORT_STATUS_BEDIS
#define EZPORT_STATUS_FLEXRAM
#define EZPORT_STATUS_WEF
#define EZPORT_STATUS_FS

static void ezport_reset(struct gpio_desc *reset)
{}

static int ezport_start_programming(struct spi_device *spi, struct gpio_desc *reset)
{}

static void ezport_stop_programming(struct spi_device *spi, struct gpio_desc *reset)
{}

static int ezport_get_status_register(struct spi_device *spi)
{}

static int ezport_soft_reset(struct spi_device *spi)
{}

static int ezport_send_simple(struct spi_device *spi, u8 cmd)
{}

static int ezport_wait_write(struct spi_device *spi, u32 retries)
{}

static int ezport_write_enable(struct spi_device *spi)
{}

static int ezport_bulk_erase(struct spi_device *spi)
{}

static int ezport_section_erase(struct spi_device *spi, u32 address)
{}

static int ezport_flash_transfer(struct spi_device *spi, u32 address,
				 const u8 *payload, size_t payload_size)
{}

static int ezport_flash_compare(struct spi_device *spi, u32 address,
				const u8 *payload, size_t payload_size)
{}

static int ezport_firmware_compare_data(struct spi_device *spi,
					const u8 *data, size_t size)
{}

static int ezport_firmware_flash_data(struct spi_device *spi,
				      const u8 *data, size_t size)
{}

static int ezport_firmware_load(struct spi_device *spi, const char *fwname)
{}

/**
 * ezport_flash - flash device firmware
 * @spi: SPI device for NXP EzPort interface
 * @reset: the gpio connected to the device reset pin
 * @fwname: filename of the firmware that should be flashed
 *
 * Context: can sleep
 *
 * Return: 0 on success; negative errno on failure
 */
static int ezport_flash(struct spi_device *spi, struct gpio_desc *reset, const char *fwname)
{}

static ssize_t update_firmware_store(struct device *dev, struct device_attribute *attr,
				     const char *buf, size_t count)
{}
static DEVICE_ATTR_WO(update_firmware);

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

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

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

static void unregister_ezport(void *data)
{}

static int gehc_achc_probe(struct spi_device *spi)
{}

static const struct spi_device_id gehc_achc_id[] =;
MODULE_DEVICE_TABLE(spi, gehc_achc_id);

static const struct of_device_id gehc_achc_of_match[] =;
MODULE_DEVICE_TABLE(of, gehc_achc_of_match);

static struct spi_driver gehc_achc_spi_driver =;
module_spi_driver();

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