From patchwork Thu Feb 8 13:50:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13549848 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 DA5C8C4828F for ; Thu, 8 Feb 2024 13:51:39 +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=kbxLs3ig8Uebw0Iqx/CxobOJCLWmrf7Mijenv9ITFww=; b=Ezmdv1kHX0Dgz2 9T8U3Tta6dNSiMe6ri5xPL9ZQsEswYtEZqHMpjS2lWNIxBzhXMGBJgMqBKukvYcakB8X/khkZj+tW sdbF1GYSec1dyIX9589AdQEOtQ64Io7/cdIVbs6IJv4kSsumgGLq7AEJ9wA4sIk/eon8WzALEfY+V y6KiES+apZX3MdgyUuFcSkp26WFm/xPiycXaOIxrrdmv2PtG4CNPky25bDGviXn0PG0GMcL6Vog7Y UE9j+mDLlBQVspG55//ENqrPohM/IDNZMWS3IMMwW8Txy136Y1ftnRIZOeUdj2e2RsbY9xXwccogk 98V4K1D5kmiHsHjEv1dQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY4oL-0000000Dwrv-0DA0; Thu, 08 Feb 2024 13:51:29 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY4nv-0000000DwY5-0K5A for linux-arm-kernel@lists.infradead.org; Thu, 08 Feb 2024 13:51:04 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-33b5b6236afso310619f8f.1 for ; Thu, 08 Feb 2024 05:51:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707400262; x=1708005062; 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=mLhU5Fpjpt+G1J97uCF7eZiB9eQQAYSw34EErx851iQ=; b=pZtMKa9UdJ43aXdBvfDBiqlRrWr5904PmBQWQXkRUkXh8M1WohRx6HZGYuFRDHqllm TSX3NZxKXLuxKvRN1MiTA5sBf0THJA+kmVugLMN4P/rCpst+9JBVuBirWBg+z2dUqMhQ uChSUUr7bVquXJdWbsPdmd7paJ9hfhEOxOn/UHHTPnTV9ves6cXIBwIqTwJz73uC8EV9 dSNRHHp1RlXiY8la6ZrrvT34bwrPT5yI9TW8jzmCXDJMGtdZKTI1t3AtVWFctduyRy3z dX6FN+p1W8EtWVwQuqsPgsjJmTD7pLQAQH2YlIJRBQIA3qzbTtHVN3pFDvSu3vHWQqCj IOYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707400262; x=1708005062; 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=mLhU5Fpjpt+G1J97uCF7eZiB9eQQAYSw34EErx851iQ=; b=k4UwlYUUNbp9IklbHRPvhKQpckDurSvnyivS43XmhDTOsKSOpb11fvTFHc2SBcdlDa iZ1RYqD6MUEbqmJN+RHCHRUE1Og2NqSy6CuV76YJO07zW1awD+bxAEwM9OmT9NlybBZJ MqlVrkQnIMlye04xPVZgNbVHSoY/3T5txPdFSZ1bFvzGp6MIpTEriypyGcsZF4CMLG4O 9PyTiMZmvNQNj5ACPRzjA2sepNZRqiu2KL2vZWLG75aZknMLJKRH9U/ARNcodv8DZifs 5p5SFNIsBxPaREN6Nxs6NsjEjdc5OBB8h2L7Gi9vCo4kArUX+sm/BHagRQ+0kWdOf+GS Qf8g== X-Gm-Message-State: AOJu0YxnNwpsJLgx/ZQqxeE3TKYLRubgTpvf6H7wjRUWOIEGA6EpZZzo V9oT6JhyYLlY92HwBdYAXFW8fHaFSuThwDYN4fRduy/HwHLtdmmH894NAM+xgFA= X-Google-Smtp-Source: AGHT+IHns+BHVtFEhDBzkUaUKThMIn3Nm7jvYrBz2Aa1EQ9t5XpIkI/Qn1V2F2YvYK9jf4N/ZSjxog== X-Received: by 2002:adf:dd8b:0:b0:33b:305c:9de7 with SMTP id x11-20020adfdd8b000000b0033b305c9de7mr5933626wrl.50.1707400261850; Thu, 08 Feb 2024 05:51:01 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCX04YxY7bgIeT1zEkAUAWfw+eajcEdLz566pIWLkq7UyfhJITAPdzpAmxdhazwP9CKDa9dqAZD8ZW8QLjVrNLySP8nj0zk6xDMKFiCF11PLrF6F9hGj6tj7aWYbNqivvkD7YAsUSwwZh6fQUo1ZX64ErQVsJuHkkqAoZayobB6h7ZwjlMJsJL/+KqDuCNBDM+bbg5vEXeDak7XlOTGKIiGwgHa0MoZJs5qV7v2P54iLMyqqrhvYqpls9aMaEt9+Uc/YoSs3lEZ0U1A1JK4V9461747FL3Rwz2Wb4ZUIkJ54VcD7cU10rIq1uVs42k00LEv0VWQohNvnxT+JM0/ncIjjMBfdBgV5l1S1qiylExzlQ0Amzd4rgi7riJxXsKZhWsygyNdI5/6SaQLvycynC0Bl25D/QqbM8Kf7/AJ5Rr+EPaReRkMkSxdOdpgjN0r/2xxDe27PSWc5/DPIeapY300GcnCbH1Gb6hyUR/0WjWgHd+A7cSaxwwg75h1ET1rwY42Zz0rQEywyu5K2SFQKbDR9x4I/IRuJtJGcDLdqomgTLE0hteB5UcqjXEGnQD1oMO6m65aygL8+A/ep4Sd5/AUPm3Alt5UGQqJZgYk94g== 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.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 05:51:01 -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 09/12] spi: s3c64xx: get rid of the OF alias ID dependency Date: Thu, 8 Feb 2024 13:50:42 +0000 Message-ID: <20240208135045.3728927-10-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_055103_184934_8DE40230 X-CRM114-Status: GOOD ( 11.59 ) 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 Compatibles that set ``port_conf->{rx, tx}_fifomask`` are now safe to get rid of the OF alias ID dependency. Let the driver probe even without the alias for these. With this we also protect the FIFO_LVL_MASK calls from s3c64xx_spi_set_fifomask(). Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 40de325bd094..d2d1c9767145 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1203,8 +1203,12 @@ static inline const struct s3c64xx_spi_port_config *s3c64xx_spi_get_port_config( static int s3c64xx_spi_set_port_id(struct platform_device *pdev, struct s3c64xx_spi_driver_data *sdd) { + const struct s3c64xx_spi_port_config *port_conf = sdd->port_conf; int ret; + if (port_conf->rx_fifomask && port_conf->tx_fifomask) + return 0; + if (pdev->dev.of_node) { ret = of_alias_get_id(pdev->dev.of_node, "spi"); if (ret < 0)