Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1004525lqd; Thu, 25 Apr 2024 03:17:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXHgBrUp1AXK0YSQvlGrmbLKFh+ybkZLFFJdYSxMC9egGYtNoXlYr8ASt7u23zCbd7ypyT7StS1TdbCy2zGMjjzzqPOaw+bGYqwMIhFJw== X-Google-Smtp-Source: AGHT+IGnx0UlPogQnfugdYUoh3oPxvdnS9gxN0FboGzHAKuNnqwer5IEUAeUpi6WKtVOIL273idp X-Received: by 2002:a05:6e02:1949:b0:368:a724:f757 with SMTP id x9-20020a056e02194900b00368a724f757mr6442850ilu.6.1714040247045; Thu, 25 Apr 2024 03:17:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714040247; cv=pass; d=google.com; s=arc-20160816; b=QUULjVtGK0VyP6HYplNJrAo7KiN5QgngyqSsX51yHXD1zkXkEwh/ptQNLnqPy8WFtv orU4JgXFieJvf7dQcRUfE863xTHn0J53DFrJEPUWEzXBz1aurHQifzO3rF8lQE+q8JU/ VOlb3QZLlG9RzDNWNsTLoJsviwTQCASehVxs1UrUoyR3wWkBa6Ky7T97ZnzCpBmHiIRY JWZYqCa+n56V5xuN9ciL1eCrjo2LT2xqAJIPNeKKwyTgX7QTOsaSuyLD08fcffg+e8cI jm2M/Oa2gfUmpmSc7snrJbrTFvh2NZGjvP5m7FypAG0NbvzgXCpyYsG3Y1gjQMjPJUTi a2Xw== 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:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=8S8nDCDB+c32L7Fdp7ykx55P6SU9owgg3l94rQDaWAc=; fh=j+PmVs6uKno6bGPrf+o17gBXWLzSu/QkfzeFxsccfJ4=; b=g0t5494zLBFUkSmgXNh788NzV2vj5MM1N/66GWduquyclUaDAuW+WwqJmpgXDCQ9Dy L/BL2chJlKht9Q/7kp3z7e2D/VV1L5VsVMEJ3zIq96CYEqwn3GX5f5x9+/UEMi798jXF pUQQC9m+DTSZuqQXjmDIl1lma11K09ZLg4lp8/ULf9EjWUPUSMFlo6PzofWVCGXYn91e NK8x6RGTaZw2AxCv6do6doxfiJReifc3GHHzAMLrVuEmbZM+lrjA+vrXErAID8q5Wbcj 7zgguQV3TuMEO6vmUbVAIU3BQqt1W2SAvdAUYJ/JqxDXzOoIXlHfReCrAn/0WhFBFyBl V4rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WuMr6kp0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-158374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x7-20020a654547000000b005f057f3746asi12783712pgr.449.2024.04.25.03.17.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 03:17:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WuMr6kp0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-158374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A4D482853EE for ; Thu, 25 Apr 2024 10:17:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52A2586151; Thu, 25 Apr 2024 10:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WuMr6kp0" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E4F586250; Thu, 25 Apr 2024 10:16:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714040219; cv=none; b=BMwon4wDe926QMxhffNOjTtlZW8PsjxWdEqoz4QnPPVYVrzy6DZtGzzUv4VLsnCWIz+aHXVncAHeLa6bfj0e+9TmlDCjqAvV+rZog28dyXk+sCAlTvXp+fV0rMCImVS+dYr8XWQlF3i0DoYlACyiR1mB/moQ7Y1DBqFEaniAKxc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714040219; c=relaxed/simple; bh=hIG+/hV54iCLYeB/5AjaQyTAKf4huKvDh38dZvuucSQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=N2yo/3P7Y6hl4+eMM/C6y88o5UYQUgRm+R3Y/wjlhyVTk/1/dkOeFfFQ7rbaCtztxadnkwjVAobVJ8+hTpyjqTAGfDaMJebXnFeWQDprKyJumGoCOq5K0KMCoO9rI//sdAKxtnAWcwQYMkW51bEj5hiWaSes2FOmeNtvQzuRg3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WuMr6kp0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70373C113CC; Thu, 25 Apr 2024 10:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714040218; bh=hIG+/hV54iCLYeB/5AjaQyTAKf4huKvDh38dZvuucSQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WuMr6kp0Cr2F3cXGhkm8SlaQbv3Li8QElwizGvvO1FFxvlb39BIYkK1QWWGR6R2+k tdyXSxO8o+eAjDZGttKHGFayu4T+xO8gZsQeb6iM6hx/xvZYAUY+JFOwiIorCCm2+S EDVr4Kiwxg5SMQQNwBUdh8GN6PMm0LR5NVfmLH133gih8aK7DEpU9X9rxThsVX1kPE bXbeYwZBbPqGoj2ORamIbSBAPfqIAjmYJaZYltnL/8zlmRUVQFJrOrMWUp0giOhhDE wV4qlceRPh3n1aPoCPgFpmqzWF5bonTxLb5hGhAwKVCCT2PkfEM6p4K3g4o/h5u2zb VAvW9guANDgRA== Message-ID: <06383015-51b2-4f4c-9fd8-e4f7ce12f44e@kernel.org> Date: Thu, 25 Apr 2024 12:16:48 +0200 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 2/7] phy: exynos5-usbdrd: use exynos_get_pmu_regmap_by_phandle() for PMU regs To: Peter Griffin , Krzysztof Kozlowski , Arnd Bergmann , lee@kernel.org Cc: =?UTF-8?Q?Andr=C3=A9_Draszik?= , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marek Szyprowski , Sylwester Nawrocki , Alim Akhtar , Sam Protsenko , Tudor Ambarus , Will McVicker , Roy Luo , kernel-team@android.com, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org References: <20240423-usb-phy-gs101-v1-0-ebdcb3ac174d@linaro.org> <20240423-usb-phy-gs101-v1-2-ebdcb3ac174d@linaro.org> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.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 TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxr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7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 25/04/2024 12:02, Peter Griffin wrote: >> I prefer to keep the syscon >> API and change the syscon driver to expose proper regmap. IOW, use >> generic API syscon_regmap_lookup_by_phandle() and the type of regmap >> returned is defined by the provider (so node pointed by phandle). >> > > @Arnd - any more thoughts on Krzysztof idea above ^^ > > @Krzysztof - I did speak to Arnd about the idea you proposed (or my > understanding of it at least), which was external drivers like > exynos-pmu or altera-sysmgr.c could create the regmap and register it > with syscon so it can be returned by > syscon_regmap_lookup_by_phandle(). Arnd's initial feedback was he > would prefer to keep the complexity out of syscon, and have the client > driver support multiple backends (so syscon-reboot for example would > support using either syscon_regmap_lookup_by_phandle() or > exynos_get_pmu_regmap_by_phandle() to obtain it's regmap). There were > also some concerns about syscon having to probe very early for some > platforms. mfd/syscon.c is postcore_initcall, so it is not that very early, although earlier than drivers. However it does not support deferred probe and sometimes syscon providers might need clocks and resets. One syscon consumer (so regular driver like phy here) might work with different providers. E.g. on earlier arm and arm64 Exynos this was simple regmap. On Google GS this is SMC. On some foo-bar it might be call to hypervisor or something needing clocks. For me therefore the syscon consumer is like regmap consumer. You do not care who provides the regmap, just want i2c or mmio regmap. Of course the specific driver, so the consumer of regmap, knows the type of regmap it uses, so it requests i2c or mmio. Here we want to hide two different interfaces - mmio and SMC - behind one regmap. We solve it by using same regmap interface for consumer, but different syscon calls returning different regmaps. Anyway, I want to sort it out and have some sort of global policy, before we start doing such changes for Google GS. I am sure soon Qualcomm will come with their need for hypervisor quirks/regmaps etc. And then TI will come with some need. Best regards, Krzysztof