From 7606c377f56ab68421aa482b1ded6840d426e197 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Sat, 11 Feb 2017 10:57:23 -0800 Subject: device: Add a new "SPI" device type Add support for a new "SPI" device type in the devicetree to bind a device on the SPI bus. Allow device to provide chip select number for the device as a parameter. Add spi_bus_operations with operation dev_to_bus which allows SoCs to define a translation method for converting "struct device" into a unique SPI bus number. BUG=chrome-os-partner:59832 BRANCH=None TEST=Compiles successfully. Change-Id: I86f09516d3cddd619fef23a4659c9e4eadbcf3fa Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/18340 Reviewed-by: Duncan Laurie Tested-by: build bot (Jenkins) --- src/include/device/device.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include/device/device.h') diff --git a/src/include/device/device.h b/src/include/device/device.h index 47509f7df6..e21384ba0a 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -23,6 +23,7 @@ struct pci_bus_operations; struct i2c_bus_operations; struct smbus_bus_operations; struct pnp_mode_ops; +struct spi_bus_operations; /* Chip operations */ struct chip_operations { @@ -64,6 +65,7 @@ struct device_operations { #endif const struct pci_operations *ops_pci; const struct i2c_bus_operations *ops_i2c_bus; + const struct spi_bus_operations *ops_spi_bus; const struct smbus_bus_operations *ops_smbus_bus; const struct pci_bus_operations * (*ops_pci_bus)(device_t dev); const struct pnp_mode_ops *ops_pnp_mode; -- cgit v1.2.3