spi.h (0866e8bcfbc68af93a66e5d26c3b36373e23b4f7) spi.h (3c086734381945f6d779a98582d8eae3edca0b68)
1/*-
2 * Copyright (c) 2006 M. Warner Losh <imp@FreeBSD.org>
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 20 unchanged lines hidden (view full) ---

29 void *tx_cmd;
30 uint32_t tx_cmd_sz;
31 void *rx_cmd;
32 uint32_t rx_cmd_sz;
33 void *tx_data;
34 uint32_t tx_data_sz;
35 void *rx_data;
36 uint32_t rx_data_sz;
1/*-
2 * Copyright (c) 2006 M. Warner Losh <imp@FreeBSD.org>
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 20 unchanged lines hidden (view full) ---

29 void *tx_cmd;
30 uint32_t tx_cmd_sz;
31 void *rx_cmd;
32 uint32_t rx_cmd_sz;
33 void *tx_data;
34 uint32_t tx_data_sz;
35 void *rx_data;
36 uint32_t rx_data_sz;
37 uint32_t flags;
37};
38#define SPI_COMMAND_INITIALIZER { 0 }
39
38};
39#define SPI_COMMAND_INITIALIZER { 0 }
40
41#define SPI_FLAG_KEEP_CS 0x1 /* Keep chip select asserted */
42#define SPI_FLAG_NO_SLEEP 0x2 /* Prevent driver from sleeping (use polling) */
43
40#define SPI_CHIP_SELECT_HIGH 0x1 /* Chip select high (else low) */
41
42#ifdef FDT
43#define SPIBUS_FDT_PNP_INFO(t) FDTCOMPAT_PNP_INFO(t, spibus)
44#else
45#define SPIBUS_FDT_PNP_INFO(t)
46#endif
44#define SPI_CHIP_SELECT_HIGH 0x1 /* Chip select high (else low) */
45
46#ifdef FDT
47#define SPIBUS_FDT_PNP_INFO(t) FDTCOMPAT_PNP_INFO(t, spibus)
48#else
49#define SPIBUS_FDT_PNP_INFO(t)
50#endif