From patchwork Thu Feb 8 13:50:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13549849 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 8F03EC4829C for ; Thu, 8 Feb 2024 13:51:40 +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=mFy/KBZ2Cb8iElfEdiTbMlmtTMU83LpSmQiQnZLz740=; b=O2Q34lsPaGePtY iDtTcWLMb5szOkr18Oeo4WXe2VNi62iisXuw4Eb5ZVJusd4QYCEMHIvJdIVkgJD5SikucYXGi3Jhx jt/oxi13jf2twEEDjViVqif1oWl/ag1hYy8U9cMS81fk8Iueet3N0i/JuCE6Wymbc48Qo7XIHawJs GgiRCzf+H8D444Bqed+hWEOZwBUaJD/pKAbB9FpOEZfKSjS76HjF7bFoUNC3lubciA7Q6zwqmeC8j PexSZUFOlwGC81dOLw/vS2zq8UU5N3c05OfZ4WTqozSZgfzOypsIdNkhspxyDWxcM4bVW6DyE5BoK RmRJkmhztOxfZjeEag2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY4oI-0000000DwpQ-10ed; Thu, 08 Feb 2024 13:51:26 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY4nu-0000000DwWv-0GrO for linux-arm-kernel@lists.infradead.org; Thu, 08 Feb 2024 13:51:03 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-33b1d7f736bso1281327f8f.3 for ; Thu, 08 Feb 2024 05:51:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707400259; x=1708005059; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TbvKAanWHb5NHCc78DYWj3IudYbRJBQeeD4twXOiMjs=; b=HXBoFqoRWQiTTucQq/FgvycKDhpxKECZjHJltHpCrl5JDzR++RNsdlx0YiPAHckZ46 BuPM+3WBmsPl1KccCOPIWx3CAzwx0PMHIlfmzoqP1nxTS8Ye3J8xNRFSIIXCFLfl8FFI vxzUZ7ScU8jLEa9GmTo/sbmkVqDa8j62z5WWf16+VJhnMiEeV3HeZnMVJn58HTgebY9b lmG1lz+L5cOTt8QCaSwHrk/EyVmDp64hdQ7dRNzFvvEz08C9o9yB+xqEwY57+9QDHkfw j0YVR8SYNuaxcB8IBIFGC9XXxgdUiDhmQGkrIc10zZMlTsc7WCGg9SV8yP3wuUoe6cFN d6bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707400259; x=1708005059; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TbvKAanWHb5NHCc78DYWj3IudYbRJBQeeD4twXOiMjs=; b=u49/JB+NOrattFUiPkE3OEHn9ijLIH3yH8ATPvpGGPuQHrrROHVCQqnIlH8Vo7Kuky M1gKDWWeSv6voajIcdYil/cAiG5J43v2FcTWTA1hHPhg8fQAw6KV/MK5hbgFIsp5tV7Q fcWlDVfHICgnchHBBpdDgtzdKoQYmRwGFY7YpI7wODcEZODEt66xbHR+xkfMeubfsE5K UzDm54nWs/KSHvyzavMj6zrxs32Hdw9SF97q9Fw6waC8aG54YI2hE7WbRTkpjMUSXSlM kgUEl23tjqjXOgFi112ThiguNnPBHqDhfiDodX9mjG8ki1CLwYbYKoTT0riKCANYWlnq sB6w== X-Forwarded-Encrypted: i=1; AJvYcCXyONUeH6Aa2gw/erdM6zwz+UKqB+Oc3DbWv5g8tpgAxDChO0fzIx0YzOOPX+iOP6Z3ilCVyW5LhLk+vVu3QNI6tLiWoG9vfUZmiuGfoL61RT1NzQg= X-Gm-Message-State: AOJu0YzKKGeqJbWDlGhDQ0aZpPNR0rdJCY7gifD4ibsWyE+mx59hHEHt gfK+S52KZZK8LK0heH0mM5hnPhMIFv/STmFgqfEqVwL7X1cVloIo9Hx4qtFBzY4= X-Google-Smtp-Source: AGHT+IFUzkhaUujf4GgqWQ0I1+zvgk1H9UB+yBEfAIYSdQoxRsOTICmWA7epBwEcg1Dj+k6Lb4Mawg== X-Received: by 2002:a5d:6da2:0:b0:33b:48ee:87f8 with SMTP id u2-20020a5d6da2000000b0033b48ee87f8mr6419735wrs.29.1707400259539; Thu, 08 Feb 2024 05:50:59 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWxecFnI5ihH/Uv6xAE+LBWZjq1Z4+yqXFAecpGoWOAMHQ29fr+wxVlBVy77BGkFo03I7SflzCMNZ5/D8ccCrjyEkEb63tIKUq1geecG3Xxh4kF6UkySVvixJ3u7nCL2jhCh2AKa+J8zjx56TuczSW8oh6o4dRRhagDl6MCwa4HOWHstI9QrOl7IjrLsGnk0fFTELH98+sHwIL3X5BHto5JRZ6mnl/xcLwjdbr9bZ+9HcYGK8ZDEu0/7tWqd70cBaAhNBIlviiM99BdfEgcdxdUCvLBaXA80NoSLWRn2D553cWEhLp4Gtg59m/t6L/G//O2Iv3iS5RPaAkEw1FxJ+/O4p/6CiU8QnlyjG9+/KAeM2akjgLJJehEc/7Bxe54BLQtqSitOsFB9bdxA239Zwes/r/F9svXbWNlJVE/Zhv+Es92ZBIlO+h/F97UsvmnVliTGrECuX0ARQxcoknXfkRAJCmku/VZRUFUTg9RYaWjzskW8oq4bdE/wN9jqypjttlQg/MbuD5cs3+Al3R25qPN2By6QkJuL3ph95ipsKRcUrB1376CPwWjkBtDm4yvS3qddVVm4WXFf7ylc+90yIM9wLak/jGUYYYJsmhx/Q== Received: from ta2.c.googlers.com.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id m20-20020a056000181400b0033b43a5f53csm3618820wrh.103.2024.02.08.05.50.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 05:50:58 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, robh@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, conor+dt@kernel.org, devicetree@vger.kernel.org, arnd@arndb.de, Tudor Ambarus Subject: [PATCH 07/12] spi: s3c64xx: let the SPI core determine the bus number Date: Thu, 8 Feb 2024 13:50:40 +0000 Message-ID: <20240208135045.3728927-8-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog In-Reply-To: <20240208135045.3728927-1-tudor.ambarus@linaro.org> References: <20240208135045.3728927-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240208_055102_167034_1F985055 X-CRM114-Status: GOOD ( 12.73 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Let the core determine the bus number, either by getting the alias ID (as the driver forces now), or by allocating a dynamic bus number when the alias is absent. Prepare the driver to allow dt aliases to be absent. Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 68f95c04d092..ac47755beb02 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1279,7 +1279,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) sdd->rx_dma.direction = DMA_DEV_TO_MEM; host->dev.of_node = pdev->dev.of_node; - host->bus_num = sdd->port_id; + host->bus_num = -1; host->setup = s3c64xx_spi_setup; host->cleanup = s3c64xx_spi_cleanup; host->prepare_transfer_hardware = s3c64xx_spi_prepare_transfer; @@ -1360,7 +1360,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) } dev_dbg(&pdev->dev, "Samsung SoC SPI Driver loaded for Bus SPI-%d with %d Targets attached\n", - sdd->port_id, host->num_chipselect); + host->bus_num, host->num_chipselect); dev_dbg(&pdev->dev, "\tIOmem=[%pR]\tFIFO %dbytes\n", mem_res, sdd->fifo_depth);