Skip to content

Commit

Permalink
spi/dw_spi: enable platform specific chipselect.
Browse files Browse the repository at this point in the history
The driver core allows for a platform-specific chipselect assert/deassert
function, however the chipselect function in the core doesn't take advantage
of this fact.

This enables the use of a custom function, should it be defined.

Signed-off-by: George Shore <george@georgeshore.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
George Shore authored and Grant Likely committed Jan 21, 2010
1 parent c587b6f commit 83fe518
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/spi/dw_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ static inline void spi_chip_sel(struct dw_spi *dws, u16 cs)
{
if (cs > dws->num_cs)
return;

if (dws->cs_control)
dws->cs_control(1);

dw_writel(dws, ser, 1 << cs);
}

Expand Down

0 comments on commit 83fe518

Please sign in to comment.