mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Griffin <peter.griffin@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Alexey Klimov <alexey.klimov@linaro.org>,
	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
Subject: Re: [PATCH 3/3] power: reset: add new gs101-poweroff driver
Date: Fri, 22 Mar 2024 12:25:06 +0000	[thread overview]
Message-ID: <CADrjBPrthH4cKBpDeGV8u2ydErCJuqbdBhFQs+62k7bfPyJNvA@mail.gmail.com> (raw)
In-Reply-To: <4d5b2da7-2a45-4a9f-8a96-a6840d2751a2@linaro.org>

Hi Krzysztof,

Thanks for your review feedback!

On Wed, 20 Mar 2024 at 07:20, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> 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

  reply	other threads:[~2024-03-22 12:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20  2:05 [PATCH 1/3] dt-bindings: power: reset: add gs101 poweroff bindings Alexey Klimov
2024-03-20  2:05 ` [PATCH 2/3] arm64: dts: exynos: gs101: add poweroff node Alexey Klimov
2024-03-20  7:15   ` Krzysztof Kozlowski
2024-03-20  2:05 ` [PATCH 3/3] power: reset: add new gs101-poweroff driver Alexey Klimov
2024-03-20  7:20   ` Krzysztof Kozlowski
2024-03-22 12:25     ` Peter Griffin [this message]
2024-03-25 19:13       ` Krzysztof Kozlowski
2024-03-20  7:14 ` [PATCH 1/3] dt-bindings: power: reset: add gs101 poweroff bindings Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADrjBPrthH4cKBpDeGV8u2ydErCJuqbdBhFQs+62k7bfPyJNvA@mail.gmail.com \
    --to=peter.griffin@linaro.org \
    --cc=alexey.klimov@linaro.org \
    --cc=alim.akhtar@samsung.com \
    --cc=andre.draszik@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=elder@linaro.org \
    --cc=kernel-team@android.com \
    --cc=klimov.linux@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=saravanak@google.com \
    --cc=semen.protsenko@linaro.org \
    --cc=sre@kernel.org \
    --cc=tudor.ambarus@linaro.org \
    --cc=willmcvicker@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®