From patchwork Sun Mar 2 14:25:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3749521 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 40B939F1EE for ; Sun, 2 Mar 2014 14:26:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 727EA2037D for ; Sun, 2 Mar 2014 14:26:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9422E20374 for ; Sun, 2 Mar 2014 14:26:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753535AbaCBO0E (ORCPT ); Sun, 2 Mar 2014 09:26:04 -0500 Received: from mail-pd0-f174.google.com ([209.85.192.174]:50939 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751995AbaCBO0D (ORCPT ); Sun, 2 Mar 2014 09:26:03 -0500 Received: by mail-pd0-f174.google.com with SMTP id y13so2683586pdi.33 for ; Sun, 02 Mar 2014 06:26:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=3cLraWse02lAMN506NbOoAvkM1asUz/sW9SkaAlT3dk=; b=Ki4ToMSRCO6kiXhqb2uQ86hjxkhu5iglTtL2sbRd5Ze0mYqbzqscoP+uc1l9VKMxfN aWdo0JHshyAaCs5aVf4h1vE1WLN8m27y/lND7pNKshnbaHCvuLB6Od6AE0cX4o4aBqrt n9x9wsOF8afCd6evD7W0ZQVsvUkZO+TkxL+515xzfHSJfc9FDPraYvHnrZLpU3HtnwrC M/rNk8btMHuF3QtPedyMn4mgArb8ULtH3F3mVCS8k23M/Y3vXTDJKNCTEG+eTyO6GRHq VJM9DldVBgkVqC9xlq0pA/ZWvsxUP2KjV3GFrPnR0vXW+F6XFYs32CIUEZZc/tRFa8iU WPaQ== X-Gm-Message-State: ALoCoQl7BG5hF8OWC+tTfUPoOofFrUAN/AbkFywNpf9f0FZ13Hp6lBwS337OjFjJvu/fiPbg9WV0 X-Received: by 10.66.142.233 with SMTP id rz9mr14261548pab.71.1393770362804; Sun, 02 Mar 2014 06:26:02 -0800 (PST) Received: from [192.168.0.102] (218-164-136-100.dynamic.hinet.net. [218.164.136.100]) by mx.google.com with ESMTPSA id js7sm25941863pbc.35.2014.03.02.06.26.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Mar 2014 06:26:02 -0800 (PST) Message-ID: <1393770358.4044.1.camel@phoenix> Subject: [PATCH 2/2] spi: sun6i: Set bits_per_word_mask to only support 8 bits word length From: Axel Lin To: Mark Brown Cc: Maxime Ripard , linux-spi@vger.kernel.org Date: Sun, 02 Mar 2014 22:25:58 +0800 In-Reply-To: <1393770310.4044.0.camel@phoenix> References: <1393770310.4044.0.camel@phoenix> X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This controller only supports 8 bits word length. Set bits_per_word_mask so spi core will reject transfers that attempt to use an unsupported bits_per_word value. Signed-off-by: Axel Lin Acked-by: Maxime Ripard --- drivers/spi/spi-sun6i.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c index 4b9ec08..b3e3498 100644 --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c @@ -391,6 +391,7 @@ static int sun6i_spi_probe(struct platform_device *pdev) master->transfer_one = sun6i_spi_transfer_one; master->num_chipselect = 4; master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST; + master->bits_per_word_mask = SPI_BPW_MASK(8); master->dev.of_node = pdev->dev.of_node; master->auto_runtime_pm = true;