This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

About SPI slave mode support.

Part Number: AM3352

There is this description in this page software-dl.ti.com/.../SPI.html .


There is this souce code in $kernel/drivers/spi/spi-omap2-mcspi.c .

static int omap2_mcspi_probe(struct platform_device *pdev)
{
	struct spi_master	*master;
	const struct omap2_mcspi_platform_config *pdata;
	struct omap2_mcspi	*mcspi;
	struct resource		*r;
	int			status = 0, i;
	u32			regs_offset = 0;
	struct device_node	*node = pdev->dev.of_node;
	const struct of_device_id *match;

	if (of_property_read_bool(node, "spi-slave"))
		master = spi_alloc_slave(&pdev->dev, sizeof(*mcspi));
	else
		master = spi_alloc_master(&pdev->dev, sizeof(*mcspi));
	if (!master)
		return -ENOMEM;

There is this document in $kernel/Documentation/devicetree/bindings/spi/spi-controller.yaml .

  spi-slave:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      The SPI controller acts as a slave, instead of a master.

I'd like to know whether SPI slave mode is suppoted by spi-omap2-mcspi.c, or not. Could you teach me that ?