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: 199837 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2451718dyd; Mon, 12 Feb 2024 06:12:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGNe/oTVTcBnaM91gx84arRJL1xMYE13lsBqohauCU3w1q/1QJjYcR+NHozKzbnGPC7lcpP X-Received: by 2002:a17:906:f111:b0:a3c:cd77:87f9 with SMTP id gv17-20020a170906f11100b00a3ccd7787f9mr1005912ejb.58.1707747133243; Mon, 12 Feb 2024 06:12:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707747133; cv=pass; d=google.com; s=arc-20160816; b=evItMciKWVocYj+6xnNYffTvXJweIjdIkYRVSXNSCUy1LOfcKCSnH2Tc+0gVSMK8Hf wqBoOwRYM83ussDFlJUSBsM0EXol9BNqZGgTyx/mJ9kCruTLhu9Dcsr2oAnMUQxvfDWX OcEs7weI4fCQmvtMkra9rhG3bRrZJpgA5mduQWVnA0S5yMoBnStUBroauN/gUbOn6eAj XyxNCWreyliOrt1vyoOO+rNhKOC7fMUfX9fD3T3Nsey7081yQ+isz7iC7WADPXOyASAr li/VSIG14+YB9yeX5vcN3tInxCm9WVPgCKgGz5yp5Ysz4u+m+bqFLiMALMiHqP3wk3Jv 1Dmw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mLhU5Fpjpt+G1J97uCF7eZiB9eQQAYSw34EErx851iQ=; fh=C3DXo+lVeSBD23TIokvZmLfzwPjPp8uoUbgrZy7DL94=; b=Cxni42DL7IhtbLGVq95a9HpIK3Dhk97QVhJfZTE8gUNWzIbWLADx/VcHliZ+teuRU6 C6a0jM24JuPMTt1Ctp4hSgB+am8forxbjVt8yvfcCCWTs9ZStufQkdg3TmIvfli/rFjm tY4HphiABdUYL5PTgfcjCb3g8JddEPZwcFrQkMWy/1ovc2nk1gFCjMLmK5kVVwk/A6XJ jvXutAnOU5PhU8Yuqe+J0185aQVIYTF3O7kmM+ZU2CkEsFld12vFpzmVg7TFd/4dMZSa gn3rJFpqhBBi7eYX/PiIR8XVfIYMLLTprhp5ge+zlHjtr6SzQ9QTVq6li+WakqJ+cNXK LP8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D3snOylN; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-61796-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61796-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCU+d4JvUkMGPTHq4Ep+ODmwhG3esZJW8QXWaqYZu3JVThxdV4Q88UR4CsY1X79MZtcWhcuGLSJfZzNN5EsdUjXDPxW/mA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lu1-20020a170906fac100b00a3a614ded6asi219103ejb.815.2024.02.12.06.12.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:12:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61796-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D3snOylN; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-61796-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61796-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D356E1F238BB for ; Mon, 12 Feb 2024 14:12:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB54E4D5BA; Mon, 12 Feb 2024 14:04:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="D3snOylN" Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8CE24654B for ; Mon, 12 Feb 2024 14:04:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707746645; cv=none; b=pGXWovqCJBf266mvjmWD1P+YlZu1QFpIZfYtXDMr8nqVWTnlkF6bt+mtl0MuOae2UaLbTVBMOMsCntE2KFJSqrOcZvVtO8fSwLf+d7MVrGQuAiO/c1FENbGe/46awaESJ36jQP/zDHfOZknD+gLNbv1K/L06G0Nw99Zc4pf5Q1c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707746645; c=relaxed/simple; bh=QT+y60mSzKIxUoqowiAzQyZMJ8QTQOIyVLxdngAbOu4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fQHda7PvuM9B3rl9CG+7by8un7sc/dx9ja/I3B35kkniOQZ+vFyDq3LhY0GXIzO0PHFsSzb57ljqiN6MJW13vPjHGsmpNzljW2PjEZxWwTNhahEfhJEUprDbwSLZC5NA7QV6u+byZQDlpCezINuNuMLKEd/TYfiY6BMm8FEMkfQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=D3snOylN; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-411a6ada28dso1239115e9.3 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=vger.kernel.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=D3snOylNk3noTRcTTnZuH9sGLv9aTOh4RITBtgGqT3SkEIKcRrBllPwBpvfIspiOLM 09NYUTvpDGRdeAJ0jIl0dtKSgrpecLVy7mdHRZuzMd0VLPFCn/yOu8iCu19xwQmJi3Hk vijK7eldGAFt1Gy90enFDWohQkXzZOFP5wJoftPyvJz4I72K8MJQssTyIzC6eRMXukAl ZJo4lENz9ld/iOvcm+CibphLEvHJzObmoyjyJeAs6bb95ma62Fmpumh3Z4HAVTTmzfUW cN6+HsfuTvqLP7tVUxBbhTrpEuUzd/KQU5HdZY7l6opvy+jpZeJ2N5P/5spIACogqdK8 +/ew== 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=XTAtZtkvmQvueCB/MmPQ8gASU4hjiIAbKIRCayzBE5YJ5IJC84Vbyj7TN0z5/zuAXA +rc6g+p8Ah7VQIj9BAV+CpUkA9AXOv/JKYa8fx1qX1JctCncvVRD9I7olJngVEpR4rMO UkW3bb7SJNpmm/k3bo1m+w+fXrQXyFCNc67iLRFxcG7XEgMlTvOSDerGg5PZsNrAyBAa KwVKog2OaSq31grNA43jhHfYE2eGFD/wlAjCtAGubeEFwl97ndNjt2zYTVVePCB1l5Cm Sjcq6tu/AjkRQMRfEOFVSgVHSGbDuKQ8CEmoS5XyUE1CkqHRRnG1QPcfP1JdfWocAiQQ x2vA== X-Gm-Message-State: AOJu0Yzqd+MoKFB0FbBUZqdaQNn7OeEeoFlYFq52reN3SLaWcRdRokjm eIWZLIq/mOw7rpf0ZBIPh6RnzvErmrWimInUmSy5HIBDg5zIESe0mol56nGVTko= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790702658172714786 X-GMAIL-MSGID: 1790702658172714786 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)