From patchwork Sun Mar 2 07:44:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 3748751 Return-Path: X-Original-To: patchwork-linux-arm@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 B4C4F9F35F for ; Sun, 2 Mar 2014 07:45:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BBEDC20364 for ; Sun, 2 Mar 2014 07:45:48 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8446120357 for ; Sun, 2 Mar 2014 07:45:47 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WK15L-0004a2-9L; Sun, 02 Mar 2014 07:45:19 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WK15I-0003oI-NP; Sun, 02 Mar 2014 07:45:16 +0000 Received: from smtp37.i.mail.ru ([94.100.177.97]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WK15E-0003n2-6j for linux-arm-kernel@lists.infradead.org; Sun, 02 Mar 2014 07:45:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=T52G6DsZAVYh1FsK6LhLE/ZvgoeIk1EIDnbejSC6s+s=; b=mZkrpIB0E0BAS1/kvMvjcennFPEKuNgJmR3Aelr7orl4Fo+8hHA9vT9WRx/7tlrMioMaIOLlqTnw3dDy223LkFGYhz0ALEeAkzrI6Dn7YUMrKj1FFu7RFzWvokTVTBfXpI9Tl8SUMTnb/dyTH31CwEGKAXCe0EjTgclTzi+cbjs=; Received: from [188.134.40.128] (port=54763 helo=shc.zet) by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1WK14q-0000v7-I7; Sun, 02 Mar 2014 11:44:48 +0400 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/4] mfd: mc13xxx: Limit maximum SPI speed Date: Sun, 2 Mar 2014 11:44:33 +0400 Message-Id: <1393746275-9253-2-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1393746275-9253-1-git-send-email-shc_work@mail.ru> References: <1393746275-9253-1-git-send-email-shc_work@mail.ru> X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140302_024512_795120_07CF024E X-CRM114-Status: UNSURE ( 7.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: Samuel Ortiz , Alexander Shiyan , Liam Girdwood , Mark Brown , Sascha Hauer , Shawn Guo , Lee Jones X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, 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 The patch adds the maximum speed limit in accordance with the PMIC datasheet if other value is not given in the devicetree description or board data. Signed-off-by: Alexander Shiyan --- drivers/mfd/mc13xxx-spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c index f88087f..cd27c32 100644 --- a/drivers/mfd/mc13xxx-spi.c +++ b/drivers/mfd/mc13xxx-spi.c @@ -138,6 +138,8 @@ static int mc13xxx_spi_probe(struct spi_device *spi) mc13xxx->irq = spi->irq; + spi->max_speed_hz = spi->max_speed_hz ? : 26000000; + mc13xxx->regmap = devm_regmap_init(&spi->dev, ®map_mc13xxx_bus, &spi->dev, &mc13xxx_regmap_spi_config);