mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
Add the chip select glue.
This commit is contained in:
parent
edd4c16f78
commit
cc90639873
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238965
@ -1,6 +1,7 @@
|
||||
/* $FreeBSD$ */
|
||||
|
||||
struct spi_command {
|
||||
int cs;
|
||||
void *tx_cmd;
|
||||
uint32_t tx_cmd_sz;
|
||||
void *rx_cmd;
|
||||
@ -10,3 +11,5 @@ struct spi_command {
|
||||
void *rx_data;
|
||||
uint32_t rx_data_sz;
|
||||
};
|
||||
|
||||
#define SPI_CHIP_SELECT_HIGH 0x1 /* Chip select high (else low) */
|
||||
|
@ -158,6 +158,9 @@ spibus_hinted_child(device_t bus, const char *dname, int dunit)
|
||||
static int
|
||||
spibus_transfer_impl(device_t dev, device_t child, struct spi_command *cmd)
|
||||
{
|
||||
/* Maybe set flags too? spi mode? */
|
||||
spibus_get_cs(dev, &cmd->cs);
|
||||
|
||||
return (SPIBUS_TRANSFER(device_get_parent(dev), child, cmd));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user