Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp331503rdb; Mon, 22 Jan 2024 05:47:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzfOXS0yNAYdyvR9bm44bU96OKYGX+iZfZks3vRIS4z4Nef7JHq93iDMXGmPEWwicXN+pM X-Received: by 2002:a17:90a:d384:b0:28e:8210:ddbc with SMTP id q4-20020a17090ad38400b0028e8210ddbcmr1894247pju.20.1705931265862; Mon, 22 Jan 2024 05:47:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705931265; cv=pass; d=google.com; s=arc-20160816; b=RnJH6loV3tzjptmuR7OecucGG7zbi+b75rstMMtN7DTB9L4Qh5armBuGrBKnkxOWuc 8FbTSNFLxEhPtV3vCU2FvLWnqRKahAxCCazdCM5iuy/P2Ybbup01cQrIiuu8+OZRCDFq Icz9UWUL4QNzA/bnQD6lwRMxtNnIQL/vmpjtbO+Bea7p6KvLcgL2er4884tNC7RG0ECQ X7z5I5RkJGRT9l46KMmLv28DiTsMH1gfEH2ddA7hwNFoqHX8XaQ8T1/xWvtMgEdIAUbb rLeEQ3IaqVhwk2dWMtNdIX5c371ry4z7ISP8ML/JQqp+kTtPC66Cwmgerntox3dgFX9F Hv9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=wFt+s6kaAmxwMWrnZJi1q/AOQW4iNIVpOYVaOF/Qrwc=; fh=zr4IdscT8lKc++5CfRUVgNN6JUdpADPILNyicVAaAkI=; b=odpqRlJgLs+ix4Ul6EDswTxA2jg/dCNQ2zVAiBWdBF1311ULQWL61qJVCstWM/DHC/ edXVjAAO/Ckiv0erXGiXA3n34ORTOtgqgWXF50F60rShhKULzhKzMr20pSccFzZLh2KV 2RjcODIAYN0EMXfQ3nNtgrA9rBl7B9GpSeri8X+0kVUoTiA0Iif/L/ylp3xDSlzt+dWa MYf9yVdPrWTJVOtPevXBKQTXUIA20EykDU+KG/6sd3jS5RwlKQmXDysAqjXC+nBVgEsz yCkE4gFi3egljnK66ob5ei+ciTnH82TeCiJNjZbgyrFfw3/DFokaD1thqbG8MrlhvYVf BI8Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GcJwKeAd; 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-33078-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33078-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f3-20020a17090a654300b0028e289ec97fsi8030182pjs.124.2024.01.22.05.47.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 05:47:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33078-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GcJwKeAd; 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-33078-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33078-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 59CB0B26E51 for ; Mon, 22 Jan 2024 13:14:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 834933CF6B; Mon, 22 Jan 2024 13:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GcJwKeAd" Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 03E123CF47 for ; Mon, 22 Jan 2024 13:14:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705929271; cv=none; b=eRmDeenyiWR4bJryYV8aOKtI/8v2MHXPJaja+Eg+zZ0cyIlnhkyjg13FdadmUZVlRxIGLZJMTZO26D7B4WeLZpOALEBEYT3SlV/TgmnH6u2B7cjrSvH2mHHVILJ9Ik+kIdauQeNgbnmzS/r2vSRifrneObBPAItgPWXaOfJ8TLM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705929271; c=relaxed/simple; bh=K30LieWFbuwgszGRYmUn5+kXRPSalW7eeHMf+IDE62g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=u+WROWS50mx+o2C0pCsjghvXkxO1G+o56v2D1wSQuuXtEbrROdOXFxQR4H4aa0UDp2hMJ0nT86Q67pf5igEiSVQPIzEhdUb3Qs4yHOWnHIXszB7m2IaGfQguWSKJQ7schdKWWmZqxwTI+pJue8OWPw+1jgNLeZpm4KIv3uhquL8= 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=GcJwKeAd; arc=none smtp.client-ip=209.85.128.44 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-f44.google.com with SMTP id 5b1f17b1804b1-40e76109cdeso36278315e9.0 for ; Mon, 22 Jan 2024 05:14:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705929268; x=1706534068; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wFt+s6kaAmxwMWrnZJi1q/AOQW4iNIVpOYVaOF/Qrwc=; b=GcJwKeAdUEOFTE/j1rH+2Lcp24e4WKQ3YcWrO6xvEApdX6kLJl/epjk0T18heFJ8kd 01u5wSxmV73Y9eFimgJRQkeRu2xDRY3WAcY7hnSlUlqE7xDGlKv7I6fAP46eZMMYgBMX gWDtQnY2aaAUQGY7Ecro0/mWmTpd9/oMI1v7W+vPMsyd1Hb/ZAj7utMyFWxgn+sjwkcZ TmdJsRiI/l1yTHSsCjx4HLSBKH+kwg3IWCfjBoZzGLkph3puG2Bf6k3kjvQypIKGZV6/ 0AppotIrdC7BRpMvy7y7HbuPoS7LfkBFEV5mN5nPFKLHqM2CFgIjWxEDPPWLIQQVk35y 600g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705929268; x=1706534068; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wFt+s6kaAmxwMWrnZJi1q/AOQW4iNIVpOYVaOF/Qrwc=; b=cv802lDgqDS4hCm6WGyNUvSzKebDLwk0u0aVigopDBv9G7HEmhE7f2sN0tSWtvwwuC G/oSWwBALmRhX2ZnaGvBgoAiSKauAVXcYSU84YNoneoT1nl6/rcy/uCk5wVpocgB2dhP FPRKn+AfRX1h+/5cQmvgQYesX8YlQQOBWkjtV/iCYStKiGPsqVCZ6AZzGMq03F+iVzOq MYePe22D81agBGfR/tRSPWFntqDCZnmPYgHtVP9IxTEAH7LjLJ/BW35zuNn8Amfx/BC0 tmphqAud0yVg/lg4IYPGqJJybYmPXnNUjVJwuWhH1dRw5Pe9+XssO4IY01kR4mHT/917 N5yw== X-Gm-Message-State: AOJu0YxKg1eUEUAo1s5ZGVS+YTpaNiVw+uMYtwZkXVt4UD7HzY1ISN0r A6Ojrtu7RI+UKzfs9SYaZzakQHTuWS6lhI86KB3afyjrlnjN0b1KsbGDvD6dekk= X-Received: by 2002:a05:600c:228e:b0:40d:5c7e:6f69 with SMTP id 14-20020a05600c228e00b0040d5c7e6f69mr2714157wmf.147.1705929267644; Mon, 22 Jan 2024 05:14:27 -0800 (PST) Received: from [192.168.1.20] ([178.197.215.66]) by smtp.gmail.com with ESMTPSA id n18-20020a05600c3b9200b0040e4ca7fcb4sm39267210wms.37.2024.01.22.05.14.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 05:14:27 -0800 (PST) Message-ID: <0b6a7895-bd87-4edb-b392-5000124ad133@linaro.org> Date: Mon, 22 Jan 2024 14:14:25 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/5] reset: Instantiate reset GPIO controller for shared reset-gpios Content-Language: en-US To: Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peter Rosin , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org Cc: Bartosz Golaszewski , Chris Packham , Sean Anderson References: <20240112163608.528453-1-krzysztof.kozlowski@linaro.org> <20240112163608.528453-3-krzysztof.kozlowski@linaro.org> <5ad7badb85bdece735901a0f6317183b1d628a68.camel@pengutronix.de> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5S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KSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <5ad7badb85bdece735901a0f6317183b1d628a68.camel@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 17/01/2024 12:26, Philipp Zabel wrote: > On Fr, 2024-01-12 at 17:36 +0100, Krzysztof Kozlowski wrote: > [...] >> struct reset_control * >> __of_reset_control_get(struct device_node *node, const char *id, int index, >> bool shared, bool optional, bool acquired) >> { >> + struct of_phandle_args args = {0}; >> + bool gpio_fallback = false; >> struct reset_control *rstc; >> - struct reset_controller_dev *r, *rcdev; >> - struct of_phandle_args args; >> + struct reset_controller_dev *rcdev; >> int rstc_id; >> int ret; >> >> @@ -839,39 +1028,49 @@ __of_reset_control_get(struct device_node *node, const char *id, int index, >> index, &args); >> if (ret == -EINVAL) >> return ERR_PTR(ret); >> - if (ret) >> - return optional ? NULL : ERR_PTR(ret); >> + if (ret) { > > I think this should continue to return optional ? NULL : ERR_PTR(ret) > if !IS_ENABLED(CONFIG_RESET_GPIO), for example by just skipping the > of_parse_phandle_with_args(). That should allow the GPIO fallback in > patch 5 to work as expected. > ack Best regards, Krzysztof