1 // SPDX-License-Identifier: GPL-2.0-only
3 * CPLD driver for the MikroTik RouterBoard 4xx series
5 * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
6 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
7 * Copyright (C) 2015 Bert Vermeulen <bert@biot.com>
8 * Copyright (C) 2020 Christopher Hill <ch6574@gmail.com>
10 * This file was based on the driver for Linux 2.6.22 published by
11 * MikroTik for their RouterBoard 4xx series devices.
13 #include <linux/spi/spi.h>
16 struct spi_device *spi;
18 int (*write_nand)(struct rb4xx_cpld *self, const void *tx_buf,
20 int (*read_nand)(struct rb4xx_cpld *self, void *rx_buf,
23 int (*gpio_set_0_7)(struct rb4xx_cpld *self, u8 values);
24 int (*gpio_set_8)(struct rb4xx_cpld *self, u8 value);