From patchwork Fri Feb 16 07:05:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13559617 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 D0E39C48BEC for ; Fri, 16 Feb 2024 07:06:38 +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=2XuXpj1UChMXbNDVcAZBOYNaIByw27Bs1thXXafniyY=; b=rhfExa3MinyUIp zjdyPCr8c6TE4/R0RXfPo9FVyGRFvFKSCWH67V0E4WsU64NjHJlGtVK8OLAVV45abyqulA9yFvz5v BVOW2+ky0Mo/xsSGCtAIRu0rD8+cNokarXgga/EQcRDDarskq7n/yzudVmxWF2A9OBrls3izesja5 K6Jj1nPeOtjG6Z9ibwCy+2q8hVrfzXSriHbRplcJRsBxoyyV91SSTKrDquUx41MIoqQxXigLRHuAD vE351PQvEmfAfIhn7eZ76dmdSA9QBVXlGh1HKis5SJT3XPL9M6wpu+U45pn3hOihGkdlSn42NVbx5 +BQ2N72aYSbC4VP9QKHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rasIh-00000001JJX-2doS; Fri, 16 Feb 2024 07:06:23 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rasIS-00000001JAK-3EFG for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 07:06:10 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-337d05b8942so1091494f8f.3 for ; Thu, 15 Feb 2024 23:06:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708067167; x=1708671967; 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=5Le6XNl1MSpW8ND9xafZ+XDYHu2w9i8pp90k+8toYjg=; b=p3onQ07ezbn8SgWHw5sfJmlhUFwq/qV/9t+sBhkbr9FTuJ8o/4Wx/RYrnba4YgsyPU yRoWnZZymJ2bGFzKD23tXH4DMpj421cxmeVHV612K5MbhJIU89h/aX2OP9RmO9SAd9bi yyBgonhLp584f6duHeOczxcCQIFxJ5sUtwN9ETGofyZFw8SXv7sHDC8Q+5oG9DDmroQZ Si/Kq4dMlFydZsWI6pCVY7RC+alvV1bRm8fzYcZbtmOs3/Ed0IYV1UN5OPW3NKZFfzNJ fnzzCcSRFKl/FTKghIBgGYaZNYTMwgAu8XnlGs6aYtAUfGekIXc5OOqG7jUVhSF55LEl M+rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708067167; x=1708671967; 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=5Le6XNl1MSpW8ND9xafZ+XDYHu2w9i8pp90k+8toYjg=; b=nqOeDimX83vsbvCFwWM+sWwb2LyqDc0yCEpExTx/3o09OMHrU9aUZBeTM0RQ1AW5VX HZqCJNxjeqVO7SmZkEjFAYVbkaU7msUVrNs4KSZaUCf4LPGnbFRzOtcGhLrCyhfsvS9F sBPo9RW9Q28O9xvOrPOcsvzG6sGhPrfV95CLB2T6sSCxqtpmxET5w/teVaaQWgSDFz/S zXFfhZWD/lbvu26jRkskFI6HYmKH96A03hQBi2JzsVGfi+lb0+CwSaTKJfrnbJTCvkYt udeBWNCWJoHPlCpsug5NJMKFQq0fUUK8Uyg399MCANvEbXH1Jm+NwUHYgERz0Y6EsWhw p2HA== X-Forwarded-Encrypted: i=1; AJvYcCVCT8yNjhYEPyIj6IRlKzcqbMDlNJ0xT0sm4HfV+B05UWEDommuSnUNgjVJy3mKQWyysHFxMHCENFbNJAE6N0XlXGT9nJegWd+lOJSyik/2tBAmOCs= X-Gm-Message-State: AOJu0Yx2oka+YroXpWaM/xeChvohQAv9q6v9tA8cZqkIKROkm4XBScDb Ybon6bpTh9VesSo2mFy1y0/ekwsquHh6igfXwjpthCckf6ZCOeWErqAwRh9A394= X-Google-Smtp-Source: AGHT+IGkiLaE+HZu8zlPglHiZL4OI53GAHWVvXP9fkAiSIGe1ORL1wzzW6K7wetMNBb2aYy3bf9WWw== X-Received: by 2002:a5d:4a49:0:b0:33d:11a2:42 with SMTP id v9-20020a5d4a49000000b0033d11a20042mr1761501wrs.47.1708067167573; Thu, 15 Feb 2024 23:06:07 -0800 (PST) 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 k18-20020a5d66d2000000b0033940016d6esm1298839wrw.93.2024.02.15.23.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 23:06:07 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, robh@kernel.org, andi.shyti@kernel.org, krzysztof.kozlowski@linaro.org, semen.protsenko@linaro.org, conor+dt@kernel.org Cc: 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, devicetree@vger.kernel.org, Tudor Ambarus Subject: [PATCH v3 07/12] spi: s3c64xx: let the SPI core determine the bus number Date: Fri, 16 Feb 2024 07:05:50 +0000 Message-ID: <20240216070555.2483977-8-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog In-Reply-To: <20240216070555.2483977-1-tudor.ambarus@linaro.org> References: <20240216070555.2483977-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-20240215_230608_888707_AC00751A X-CRM114-Status: GOOD ( 13.07 ) 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);