// SPDX-License-Identifier: GPL-2.0-or-later /* * linux/drivers/video/mmp/hw/mmp_spi.c * using the spi in LCD controler for commands send * * Copyright (C) 2012 Marvell Technology Group Ltd. * Authors: Guoqing Li <[email protected]> * Lisa Du <[email protected]> * Zhou Zhu <[email protected]> */ #include <linux/errno.h> #include <linux/delay.h> #include <linux/err.h> #include <linux/io.h> #include <linux/spi/spi.h> #include "mmp_ctrl.h" /** * spi_write - write command to the SPI port * @spi: the SPI device. * @data: can be 8/16/32-bit, MSB justified data to write. * * Wait bus transfer complete IRQ. * The caller is expected to perform the necessary locking. * * Returns: * %-ETIMEDOUT timeout occurred * 0 success */ static inline int lcd_spi_write(struct spi_device *spi, u32 data) { … } static int lcd_spi_setup(struct spi_device *spi) { … } static int lcd_spi_one_transfer(struct spi_device *spi, struct spi_message *m) { … } int lcd_spi_register(struct mmphw_ctrl *ctrl) { … }