Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2899169lqp; Mon, 25 Mar 2024 12:23:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWC35p+hgtsNaIdG3M3NAyU/hWAZfTQFabzHaahsOXEUo/HaBtYpkz3gcM08wBvp4z21gxFTMu9wQthh8dRD6esPq8LeQZzbEVmPNhowA== X-Google-Smtp-Source: AGHT+IFNWigxM1FRmwjAXWplAhvgdX3ohz1Uy5BxK0NSesaJpuqzYq1/uhdK8VbSQMCIH9tneeQ9 X-Received: by 2002:a05:6a20:9186:b0:1a3:bd9a:a1a with SMTP id v6-20020a056a20918600b001a3bd9a0a1amr7215146pzd.5.1711394600699; Mon, 25 Mar 2024 12:23:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711394600; cv=pass; d=google.com; s=arc-20160816; b=v5TGeuz6TWDuGj9o4kERGpU4RANx6ofj6OaWSV6MZRFC7D5KPcBa4Gk+k5K+pErRry ddtEYukPl36wFpBfgqaoqkuj4w2w/+a3a8fPQyQHdbWHoXTY2R5ivLATGh8qxDMiPou/ qEo4dh5S6jMWrgzzmLuc9oe7XnUiAgEEtAHpw1NLnEuDz+GWchiuUObYT9eFqzPjEtX7 4HAswo3Cm7vH7dOumklVZnfGYPEi/6w+sy7a6NXbYPDYXAMQevwaMxnhyChF8t7QfVs1 fmgOguu0tr7xXXjKodFlBPq/VKrLDC2CqoZ57C801FFecRvrOiXjD+BnAV1eoYtYI+HM ZueQ== 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 :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=nbzmB+zL0vc7kuIehiH4vjEBMbTsMZOL2LB5BPg0ugg=; fh=MD6+cFTQ+hBLmb+1CVzWCD/SztVy/ZDeX/1RWBI9jSI=; b=ePwmNbt25SM3z3aArVBWgU//d57n0xHf7Tgc2kfE0sOetM8Gve+DhMSDL6mSDvnhLZ e4Ej73bI2QMRTBQ5wopYbrvFz+vCjM4kWx+rbWMko58K+NeW0gdbiLmW0DV1/hmknunT 9CLVRAul900ZjweY2pWVxnbc4ipojHwCoqS3wmzPlH5QXJoo23el6h+ixwlxdEkDkx6y ivjh4Q4DvIJYmpWQmqqdH6za3WC/BdVTOYvzyLVsIKby+jSH9YMyifTHjud9jELoZ/6f cUoZY3Nb3K4E3sX0rW+IDOKafNQ4vUfDPxN8xAa+w7w33+tDb4HnnuKEtX/4hqRfGy+L PG/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sIYy5YVi; 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-117784-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117784-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id sr6-20020a17090b4e8600b002a08101bc61si664732pjb.188.2024.03.25.12.23.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 12:23:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117784-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sIYy5YVi; 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-117784-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117784-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 87F46305316 for ; Mon, 25 Mar 2024 19:13:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3499517995; Mon, 25 Mar 2024 19:13:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sIYy5YVi" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 6505C12B79 for ; Mon, 25 Mar 2024 19:13:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711394024; cv=none; b=CEPQsj15mNy2NiFEO76RBH2Q/beytDMZgIDeCPh7f3eybZzPaa3cTCsltwOnizsHoauGPQuwxfwdDCzpajVMdwQ5Y66Eo3ySHwnpeZN2lhk/thOvdaFcvJs5VOdYqjN8qKc5Mt4dLHWeEiY/uxQpS65vFMYQJ43X/hJi8Vf44NA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711394024; c=relaxed/simple; bh=swZpm+FOboZ7NHTMfD+QKXlE30Z5OvwnQEYIKKKGXww=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OQqES51+QQofdbscDY/TS4U0IC3M7n2oH5nfn5LLUHTT6tdFreR+1rOHrSBbpy4qLdoz/5fi6K1x7A00fmCb1unRAktUIP2UUvSNKH6+PcYWuqZqkYcsO3zT9haEFl9ckf06LkB+MFYl7jmsonNTFbr2GF3WpaKIUvyCliOrpLc= 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=sIYy5YVi; arc=none smtp.client-ip=209.85.218.47 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-ej1-f47.google.com with SMTP id a640c23a62f3a-a466a27d30aso584945066b.1 for ; Mon, 25 Mar 2024 12:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711394021; x=1711998821; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=nbzmB+zL0vc7kuIehiH4vjEBMbTsMZOL2LB5BPg0ugg=; b=sIYy5YViqKWOvjyvc2u0wJQTQnl/azBOnLl02Uyneg4B4OlicTBmvG2dJpwQCLbw3W fVFv8AumdWtd/zyBm8AmMrFEL4sWAZxl3CDV2KFZ/xNPKf7JvKruGFKKfIfOaN5+5hAR VFTVONPJm6JkDOWTNbjLG5dmt6v5NNtHtzJqBZ3pODkQIMM8LarTRCZfBbf0lS0CnoJ2 cSN+bjlTUZ2NMtjl/fCvxUv9pGic5VCIKek4O06+JsGKF4Rrl+BM71YYEl0U1Sa2FMgk T733poCn7fw40NcLYQySivxsClkexLbaIfz5Y9WV1w589UN5M0MpZ+ElZ+KsBmHPRnwZ dnvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711394021; x=1711998821; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nbzmB+zL0vc7kuIehiH4vjEBMbTsMZOL2LB5BPg0ugg=; b=NUpMfP2TITON1AEJetbDjBIUHgprN2Saj7AVP2CV6clFVrMkPEe32C6U7/VINwQGBs ARZ0wYK2mqAzNxP1Mr4VIaUpyNq/Vd7XD0Ejh+KcUFrxyfBBzpk4p6bE/xYmbw0cb2dt Nq+qI5bHu2K+lWgtRaKZS7t57tcRq3+7lQ42zAorsUaqa9PJI+VHHpo+nIR+kLQP8tMJ 1BGcrFKIzJJ6aSHhF53ZAcYm+ekFWJwJvBop4ttKcLo5OBUix0q+lt0cKg/VtbXltGxN hGT3ctuKhxjBml5mwggr9n8ifQwmxTmWUmA759DoMgXiqPurMphqRWoHKkmNNf3EqkED oYNg== X-Forwarded-Encrypted: i=1; AJvYcCUUvHLote8s2Vjh1K+fyDHBelS1cHn6S/LO1dKKJUxDBl3ATHt70b/LkueuOBmy39QLROSVDzCqo0Z0DrsroWjcIX1Fhh6RZEH5WcD+ X-Gm-Message-State: AOJu0Yx9C5ctxuesfc5hwBQL6oR/tt9p+PCotmkraD1ByqITePa+lFCv qgSrWQGBjakTF0Sy4y5COiUhPbIApxlOQgDcZFjt+nlg+hu7ciPJjATk8D62+UU= X-Received: by 2002:a17:906:5d2:b0:a46:af60:7c72 with SMTP id t18-20020a17090605d200b00a46af607c72mr5353869ejt.54.1711394020607; Mon, 25 Mar 2024 12:13:40 -0700 (PDT) Received: from [192.168.1.20] ([178.197.222.44]) by smtp.gmail.com with ESMTPSA id y4-20020a1709060a8400b00a46bec6da9fsm3325673ejf.203.2024.03.25.12.13.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Mar 2024 12:13:40 -0700 (PDT) Message-ID: <0c4c7bb6-3f94-4996-8d13-8214ee3debe8@linaro.org> Date: Mon, 25 Mar 2024 20:13:37 +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 3/3] power: reset: add new gs101-poweroff driver To: Peter Griffin Cc: Alexey Klimov , sre@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, conor+dt@kernel.org, linux-samsung-soc@vger.kernel.org, semen.protsenko@linaro.org, linux-kernel@vger.kernel.org, klimov.linux@gmail.com, kernel-team@android.com, tudor.ambarus@linaro.org, andre.draszik@linaro.org, saravanak@google.com, willmcvicker@google.com, alim.akhtar@samsung.com, linux-arm-kernel@lists.infradead.org, elder@linaro.org References: <20240320020549.71810-1-alexey.klimov@linaro.org> <20240320020549.71810-3-alexey.klimov@linaro.org> <4d5b2da7-2a45-4a9f-8a96-a6840d2751a2@linaro.org> Content-Language: en-US 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+XWKydnm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sm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 22/03/2024 13:25, Peter Griffin wrote: > Hi Krzysztof, > > Thanks for your review feedback! > > On Wed, 20 Mar 2024 at 07:20, Krzysztof Kozlowski > wrote: >> >> On 20/03/2024 03:05, Alexey Klimov wrote: >>> + >>> + ret = devm_work_autocancel(dev, &gs101->shutdown_work, >>> + gs101_shutdown_work_fn); >>> + if (ret) { >>> + dev_err(dev, "failed to register gs101 shutdown_work: %i\n", ret); >>> + unregister_keyboard_notifier(&gs101->keyboard_nb); >>> + return ret; >>> + } >>> + >>> + gs101_poweroff_ctx = gs101; >>> + platform_set_drvdata(pdev, gs101); >>> + >>> + /* >>> + * At this point there is a chance that psci_sys_poweroff already >>> + * registered as pm_power_off hook but unfortunately it cannot power >>> + * off the gs101 SoC hence we are rewriting it here just as is. >>> + */ >>> + pm_power_off = gs101_poweroff; >> >> So that's a duplicated syscon power off driver. Why syscon does not >> work? syscon_node_to_regmap() does not return correct regmap? > > Yes, for gs101 the regmap handling PMU registers is now created by > exynos-pmu driver and is obtained using > exynos_get_pmu_regmap_by_phandle() API. That was required due to the > SMC call required to write to these registers from Linux. > >> If so, >> this should be fixed instead of copying the driver with basically only >> one difference. > > Are you suggesting we should add some API to syscon.c that allows > regmaps created in other drivers like exynos-pmu.c or altera-sysmgr.c > to be registered in the syscon_list? Yes, I think this could work. Best regards, Krzysztof