Skip to content

Commit

Permalink
Merge branch 'spi-mcspi' into spi-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Nov 14, 2012
2 parents 8266bdd + 2cd4517 commit 170c2d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Documentation/devicetree/bindings/spi/omap-spi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Required properties:
- "ti,omap4-spi" for OMAP4+.
- ti,spi-num-cs : Number of chipselect supported by the instance.
- ti,hwmods: Name of the hwmod associated to the McSPI
- ti,pindir-d0-in-d1-out: Select the D0 pin as input and D1 as
output. The default is D0 as output and
D1 as input.
- ti,pindir-d0-out-d1-in: Select the D0 pin as output and D1 as
input. The default is D0 as input and
D1 as output.

Example:

Expand Down
6 changes: 3 additions & 3 deletions drivers/spi/spi-omap2-mcspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi,
/* standard 4-wire master mode: SCK, MOSI/out, MISO/in, nCS
* REVISIT: this controller could support SPI_3WIRE mode.
*/
if (mcspi->pin_dir == MCSPI_PINDIR_D0_OUT_D1_IN) {
if (mcspi->pin_dir == MCSPI_PINDIR_D0_IN_D1_OUT) {
l &= ~OMAP2_MCSPI_CHCONF_IS;
l &= ~OMAP2_MCSPI_CHCONF_DPE1;
l |= OMAP2_MCSPI_CHCONF_DPE0;
Expand Down Expand Up @@ -1187,8 +1187,8 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev)
of_property_read_u32(node, "ti,spi-num-cs", &num_cs);
master->num_chipselect = num_cs;
master->bus_num = bus_num++;
if (of_get_property(node, "ti,pindir-d0-in-d1-out", NULL))
mcspi->pin_dir = MCSPI_PINDIR_D0_IN_D1_OUT;
if (of_get_property(node, "ti,pindir-d0-out-d1-in", NULL))
mcspi->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN;
} else {
pdata = pdev->dev.platform_data;
master->num_chipselect = pdata->num_cs;
Expand Down
4 changes: 2 additions & 2 deletions include/linux/platform_data/spi-omap2-mcspi.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#define OMAP4_MCSPI_REG_OFFSET 0x100

#define MCSPI_PINDIR_D0_OUT_D1_IN 0
#define MCSPI_PINDIR_D0_IN_D1_OUT 1
#define MCSPI_PINDIR_D0_IN_D1_OUT 0
#define MCSPI_PINDIR_D0_OUT_D1_IN 1

struct omap2_mcspi_platform_config {
unsigned short num_cs;
Expand Down

0 comments on commit 170c2d0

Please sign in to comment.