From patchwork Mon Feb 12 14:03:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13553318 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 9AF0CC4829B for ; Mon, 12 Feb 2024 14:04:34 +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=jnDawls7mPpwiq MyVg4/IzGt8yWTanJE/72reZP5QjNPqblQ5PArawhuE23zcKKM6Wd2GawhZfnH2w3F8SKtF7gNaK7 TpjHzZZNy3n2yxkIT7a6HRk90CtC93jhfrzxty6BwYMkD4TijibaSnkteG/KW3aEv3cGISYApbRWq pCWagxokDLKieLDQRh6AaJy7ODDJfjvxKXbBK0UGMMGuzZterBCAzXMB/QjaXepAcaft4N6UBgY4t T7Y69KuhthvvIWZHZF/AEOu4O/VQtgOpYqswcYKdMcLDzZF2yWjiyZBJDGbQezEkIMCKWy060zqTj NvlMOxAnaxKCOoVQNaYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZWuv-00000005h43-2Ve4; Mon, 12 Feb 2024 14:04:17 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZWug-00000005gsA-3brx for linux-arm-kernel@lists.infradead.org; Mon, 12 Feb 2024 14:04:04 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-410e7b08252so4838285e9.0 for ; Mon, 12 Feb 2024 06:04:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707746641; x=1708351441; 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=xzj49XkeRZjwhZK7a/lgL334F00fNL1trMx61ymQOQ2DWg/ZNW7PX8QrRPe40qzdmM D1l/fTQX89PvKxC+fsVaiUQYWH7AKXphq48lL7a2Fmh+SZkTs8zvowlOOLNSeE8LLWuy 4wt7FZY1IrHUA0rpWmVycBFQ05N0+Ahwf/oKY5Z6+RQVoymRNCHa4V2wBodllhXJokmg 4i4WGQMHI8t3GF3V6cji3o/eiomjOPTwD2wyuMl/4tUXW7GZ4BbFSxrt+nZw55hov5V0 bwe6ySF2D9FeQ1n3TZazWFvrKSa+18mOJEqPi8z4XhsIC2pH6iva15i9M2VdED/UopAo zPNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707746641; x=1708351441; 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=pW0aEw+p85883sGrXbC69a3ivbTs1hCp5EEdbm3h6oUgaaLbCDHbboD55VinIRNI0s A55rBFheH9bmK6bnYUyC+tdaDGj4HFWKZ6vKsbKNj9wpDLTtpE3Y7PiUBbuxdDollw9Y 6EdX/w+Qrh7mW/b7kDoyRF0ZcF3EtPIV7vmzrGq3vjNhJ0DT6wWHl5sOqPXaJnG4P6Fh E/BkB6FTNEod6ThOJEVhcVvpkepR1IIbMw49QjvQNXlobE5VlkNUS9ROEhqCklt3PJus ayxd7fUps4ZsteBSARUN4lht0mV74ZkLAKEtna/Eg/S/PqAaCHZakIAuf1Vt3g9O0ExL LoiQ== X-Gm-Message-State: AOJu0Yw/hdpW7RKBufHwTjZ5mPa8N0E3VzAv5JL0Tvis3dcc/9erblfY 1/gQig7lOAwedFAqQKA4DO2oHLSiyqiRbfQuKsJf0XqanwYiEgLryb9I3MQJjFA= X-Google-Smtp-Source: AGHT+IF/I723HEKivTWirm3wyE2xeXsOblRKelpXELYMdzvVNFfyRkU9wYHLuZqgHwIuGGr1Jyru9A== X-Received: by 2002:adf:d1ee:0:b0:33b:649a:1a12 with SMTP id g14-20020adfd1ee000000b0033b649a1a12mr6445402wrd.55.1707746641214; Mon, 12 Feb 2024 06:04:01 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWKfTIxuJNqeqR/0k79+N4mN8gU3DXXgyJK4cNRl7jc6UrPjOB03vSpehxjuCkSsz6/jiG7FClGbwtsjghFuNXQwQ9jn5Bzhh10HYoH+LR+iNk6rL+mkwWyVZC4tqZ7n4pH97ux2mhKRVNYLCuAs2pYCBzoxpPcb+Jg9jb9NSAOGY74ZqPLkz/sqrRPbBv9wt11ITpBvwqnJw1JGZCP/O3Es7J29u92JTs8NgUbXXt6i6nab3Qw5bes/PZRwIfV6Cqr0yD+Ct/7QXjG+cxeSpOxSxAwAoz9pnsl7zMGtVfecnl1MCsPQHBxZwj+2+l0TtGxx46UzXkMU+P2QhNduIeEPMqyteM6AsnisKqNDB7flvOJNoeLJOnB2GsuXnZM6DXxFY9CzWEXu1kHGm8qpy9NYoaRJstzXEVvZxPaWGfSHECTPVVK3eu17bkCd2cIoNyi+W3sy+QGOChsvnoO547YoF8j3d5eZx4PR0NSOI8TzCT6Rp1H/fNzG0f65rTc1S7Y6jFXWI6BrG0tpsagVTm46rbq30t2LGVeU5jUtYFgWq7Ifn3ug6m3dHpEUUO7vceZa3Auzygr3yeYeKcZnWF+GxbEKH0h78rK608lkQ910F0CMi0= 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 v9-20020a5d4b09000000b0033b843786e1sm2135356wrq.51.2024.02.12.06.03.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:04:00 -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, arnd@arndb.de, Tudor Ambarus Subject: [PATCH v2 09/12] spi: s3c64xx: get rid of the OF alias ID dependency Date: Mon, 12 Feb 2024 14:03:28 +0000 Message-ID: <20240212140331.915498-10-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog In-Reply-To: <20240212140331.915498-1-tudor.ambarus@linaro.org> References: <20240212140331.915498-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-20240212_060403_052344_63CF20FB X-CRM114-Status: GOOD ( 11.82 ) 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)