From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Shore Subject: [PATCH 1/5] include/linux/spi/dw_spi.h: enable platform specific chipselect. Date: Thu, 21 Jan 2010 11:40:48 +0000 Message-ID: <1264074052-2214-1-git-send-email-george@georgeshore.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: George Shore To: spi-devel-list , Grant Likely , David Brownell Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org 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 --- include/linux/spi/dw_spi.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/linux/spi/dw_spi.h b/include/linux/spi/dw_spi.h index 1a127a3..cc813f9 100644 --- a/include/linux/spi/dw_spi.h +++ b/include/linux/spi/dw_spi.h @@ -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); } -- 1.6.6.264.gd0743 ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev