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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 8 Aug 2022 17:36:25 +0300
From:   Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To:     Ben Dooks <ben.dooks@...ive.com>, linux-pwm@...r.kernel.org
Cc:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Lee Jones <lee.jones@...aro.org>,
        u.kleine-koenig@...gutronix.de,
        Thierry Reding <thierry.reding@...il.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Greentime Hu <greentime.hu@...ive.com>,
        William Salmon <william.salmon@...ive.com>,
        Jude Onyenegecha --subject-prefix=PATCH v3 
        <jude.onyenegecha@...ive.com>
Subject: Re: [PATCH 4/8] pwm: dwc: add of/platform support

Hi

On 8/5/22 19:50, Ben Dooks wrote:
> The dwc pwm controller can be used in non-PCI systems, so allow
> either platform or OF based probing.
> 
> Signed-off-by: Ben Dooks <ben.dooks@...ive.com>
> ---
> v3:
>   - changed compatible name
> ---
>   drivers/pwm/Kconfig   |  5 ++--
>   drivers/pwm/pwm-dwc.c | 53 +++++++++++++++++++++++++++++++++++++++++++
>   2 files changed, 56 insertions(+), 2 deletions(-)
> 
...

> @@ -319,6 +320,58 @@ static struct pci_driver dwc_pwm_driver = {
>   
>   module_pci_driver(dwc_pwm_driver);
...
> +module_platform_driver(dwc_pwm_plat_driver);
> +

These module_X_driver() macros cannot coexist in the same module and 
ideally the same kernel built should support probing both PCI and OF 
based systems in runtime, i.e. putting those macros under #ifdef is not 
ideal.

Usually this is solved either by common code has the platform device 
probing (with or without the OF support) and the PCI part is in another 
module which adds the platform device(s) or both platform and PCI device 
code are in own modules and call common code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ