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:   Tue, 4 Apr 2023 09:23:36 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Herve Codina <herve.codina@...tlin.com>, Lee Jones <lee@...nel.org>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, alsa-devel@...a-project.org,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v5 2/5] mfd: Add support for the Lantiq PEF2256 framer

On 04/04/2023 09:20, Herve Codina wrote:
>> I suggest that none of this (besides the child registration, which is
>> achieved by a simple OF API call in this case) has anything to do with
>> MFD.  We are not requesting and initialising shared resources and we are
>> not using the MFD API to register children.  The pin control
>> functionality clearly needs moving to Pinctrl and the rest, if you
>> cannot find a suitable home for it *may be* suitable for Misc.
>>
> 
> I am confused and I am not really sure to understand where to put my driver.
> 
> The core pef2256.c needs to:
> 1) setup the pef2256
> 2) add the children
> 
> To add the children it calls  devm_of_platform_populate() to add the audio
> parts as several audio children can be available with the same compatible
> string.
> 
> I plan to move the pinctrl part to the pinctrl subsystem. With this done,
> the core pef2256.c will probably add the children using:
> - a mfd_cell for the pinctrl part
> - devm_of_platform_populate() for the audio children
> 
> The setup (E1 lines and TDM configuration) still needs to be done by the
> core pef2256.c. Moving this part only to Misc will break the hierarchy.
> The audio children depends on the core pef2256.c as this one do the setup.
> Having in the audio children and the part that do the setup in same hierarchy
> level is not correct. Audio children should be children of the part that do
> the setup.
> 
> So, the structure I have in mind:
> - pef2256.c (MFD)
>   implement and do the setup at probe()
>   Add the children at probe():
>     - pef2256-pinctrl (pinctrl) added using mfd_add_devices()
>     - pef2256-codec (ASoC codec) added using devm_of_platform_populate()
> 
> Lee, with this in mind, can the core pef2256.c be a MFD driver ?

You do not use MFD here, so why do you want to keep it in MFD? If you
disagree, please tell me where is the MFD code in your patch?

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ