2 * Maxim (Dallas) MAX3107/8 serial driver
8 * Based on max3107.c, by Aavamobile
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
20 * Example board initialization data:
22 * static struct max310x_pdata max3107_pdata = {
23 * .driver_flags = MAX310X_EXT_CLK,
24 * .uart_flags[0] = MAX310X_ECHO_SUPRESS | MAX310X_AUTO_DIR_CTRL,
25 * .frequency = 3686400,
29 * static struct spi_board_info spi_device_max3107[] = {
31 * .modalias = "max3107",
35 * .platform_data = &max3107_pdata,
40 #define MAX310X_MAX_UARTS 1
42 /* MAX310X platform data structure */
43 struct max310x_pdata {
44 /* Flags global to driver */
45 const u8 driver_flags:2;
46 #define MAX310X_EXT_CLK (0x00000001) /* External clock enable */
47 #define MAX310X_AUTOSLEEP (0x00000002) /* Enable AutoSleep mode */
48 /* Flags global to UART port */
49 const u8 uart_flags[MAX310X_MAX_UARTS];
50 #define MAX310X_LOOPBACK (0x00000001) /* Loopback mode enable */
51 #define MAX310X_ECHO_SUPRESS (0x00000002) /* Enable echo supress */
52 #define MAX310X_AUTO_DIR_CTRL (0x00000004) /* Enable Auto direction
55 /* Frequency (extrenal clock or crystal) */
57 /* GPIO base number (can be negative) */
59 /* Called during startup */
61 /* Called before finish */
63 /* Suspend callback */
64 void (*suspend)(int do_suspend);