From 319fb0d21907f771d8ccdb6177fb2fcafabc6ab4 Mon Sep 17 00:00:00 2001 From: chao bi Date: Thu, 25 Oct 2012 09:02:32 +0800 Subject: serial: ifx6x60: different SPI word width configure requires different swap process SPI protocol driver only provide one function (swap_buf()) to swap SPI data into big endian format, which is only available when SPI controller's word width is 16 bits. But word width could be configured as 8/16/32 bits, different word width configure should be mapped to different swap methods.This patch is to make SPI protocol driver choose the right swap function corresponding to SPI word width configuration. cc: liu chuansheng cc: Chen Jun Signed-off-by: channing Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/ifx6x60.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/tty/serial/ifx6x60.h') diff --git a/drivers/tty/serial/ifx6x60.h b/drivers/tty/serial/ifx6x60.h index e8464baf9e7..d8869f5a463 100644 --- a/drivers/tty/serial/ifx6x60.h +++ b/drivers/tty/serial/ifx6x60.h @@ -124,6 +124,7 @@ struct ifx_spi_device { #define MR_INPROGRESS 1 #define MR_COMPLETE 2 wait_queue_head_t mdm_reset_wait; + void (*swap_buf)(unsigned char *buf, int len, void *end); }; #endif /* _IFX6X60_H */ -- cgit v1.2.3-70-g09d2