From patchwork Mon Jul 18 22:35:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Suchanek X-Patchwork-Id: 9235487 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 23BCA600CB for ; Mon, 18 Jul 2016 22:36:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12F56205AA for ; Mon, 18 Jul 2016 22:36:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07C8E254F7; Mon, 18 Jul 2016 22:36:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAA52205AA for ; Mon, 18 Jul 2016 22:36:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752181AbcGRWgD (ORCPT ); Mon, 18 Jul 2016 18:36:03 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36133 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751421AbcGRWf6 (ORCPT ); Mon, 18 Jul 2016 18:35:58 -0400 Received: by mail-wm0-f66.google.com with SMTP id x83so530275wma.3; Mon, 18 Jul 2016 15:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=1qYSfmqdwUPUrvcqcjAtg8lerRoG++GGGnM3udq6020=; b=rw+oCkApigGw4S7DIPyNY4qUvAeIG+9l1bidZtMgqpOlWEGv5aUzYRFKtFwVFQk3pC /glw9N72zfnnNjRNlvCzpVnGayhd84yKMxNCjAt91AKo+OLLk5qKMhd5GF7Y4INKeeCt YxYoZJXNuKlWAnOldWaBnVCyWAEmYHLo6K7GxhkRmTGeXa1ntfPckHzfps627Jw6lyUU pGxUhvB75hGm+RzNULeDRvt170IhcPCokp0Y8DWlLlbfpuKjEMKij8o3VZjS6ONufutj EPGNMxwidZxDVImFCTGEQS3SVKZ9GvphAZ1rxtD9Nj+DEafgYTWoz+hb8GXGPKzQSLqV lJJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=1qYSfmqdwUPUrvcqcjAtg8lerRoG++GGGnM3udq6020=; b=PLfXMkB8FXIrpaJL/gCVdgY94Ipxhm3Ttu+WPYGbUtQHkDHJm1v+lymx4i6ofcaWQx TGqn6WVT8Nj380wYEIGKbpPGhzv8tIZzF5NEPcPnEP3OidTyMdHeFlva9EPBrtk++PJ5 DqVLAEVUWgQKi7Dmb3v0OZ/Lt5AwGje88q6pRTCBQJ0r2f4IVAYzADSROMKY3GftoDWX 7nkiwb9Np961Nh0FObh98QG/2eAcsJ7eWY/LdHZ0kqFXBa6oPHZQfuGxRwag98mvWoqO ApoH/TxzV+PUPHazIi/s1kJS8fptuIvo/o/lDdDbWBSXu/9tdSfOA6Wb4OXnwjmgFnvf 6GbQ== X-Gm-Message-State: ALyK8tK2j6gGE5XzH5UvZvV42URGZzM1bGw2Wryv/mE5hZU4wqyiUniK7Lb0f/Rb7Kjxsw== X-Received: by 10.28.216.75 with SMTP id p72mr526738wmg.67.1468881357228; Mon, 18 Jul 2016 15:35:57 -0700 (PDT) Received: from iscsi.burning-in.hell (2-166-195-217.cust.centrio.cz. [217.195.166.2]) by smtp.gmail.com with ESMTPSA id d80sm18830770wmd.14.2016.07.18.15.35.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jul 2016 15:35:56 -0700 (PDT) From: Michal Suchanek To: Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michal Suchanek Subject: [PATCH v3 3/3] spi: core: allow creating devices without spi-max-frequency Date: Tue, 19 Jul 2016 00:35:42 +0200 Message-Id: <8955fbeac9d1ec999555b3a5e58041509bf4a74c.1468880530.git.hramrach@gmail.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the previous patch allows creating SPI slaves without specifying what device the CS connects to make spi-max-frequency also optional. The spi-max-frequency is device-specific and the driver can set it anyway. Signed-off-by: Michal Suchanek --- drivers/spi/spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index f0de2ec..08e65e4 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1554,11 +1554,11 @@ of_register_spi_device(struct spi_master *master, struct device_node *nc) /* Device speed */ rc = of_property_read_u32(nc, "spi-max-frequency", &value); if (rc) { - dev_err(&master->dev, "%s has no valid 'spi-max-frequency' property (%d)\n", + dev_warn(&master->dev, "%s has no valid 'spi-max-frequency' property (%d)\n", nc->full_name, rc); - goto err_out; + } else { + spi->max_speed_hz = value; } - spi->max_speed_hz = value; /* Store a pointer to the node in the device structure */ of_node_get(nc);