From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 010F2C433EF for ; Tue, 1 Mar 2022 20:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sqlBYFFAkdxn5CnxvuRa1/7cQ8/HGXRadGLEcz/1nQo=; b=4lA+1jdXCRb3JR Cntku17FtMhAM/YeiSQRKpey5niBvq0pvMiMeFcIrjglrY6ZqZyRo6yi52RoKW3VFZlnZDdEW00Zc sH3sAMje6nIToG50V/xJvZSJpzIy5ZfxpRHrvf6Uzl3Vu8s0B6/6Oq16yEa2bmum9JPbjegMj7siJ 0gVjXRox7/GX9umvVDiej1RetC1HGLLh+9+J8g8k7IGkXE2dtu19UEAvTG9BnhwGusluTIX8xtTkV ijl12erlHQFBZ5+w+7CvbNoplV+UbIkEQg1YB7j094MoYrxGOCtFWQZsDSh+e70FQ2PuZaQ6zrU+N jH8ALFQs1SjRPMw6Wa1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nP8vv-000PHk-Jt; Tue, 01 Mar 2022 20:17:19 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nP8vh-000PD3-TI; Tue, 01 Mar 2022 20:17:07 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8A03FB81CB4; Tue, 1 Mar 2022 20:17:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 369A3C340F1; Tue, 1 Mar 2022 20:16:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646165823; bh=Xu0+i5k46GDbxoq5qyFGw7zlYHWQ576m6QBwAW8Us3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=px7bi9MJvKRcvCAoHft/wsj0Jk/nUuDzLZYRgJMOAHNFZOT/3E/2fDwQYIyKhSv8L d+mHVIy9qzP2gGW3TEd3UrmfRkat6NxLbnQjPi4OL14+s9r2UiweR7xAPjr+l9tD/0 JxSwHynuoFoapvMPuDFtg75OK2vwJDfIxJneSThM4Ds3oSebZMsPzczx7et0V4Bxmk qyVKaBj6QbtxrNmpx6fvRrATF/rcvtX+v5UUOKO7juhi/bVJaq2gg2cmkfPFot3jrz RLDXHx4mogeEJz96QbRHYyHPTVggia2AJodjdmeAk9oYphKg2NAbkIEOL6cnUUIQlY bqjxsekA+hHGw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jon Lin , Mark Brown , Sasha Levin , heiko@sntech.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH AUTOSEL 5.15 07/23] spi: rockchip: Fix error in getting num-cs property Date: Tue, 1 Mar 2022 15:16:06 -0500 Message-Id: <20220301201629.18547-7-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220301201629.18547-1-sashal@kernel.org> References: <20220301201629.18547-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220301_121706_095999_4221D8B9 X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Jon Lin [ Upstream commit 9382df0a98aad5bbcd4d634790305a1d786ad224 ] Get num-cs u32 from dts of_node property rather than u16. Signed-off-by: Jon Lin Link: https://lore.kernel.org/r/20220216014028.8123-2-jon.lin@rock-chips.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-rockchip.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 553b6b9d02222..4f65ba3dd19c2 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -654,7 +654,7 @@ static int rockchip_spi_probe(struct platform_device *pdev) struct spi_controller *ctlr; struct resource *mem; struct device_node *np = pdev->dev.of_node; - u32 rsd_nsecs; + u32 rsd_nsecs, num_cs; bool slave_mode; slave_mode = of_property_read_bool(np, "spi-slave"); @@ -764,8 +764,9 @@ static int rockchip_spi_probe(struct platform_device *pdev) * rk spi0 has two native cs, spi1..5 one cs only * if num-cs is missing in the dts, default to 1 */ - if (of_property_read_u16(np, "num-cs", &ctlr->num_chipselect)) - ctlr->num_chipselect = 1; + if (of_property_read_u32(np, "num-cs", &num_cs)) + num_cs = 1; + ctlr->num_chipselect = num_cs; ctlr->use_gpio_descriptors = true; } ctlr->dev.of_node = pdev->dev.of_node; -- 2.34.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 781AEC433F5 for ; Tue, 1 Mar 2022 20:19:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237966AbiCAUTw (ORCPT ); Tue, 1 Mar 2022 15:19:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238135AbiCAUSC (ORCPT ); Tue, 1 Mar 2022 15:18:02 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BA448A31F; Tue, 1 Mar 2022 12:17:04 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C221461752; Tue, 1 Mar 2022 20:17:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 369A3C340F1; Tue, 1 Mar 2022 20:16:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646165823; bh=Xu0+i5k46GDbxoq5qyFGw7zlYHWQ576m6QBwAW8Us3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=px7bi9MJvKRcvCAoHft/wsj0Jk/nUuDzLZYRgJMOAHNFZOT/3E/2fDwQYIyKhSv8L d+mHVIy9qzP2gGW3TEd3UrmfRkat6NxLbnQjPi4OL14+s9r2UiweR7xAPjr+l9tD/0 JxSwHynuoFoapvMPuDFtg75OK2vwJDfIxJneSThM4Ds3oSebZMsPzczx7et0V4Bxmk qyVKaBj6QbtxrNmpx6fvRrATF/rcvtX+v5UUOKO7juhi/bVJaq2gg2cmkfPFot3jrz RLDXHx4mogeEJz96QbRHYyHPTVggia2AJodjdmeAk9oYphKg2NAbkIEOL6cnUUIQlY bqjxsekA+hHGw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jon Lin , Mark Brown , Sasha Levin , heiko@sntech.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH AUTOSEL 5.15 07/23] spi: rockchip: Fix error in getting num-cs property Date: Tue, 1 Mar 2022 15:16:06 -0500 Message-Id: <20220301201629.18547-7-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220301201629.18547-1-sashal@kernel.org> References: <20220301201629.18547-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org From: Jon Lin [ Upstream commit 9382df0a98aad5bbcd4d634790305a1d786ad224 ] Get num-cs u32 from dts of_node property rather than u16. Signed-off-by: Jon Lin Link: https://lore.kernel.org/r/20220216014028.8123-2-jon.lin@rock-chips.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-rockchip.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 553b6b9d02222..4f65ba3dd19c2 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -654,7 +654,7 @@ static int rockchip_spi_probe(struct platform_device *pdev) struct spi_controller *ctlr; struct resource *mem; struct device_node *np = pdev->dev.of_node; - u32 rsd_nsecs; + u32 rsd_nsecs, num_cs; bool slave_mode; slave_mode = of_property_read_bool(np, "spi-slave"); @@ -764,8 +764,9 @@ static int rockchip_spi_probe(struct platform_device *pdev) * rk spi0 has two native cs, spi1..5 one cs only * if num-cs is missing in the dts, default to 1 */ - if (of_property_read_u16(np, "num-cs", &ctlr->num_chipselect)) - ctlr->num_chipselect = 1; + if (of_property_read_u32(np, "num-cs", &num_cs)) + num_cs = 1; + ctlr->num_chipselect = num_cs; ctlr->use_gpio_descriptors = true; } ctlr->dev.of_node = pdev->dev.of_node; -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D9D1EC4321E for ; Tue, 1 Mar 2022 20:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7vdf7AoVnVEWSAurSPZqL+L1vfWKM8xFe+/htkeZ3MQ=; b=O9yCnMMjYpdcK5 NK5fMfe3xAkBt+h9+NMCiIJEPYznJZv9oft6X7YnSRd08r5TL3kIE/KQok8sPkA3COGmMmgUqJe5f 3sxk79fXOwvnZZ3i+Km0m1sq0I3T2QtrW46m2b8F7Gqndz/8Nym6tls/k4GgSrDvLCMc5FZ1HfJux LPgV++Pj+IptRLlqA2HSMSwdbOfwI86JrMgT2tlkcza2L+C20PCFDKV1/tkkDnmN7LI44cCnSONDz FjdjqGUp5w7QoimTLsx5chS7pWXHFLy8qdmVt/kGBuv6CH1uiYHJ67jPfVkEIvVBbALwbc/ZxRVli LOws38W+eeT0ZqhlwZow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nP8vm-000PEp-0g; Tue, 01 Mar 2022 20:17:10 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nP8vh-000PD3-TI; Tue, 01 Mar 2022 20:17:07 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8A03FB81CB4; Tue, 1 Mar 2022 20:17:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 369A3C340F1; Tue, 1 Mar 2022 20:16:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646165823; bh=Xu0+i5k46GDbxoq5qyFGw7zlYHWQ576m6QBwAW8Us3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=px7bi9MJvKRcvCAoHft/wsj0Jk/nUuDzLZYRgJMOAHNFZOT/3E/2fDwQYIyKhSv8L d+mHVIy9qzP2gGW3TEd3UrmfRkat6NxLbnQjPi4OL14+s9r2UiweR7xAPjr+l9tD/0 JxSwHynuoFoapvMPuDFtg75OK2vwJDfIxJneSThM4Ds3oSebZMsPzczx7et0V4Bxmk qyVKaBj6QbtxrNmpx6fvRrATF/rcvtX+v5UUOKO7juhi/bVJaq2gg2cmkfPFot3jrz RLDXHx4mogeEJz96QbRHYyHPTVggia2AJodjdmeAk9oYphKg2NAbkIEOL6cnUUIQlY bqjxsekA+hHGw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jon Lin , Mark Brown , Sasha Levin , heiko@sntech.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH AUTOSEL 5.15 07/23] spi: rockchip: Fix error in getting num-cs property Date: Tue, 1 Mar 2022 15:16:06 -0500 Message-Id: <20220301201629.18547-7-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220301201629.18547-1-sashal@kernel.org> References: <20220301201629.18547-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220301_121706_095999_4221D8B9 X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jon Lin [ Upstream commit 9382df0a98aad5bbcd4d634790305a1d786ad224 ] Get num-cs u32 from dts of_node property rather than u16. Signed-off-by: Jon Lin Link: https://lore.kernel.org/r/20220216014028.8123-2-jon.lin@rock-chips.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-rockchip.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 553b6b9d02222..4f65ba3dd19c2 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -654,7 +654,7 @@ static int rockchip_spi_probe(struct platform_device *pdev) struct spi_controller *ctlr; struct resource *mem; struct device_node *np = pdev->dev.of_node; - u32 rsd_nsecs; + u32 rsd_nsecs, num_cs; bool slave_mode; slave_mode = of_property_read_bool(np, "spi-slave"); @@ -764,8 +764,9 @@ static int rockchip_spi_probe(struct platform_device *pdev) * rk spi0 has two native cs, spi1..5 one cs only * if num-cs is missing in the dts, default to 1 */ - if (of_property_read_u16(np, "num-cs", &ctlr->num_chipselect)) - ctlr->num_chipselect = 1; + if (of_property_read_u32(np, "num-cs", &num_cs)) + num_cs = 1; + ctlr->num_chipselect = num_cs; ctlr->use_gpio_descriptors = true; } ctlr->dev.of_node = pdev->dev.of_node; -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel