Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1086044lqp; Fri, 22 Mar 2024 05:25:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVa+5P6l1gQKN9Zwd4FzFXAHDbZXxeTfdjyg3UpPJNBvAFqoMDIt0znLPjhH4TFMXIk5NGomhoJUDqtsvrfHHYAxb0lilHW84qgOiOnBg== X-Google-Smtp-Source: AGHT+IEXyzBIn04HsZubk2vmpdno1R/SN2uPr58YK7uFj1xtxdRVWGLiMvggp5IlHgM1XLxmmNaj X-Received: by 2002:a05:6e02:1a4a:b0:368:5086:76f3 with SMTP id u10-20020a056e021a4a00b00368508676f3mr2955594ilv.8.1711110333497; Fri, 22 Mar 2024 05:25:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711110333; cv=pass; d=google.com; s=arc-20160816; b=otTP85s150yRvACFPOZiHFSKI0VWEyWbM3pm+fzMQIfyoCm4ChKlYfom8RyrOJ02rd Km/6rGsncDd0ircZ+BaIGiV7BUfbaievDmwPL5aqjX1azEeVyDyvGrU9AwbOsPNg4I9l M/Sn8GZeX3eMtxL5N4v1gAQMIZFwGSZJen55tKkY35m8qRDF7LvzaY8G3HIiqd4nJfNI 8Oq0YJe3kwZNsxUyrrsZMbWuSBIrDk4UfqCaWvLmYuzU3gKtDmpKVA83bjTp3RQcGYtI xqYn8A9aRiL1DDMNtTlnom7w/KcTDrSzdfWqXqBBhm/eIvF4SYTI/M+8NznC3fE/oSJn Bpkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=jBLDXQz7Tm/l5pS6UUf5eGUMWwFYBh+cuJFlCxTgaWc=; fh=gpZQjLfBGSuCw/piSplorV6SGWJyD5a5639VTvRYYFM=; b=nmwyXFYKEWwUAVfuF1NaumrlFe/gTuHYuJHJl3EnXWKmhdmSv0oDllQ8yuWyM5xCoP oeuT2n2MoqMtLitM0+JDQa0yZ0V2K2mAvDqNK/Iapr1ACV3oIX7peE1EHeOYKldHswm+ cTLqnrJJcNvkhT1xui/PmKwtBTFYSmYJZvofMGrVVPLswwpKLeF6jK1+B8rCykk8eAr6 h5Rp8dY8kw7LbVDl5klIqo88ena1GcCEHq9O8TjzyP8qkowypG40K0LbT88bbrwMbnm6 0vCIwfvmryTCGDXKJHe/MMNznLzpFCRTc2rWRIAXYicpguJDdxO+tWDftU5Dgbb/WN3k RR1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QD75jSUP; 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-111414-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111414-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e16-20020a630f10000000b005d6787271aesi1884142pgl.237.2024.03.22.05.25.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 05:25:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111414-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=@linaro.org header.s=google header.b=QD75jSUP; 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-111414-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111414-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 C3BA4286C30 for ; Fri, 22 Mar 2024 12:25:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8ABB740BE1; Fri, 22 Mar 2024 12:25:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QD75jSUP" Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.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 286DA3FBBD for ; Fri, 22 Mar 2024 12:25:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711110320; cv=none; b=pjd5JQgF9lMI0W99HmDAzxC2y+M6/74BFgycSdo5f0N5a1wFfl8lq5EWtTiETX54n/WEFTCiU++fWcH8YwdewoIVmPHnQ2U68x/L3g2w3mS8lDIXX62sG/SBm5nn7lwphRU+WHpywJ89xz5dUpH6AhefLmiCZcJt+1sDQix6SrM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711110320; c=relaxed/simple; bh=ZEnIxGQIqrPER/t8ApwexaX5resinISqhwzMF02gDuo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=llohlTdDrSoXvA4LQbzz5wK2jufw9hr4Bs75Ft31NJ2ohh6zHNa3y/uQ8ncSGt5tmJzbHer37Uyz5cs1uOAYS1Gdo2OEDFAlNIfUWhZgay0nUuommsYPTTw8hYtAr+W7imR15hZUxsCzzEhBr/3w5b4vDAvvUZZ8T6PSlR/TdHo= 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=QD75jSUP; arc=none smtp.client-ip=209.85.219.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-qv1-f47.google.com with SMTP id 6a1803df08f44-690cf6ecd3cso13095206d6.2 for ; Fri, 22 Mar 2024 05:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711110318; x=1711715118; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jBLDXQz7Tm/l5pS6UUf5eGUMWwFYBh+cuJFlCxTgaWc=; b=QD75jSUPqIdWfpc5O6dL2nFUl8rQyo1c+FcP8ipJjfOC/DLTjJs4yravwFdziZWD1Z /T0Iqc4b5HWXT9vBJE/DBOYSZFyuxhnBx72hi/Piwr5aaIkIGfXcIYA1hUBQI237re6p WfWiCTrTnrGR93xN6iUW3DEpymmwVqf/SayDYNOr4aYOMmVuTS38ti/H11019kXq1ruz ZUz0WSr2hIHoO+kydEKf7ntyd+tXZ6hLbLehbU8/mMJ12i6PCj0PIMVHLTBPf+JNkuxr FHYpsNs1czAuScX9eIeaG1a1g8MUMaHqGkBO6T/uOPlLU0mwbxf3bcHYDU9V8vM5eGvx jv/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711110318; x=1711715118; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jBLDXQz7Tm/l5pS6UUf5eGUMWwFYBh+cuJFlCxTgaWc=; b=PTDRl2hoy027KIAt8vwdNom6qwjf0sqWWgZzOH2nq3MpDFLECTGh+phWN5XqivgC6s wMwxcspkiCGfk72xSUu32ZkbciIP/EhzDk5ePEjJbiFaqaqk576ei/cs+ouxd/7I7Dbs BOoFk5fM/6Hu1/wnJBuhMfQlU/CGSovsn5JjxY1THbfi906kqylkQ33eRn+KZMZVmJrb /VT0jJbIc5eaYDuisxeqsxmzmZ0nr7N33u39TQny19DOYfqPVvhptFGwQ18hbeCnqMCt 8PadeblkO2WOasCIpWAuVGr1rYabrXMmTjKQb37svMEZG8g+ErogmqIj2gB6N6PcKy4J Wlcg== X-Forwarded-Encrypted: i=1; AJvYcCVwGtxCB+/Gw7J4JtB5GbPJrmSZQ9lBMcg5+ln0mS6K08ATp4WjMlvLwTzOP9Elcug5306dVl2n0R/5FYHGPVBA2hVOGu+iBdOmMBpJ X-Gm-Message-State: AOJu0Yxr4wcddqxBi2jaDkF6BQBfes55tYkBHRhlvd0K+h7YjbxpNPSL rUmPWnTQqww95lCapnD3oSub9tdRKC1O9sRhX5FPVEaLdy+r+pwIuohjEIjlDyijGS8Jp21oqh7 mskdbylqbFQ3Lc2DghHzYGb/bBWCYwPpA4X0vxQ== X-Received: by 2002:a05:6214:2a87:b0:696:1ffd:a32c with SMTP id jr7-20020a0562142a8700b006961ffda32cmr2045115qvb.31.1711110318092; Fri, 22 Mar 2024 05:25:18 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240320020549.71810-1-alexey.klimov@linaro.org> <20240320020549.71810-3-alexey.klimov@linaro.org> <4d5b2da7-2a45-4a9f-8a96-a6840d2751a2@linaro.org> In-Reply-To: <4d5b2da7-2a45-4a9f-8a96-a6840d2751a2@linaro.org> From: Peter Griffin Date: Fri, 22 Mar 2024 12:25:06 +0000 Message-ID: Subject: Re: [PATCH 3/3] power: reset: add new gs101-poweroff driver To: Krzysztof Kozlowski 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 Content-Type: text/plain; charset="UTF-8" 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? Thanks, Peter