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]
Message-ID: <CACRpkdb_i4k3F0fmDbQciPYTBUCcfpFkqM=5e3gr75-X51TTkg@mail.gmail.com>
Date:   Thu, 7 Dec 2017 09:54:06 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Richard Fitzgerald <rf@...nsource.wolfsonmicro.com>
Cc:     Lee Jones <lee.jones@...aro.org>, Mark Brown <broonie@...nel.org>,
        Alexandre Courbot <gnurou@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jason Cooper <jason@...edaemon.net>,
        alsa-devel@...a-project.org,
        "open list:WOLFSON MICROELECTRONICS DRIVERS" 
        <patches@...nsource.wolfsonmicro.com>, linux-gpio@...r.kernel.org,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>,
        Nikesh Oswal <Nikesh.Oswal@...fsonmicro.com>
Subject: Re: [PATCH v6 03/17] mfd: madera: Add common support for Cirrus Logic
 Madera codecs

On Mon, Dec 4, 2017 at 10:47 AM, Richard Fitzgerald
<rf@...nsource.wolfsonmicro.com> wrote:
> On 02/12/17 12:10, Linus Walleij wrote:
>> On Wed, Nov 29, 2017 at 12:36 PM, Richard Fitzgerald
>> <rf@...nsource.wolfsonmicro.com> wrote:
>>> On 29/11/17 10:18, Linus Walleij wrote:
>>>> On Thu, Nov 23, 2017 at 6:13 PM, Richard Fitzgerald
>>>> <rf@...nsource.wolfsonmicro.com> wrote:
>>>>
>>>>> +config MFD_MADERA_I2C
>>>>> +       bool "Cirrus Logic Madera codecs with I2C"
>>>>> +       select MFD_MADERA
>>>>> +       select REGMAP_I2C
>>>>> +       depends on I2C
>>>>> +       depends on PINCTRL
>>>>> +       help
>>>>> +         Support for the Cirrus Logic Madera platform audio SoC
>>>>> +         core functionality controlled via I2C.
>>>>> +
>>>>> +config MFD_MADERA_SPI
>>>>> +       bool "Cirrus Logic Madera codecs with SPI"
>>>>> +       select MFD_MADERA
>>>>> +       select REGMAP_SPI
>>>>> +       depends on SPI_MASTER
>>>>> +       depends on PINCTRL
>>>>> +       help
>>>>> +         Support for the Cirrus Logic Madera platform audio SoC
>>>>> +         core functionality controlled via SPI.
>>>>
>>>>
>>>>
>>>> Why do the I2C and SPI subdrivers depend on PINCTRL?
>>>>
>>>> They sure don't seem to be using any pinctrl-specific APIs.
>>>>
>>>
>>> They require PINCTRL even if they don't call any functions on it because
>>> the
>>> chip won't work correctly if there isn't a PINCTRL driver to apply the
>>> correct pinmux configuration.
>>
>>
>> Apply the configuration to what? Sorry I don't get it.
>>
>> You can't be referring to the internal pin controller of the Madera, since
>
> Yes I am

You are saying that the I2C and SPI interface to the Madera codec
depends on pin control.

It does not.

You can most certainly talk I2C and SPI to the coded without any
pin control. Probably the MFD driver can come up without it.

If what you want is unconditional pin control enabled for this circuit,
then have MFD_MADERA select PINCTRL.

>> that has to come up before its pin controller can even be communicated
>> with.
>
>
> So?
>
> The MFD driver powers up the chip before registering child drivers.

Including the pin controller. You just confirmed what I said: the
I2C and SPI interfaces do not require pin control to talk to the
chip.

> Also that's not entirely relevant, the pinctrl settings can still be written
> with the chip off because they will go into the regmap cache and be applied
> when the chip is next resumed.

You still have the dependencies wrong.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ