Received: by 10.223.185.116 with SMTP id b49csp5243618wrg; Wed, 7 Mar 2018 08:34:16 -0800 (PST) X-Google-Smtp-Source: AG47ELssOjA62HCqncWymLpiY0JslJDGydxd6YO8dEliruHUzzrghMRWhdipxrPOmvcRFDbCutAS X-Received: by 10.98.237.12 with SMTP id u12mr23030266pfh.72.1520440456318; Wed, 07 Mar 2018 08:34:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520440456; cv=none; d=google.com; s=arc-20160816; b=USDvoMJ1wA7Ku9J9PIzcehQguBKcn/SkphuQFS+vvSiPOVdYNHo3XBYYs30/GYLxBI tcVNWFVaPgsouNVVAoKLkwDHDxFClA13BdIg2S1MyjM9xKkzTws1oGivBBH1/PMbWhhy HWUoRa5iUgQcuVRaBmpG/GpenmM4z+hWjQiBfLbRDfwPEL72xwJ/LDnj8gnTM61v6kMk ekVP8V0BZdbn8pm+X14vR435XaiUTH65NmS8x+TvkkrUW2qFQtbhZ/xtU2T5uC6A3p2I /PdBgPG4lAtNVyWPlLd1ErscENcrLJaXQMVeJOTAhfytlFbGnnRrxXH1LNhN6xO7Javg nRJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=KgFXgB6RpAhGVNTvmF49Ghx/vs1fUCHcR+5akF87x/c=; b=hAkL1HnTR0+IOlJR/Z+17PLz8tCoCGAV+67GvTp9Tx8JKk1T0AbxYHqWDzw+ragzrD svrALmu67nOvw57S2hOtL+8FgUg7WysbIfDJXnAFLw7RsRao+1xqUOsFM/r8n8t6CXag /fSM9z75yNEg0Y0P08GcYSBz3Ydej+2Katiy9dlLCxNhx6OzWX1LHCUtmaT3/RLMxTb9 dI9VMDgaxQoQarvV4hgza0DhpK4Y7yQ943VQzQqFsvXC11nicYNxwRk+T028gwgjGc5l 8iPkBZEjfP969H2g+zK2uYXGri7mgom08+0UBlbvA6a3wF9lDtZGF1K3BugOAgaWMREs 2YTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HQtVfIk9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r76si7539946pgr.794.2018.03.07.08.34.01; Wed, 07 Mar 2018 08:34:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HQtVfIk9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933774AbeCGQcU (ORCPT + 99 others); Wed, 7 Mar 2018 11:32:20 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37134 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933545AbeCGQcP (ORCPT ); Wed, 7 Mar 2018 11:32:15 -0500 Received: by mail-wm0-f67.google.com with SMTP id 139so5897868wmn.2 for ; Wed, 07 Mar 2018 08:32:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=KgFXgB6RpAhGVNTvmF49Ghx/vs1fUCHcR+5akF87x/c=; b=HQtVfIk9aHerBRBH51+YAmOadc/Q2QC3mzoTC+SbkCCdHHVnW5FlcgjBbsiPL8CNmP PqsQzMs+lSOfLMrxSsxGE7kB3zV4zSf49Yn5C/e4SlzSRd4j2u9DoUpzHfDnf1n8GoFu 4VbO9ZERAoRFZwvyNukSPj0+9M1ra359cKjK0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=KgFXgB6RpAhGVNTvmF49Ghx/vs1fUCHcR+5akF87x/c=; b=lVMmdI/GhXCkw9vzDNLZWYv2R6baRfHpv08PcjhwE9Jd5eDRfxlN7AKTMNXJPnj/dV v5sWI44edJslm+4ZKI41Ddcai7qVcmXeOO5nty5BSeyyo80CUVyklSvAggtEO1ioVax+ b1QIWmAlq0oWVMOOFyiLWaP3TSHU03dNtENU5GLRorOc33Pg5CxihMj6UV6Oi9etHmBB pzLi2JxZFvHMQNvkzsFi6f71WgVWLrjf9flNLimr9FsAN71SAF5BI0aErZhucg9LBMwB XhnLduQWwQPlgh+xrIMjKUd4LdTY/XZ+ZbaHy9ib5ji4611nSurMx5l2RtJbGT/Chptm 882w== X-Gm-Message-State: AElRT7EzV6C4sySsrCO4pQ4tGsQ/zdeYWBjyt8i5XUAnfqqCwwanuw6e XhiWZkCsKBwKTOpiuNkjRUqS7Q== X-Received: by 10.28.65.84 with SMTP id o81mr14626845wma.19.1520440333782; Wed, 07 Mar 2018 08:32:13 -0800 (PST) Received: from dell ([2.27.35.218]) by smtp.gmail.com with ESMTPSA id l22sm22117894wre.52.2018.03.07.08.32.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Mar 2018 08:32:12 -0800 (PST) Date: Wed, 7 Mar 2018 16:32:11 +0000 From: Lee Jones To: Sebastian Reichel Cc: Sebastian Reichel , Liam Girdwood , Mark Brown , Rob Herring , Tony Lindgren , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCHv5 3/5] mfd: motorola-cpcap: Add audio-codec support Message-ID: <20180307163211.rytfli5tb47yhtug@dell> References: <20180223200254.25685-1-sebastian.reichel@collabora.co.uk> <20180223200254.25685-4-sebastian.reichel@collabora.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180223200254.25685-4-sebastian.reichel@collabora.co.uk> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 23 Feb 2018, Sebastian Reichel wrote: > From: Sebastian Reichel > > Add support for the audio-codec node by converting from > devm_of_platform_populate() to devm_mfd_add_devices(). > > Signed-off-by: Sebastian Reichel > --- > drivers/mfd/motorola-cpcap.c | 51 +++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 50 insertions(+), 1 deletion(-) > > diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c > index d2cc1eabac05..f6c79a4ccb55 100644 > --- a/drivers/mfd/motorola-cpcap.c > +++ b/drivers/mfd/motorola-cpcap.c > @@ -18,6 +18,7 @@ > #include > #include > > +#include > #include > #include > > @@ -216,6 +217,53 @@ static const struct regmap_config cpcap_regmap_config = { > .val_format_endian = REGMAP_ENDIAN_LITTLE, > }; > > +static const struct mfd_cell cpcap_mfd_devices[] = { > + { > + .name = "cpcap_adc", > + .of_compatible = "motorola,mapphone-cpcap-adc", > + }, { > + .name = "cpcap_battery", > + .of_compatible = "motorola,cpcap-battery", > + }, { > + .name = "cpcap-charger", > + .of_compatible = "motorola,mapphone-cpcap-charger", > + }, { > + .name = "cpcap-regulator", > + .of_compatible = "motorola,mapphone-cpcap-regulator", > + }, { > + .name = "cpcap-rtc", > + .of_compatible = "motorola,cpcap-rtc", > + }, { > + .name = "cpcap-pwrbutton", > + .of_compatible = "motorola,cpcap-pwrbutton", > + }, { > + .name = "cpcap-usb-phy", > + .of_compatible = "motorola,mapphone-cpcap-usb-phy", > + }, { > + .name = "cpcap-led", > + .id = 0, > + .of_compatible = "motorola,cpcap-led-red", > + }, { > + .name = "cpcap-led", > + .id = 1, > + .of_compatible = "motorola,cpcap-led-green", > + }, { > + .name = "cpcap-led", > + .id = 2, > + .of_compatible = "motorola,cpcap-led-blue", > + }, { > + .name = "cpcap-led", > + .id = 3, > + .of_compatible = "motorola,cpcap-led-adl", > + }, { > + .name = "cpcap-led", > + .id = 4, > + .of_compatible = "motorola,cpcap-led-cp", > + }, { > + .name = "cpcap-codec", > + } > +}; With none of the entries containing platform_data /me wonders why you can't still use devm_of_platform_populate()? > static int cpcap_probe(struct spi_device *spi) > { > const struct of_device_id *match; > @@ -260,7 +308,8 @@ static int cpcap_probe(struct spi_device *spi) > if (ret) > return ret; > > - return devm_of_platform_populate(&cpcap->spi->dev); > + return devm_mfd_add_devices(&spi->dev, 0, cpcap_mfd_devices, > + ARRAY_SIZE(cpcap_mfd_devices), NULL, 0, NULL); > } > > static struct spi_driver cpcap_driver = { -- Lee Jones Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog