From patchwork Mon Jan 20 15:22:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3513301 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 5D19A9F2E9 for ; Mon, 20 Jan 2014 15:22:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59A072017A for ; Mon, 20 Jan 2014 15:22:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5364E20173 for ; Mon, 20 Jan 2014 15:22:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753956AbaATPWS (ORCPT ); Mon, 20 Jan 2014 10:22:18 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:45185 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751669AbaATPWN (ORCPT ); Mon, 20 Jan 2014 10:22:13 -0500 Received: by mail-pa0-f52.google.com with SMTP id bj1so5683325pad.11 for ; Mon, 20 Jan 2014 07:22:13 -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:content-type :mime-version:content-transfer-encoding; bh=RO6L5C0XbRZiB5Ho/hwZzXZ0Vmr9Yv43+MTRG+uwYs0=; b=WcTD/cfFeo3oZenVKpreGKC6vNt2XyZ5aRq3Gje0Yo3aO7crKukV1z6XMDqRv4miwm Ej6+jH8Tq5POlRbqH+UjXq8NVQSz/2P9SoDDtM4K3VgWHhIWE38HMUeYe1A5k6KKgmP1 OI3djXfNacJXw2InFig3voDqc2IdYn+6MviZZKW2YjsQxyEq1QrQkTu9Ue9n2cimj/T9 QwieVlHIlmCQsr/rDBGEbNDUTPV+WcBjSvrSWzJCmwHPdr/lSMmzetpp5FGEofcbjirt bkQ7llsDIGNo4X6pV/ddVyX+p9+oyn9ztNX2bmIlwnJeu6ZxArtG9T24FK7ov7UnWEa6 7qug== X-Gm-Message-State: ALoCoQmybMDUaiDSX4vxn9wQujwbVOy5yTF8CgHwm8ZWfTHg9zok9hp7f3tjp9frXY1SGGg2pPsi X-Received: by 10.68.133.6 with SMTP id oy6mr3635775pbb.153.1390231333437; Mon, 20 Jan 2014 07:22:13 -0800 (PST) Received: from [10.145.54.156] ([60.245.65.194]) by mx.google.com with ESMTPSA id de1sm4001832pbc.7.2014.01.20.07.22.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Jan 2014 07:22:12 -0800 (PST) Message-ID: <1390231327.11756.3.camel@phoenix> Subject: [PATCH] spi: nuc900: Set SPI_LSB_FIRST for master->mode_bits if hw->pdata->lsb is true From: Axel Lin To: Mark Brown Cc: Wan ZongShun , linux-spi@vger.kernel.org Date: Mon, 20 Jan 2014 23:22:07 +0800 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=-7.5 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 Otherwise, spi_setup() fails with unsupported mode bits message. Signed-off-by: Axel Lin --- drivers/spi/spi-nuc900.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c index 5040630..bae97ff 100644 --- a/drivers/spi/spi-nuc900.c +++ b/drivers/spi/spi-nuc900.c @@ -361,6 +361,8 @@ static int nuc900_spi_probe(struct platform_device *pdev) init_completion(&hw->done); master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; + if (hw->pdata->lsb) + master->mode_bits |= SPI_LSB_FIRST; master->num_chipselect = hw->pdata->num_cs; master->bus_num = hw->pdata->bus_num; hw->bitbang.master = hw->master;