lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0c4c7bb6-3f94-4996-8d13-8214ee3debe8@linaro.org>
Date: Mon, 25 Mar 2024 20:13:37 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Peter Griffin <peter.griffin@...aro.org>
Cc: Alexey Klimov <alexey.klimov@...aro.org>, sre@...nel.org,
 robh@...nel.org, krzysztof.kozlowski+dt@...aro.org,
 linux-pm@...r.kernel.org, devicetree@...r.kernel.org, robh+dt@...nel.org,
 conor+dt@...nel.org, linux-samsung-soc@...r.kernel.org,
 semen.protsenko@...aro.org, linux-kernel@...r.kernel.org,
 klimov.linux@...il.com, kernel-team@...roid.com, tudor.ambarus@...aro.org,
 andre.draszik@...aro.org, saravanak@...gle.com, willmcvicker@...gle.com,
 alim.akhtar@...sung.com, linux-arm-kernel@...ts.infradead.org,
 elder@...aro.org
Subject: Re: [PATCH 3/3] power: reset: add new gs101-poweroff driver

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
> <krzysztof.kozlowski@...aro.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?

Yes, I think this could work.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ