From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Fitzgerald Subject: Re: [PATCH v6 03/17] mfd: madera: Add common support for Cirrus Logic Madera codecs Date: Mon, 4 Dec 2017 09:47:00 +0000 Message-ID: References: <20171123171316.10868-1-rf@opensource.wolfsonmicro.com> <1eff5a38-cff3-449b-bda4-047f50a9f1d4@EX17.ad.cirrus.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Linus Walleij Cc: Alexandre Courbot , alsa-devel@alsa-project.org, Jason Cooper , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:WOLFSON MICROELECTRONICS DRIVERS" , "linux-kernel@vger.kernel.org" , Rob Herring , linux-gpio@vger.kernel.org, Mark Brown , Thomas Gleixner , Lee Jones , Charles Keepax , Nikesh Oswal List-Id: linux-gpio@vger.kernel.org On 02/12/17 12:10, Linus Walleij wrote: > On Wed, Nov 29, 2017 at 12:36 PM, Richard Fitzgerald > wrote: >> On 29/11/17 10:18, Linus Walleij wrote: >>> >>> On Thu, Nov 23, 2017 at 6:13 PM, Richard Fitzgerald >>> 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 > 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. 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. > > If you mean it is to apply the configuration to the system SoC where > this coded is connected, this is wrong. There may very well be systems > which have dedicated pins for the codec, atleast in theory. The fact > that your reference board needs this is not a universal requirement, > it should be set up in the machine-specific Kconfig for the reference > board in that case. > > Yours, > Linus Walleij > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752772AbdLDJrc (ORCPT ); Mon, 4 Dec 2017 04:47:32 -0500 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:55870 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752647AbdLDJrT (ORCPT ); Mon, 4 Dec 2017 04:47:19 -0500 Authentication-Results: ppops.net; spf=none smtp.mailfrom=rf@opensource.wolfsonmicro.com Subject: Re: [PATCH v6 03/17] mfd: madera: Add common support for Cirrus Logic Madera codecs To: Linus Walleij CC: Lee Jones , Mark Brown , Alexandre Courbot , Rob Herring , Thomas Gleixner , Jason Cooper , , "open list:WOLFSON MICROELECTRONICS DRIVERS" , , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , Charles Keepax , Nikesh Oswal References: <20171123171316.10868-1-rf@opensource.wolfsonmicro.com> <1eff5a38-cff3-449b-bda4-047f50a9f1d4@EX17.ad.cirrus.com> From: Richard Fitzgerald Date: Mon, 4 Dec 2017 09:47:00 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Message-ID: X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712040141 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/12/17 12:10, Linus Walleij wrote: > On Wed, Nov 29, 2017 at 12:36 PM, Richard Fitzgerald > wrote: >> On 29/11/17 10:18, Linus Walleij wrote: >>> >>> On Thu, Nov 23, 2017 at 6:13 PM, Richard Fitzgerald >>> 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 > 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. 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. > > If you mean it is to apply the configuration to the system SoC where > this coded is connected, this is wrong. There may very well be systems > which have dedicated pins for the codec, atleast in theory. The fact > that your reference board needs this is not a universal requirement, > it should be set up in the machine-specific Kconfig for the reference > board in that case. > > Yours, > Linus Walleij >