Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1878282ima; Thu, 25 Oct 2018 06:27:20 -0700 (PDT) X-Google-Smtp-Source: AJdET5fCWqZTwbbpKwpk3bgol1Q2YWKdBE+USpiEBYJ0eWezjwcIRah35i6xkTyhdwbaHtl5nkY8 X-Received: by 2002:a62:c42:: with SMTP id u63-v6mr1577022pfi.43.1540474040408; Thu, 25 Oct 2018 06:27:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540474040; cv=none; d=google.com; s=arc-20160816; b=eEIsk4zzg52u0k0euRhH5AHLc2fEhjcvvvyRxE3J9ArrlWIEh0k7qSpGk38cC/admE pXhajjq2/qRAUz2umhdoIvhVH/RvIcDK+BkoyhcvJj5cJsmuwbnSlxKIccsa1RkXJ0yz kRggK+uQ7SwHS9CezaggN9yVUdlpXdaeP4R5Tsyj0fjwyORXKqJUQsxSJh+WRWnFev+t SAM6pfbzijdR4snEPKbwOHqa6TrH4BHs6GPaRMp1xUZVbEUM4D1GvuPFGDg6LOwnbVSi XnlJB//SJCUV4c2JggwYm6FBFDJ2wFDYkY/zeErrhDEQddFNbuSCZ2WV30Wum3rGVGgf WkOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:user-agent:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from; bh=8Y1bVn1+mwHWFQzCZQK/22D1c+aqNusD2JoLllvVNbg=; b=PNaRz4xtf44Xj5MD3/NkQHT4gVrQI3JM45MdBr5mLFQjwd3srG+GfVqbShUZJ7HBWV ldudSuoUjvJSdUBWUv0ffKmNmzr3wt3YPotyrGErBavJxD0/x1yQmkEPRhyaKBD6XZEl JxXBGarlRRoZkT+1gXluUYcNHWpl7iXcZw/IP18JG6Dr9Hz7c/axBPmbB9s3PAP2O41t INYSLXa0yZaAxNt8hQkyni8ig/FDCSW4qtNst1ge8exUS1YD8PpSSz8OJxJjxamDVZvp JC5Nhl8Cc+iT1uVba4JtJi+isDcalIecVgyu9n7KtKPy/MhCfQA8Paen5tyLYDFBSHoL SPtg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t6-v6si7554891plq.275.2018.10.25.06.26.51; Thu, 25 Oct 2018 06:27:20 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727540AbeJYV4U convert rfc822-to-8bit (ORCPT + 99 others); Thu, 25 Oct 2018 17:56:20 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:48506 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727234AbeJYV4U (ORCPT ); Thu, 25 Oct 2018 17:56:20 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w9PDFYxl024912; Thu, 25 Oct 2018 15:23:10 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2nb80933hm-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 25 Oct 2018 15:23:10 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BEC2E31; Thu, 25 Oct 2018 13:23:08 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8A19D5096; Thu, 25 Oct 2018 13:23:08 +0000 (GMT) Received: from SFHDAG6NODE2.st.com (10.75.127.17) by SFHDAG6NODE1.st.com (10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 25 Oct 2018 15:23:08 +0200 Received: from SFHDAG6NODE2.st.com ([fe80::a56f:c186:bab7:13d6]) by SFHDAG6NODE2.st.com ([fe80::a56f:c186:bab7:13d6%20]) with mapi id 15.00.1347.000; Thu, 25 Oct 2018 15:23:08 +0200 From: Pascal PAILLET-LME To: Mark Brown CC: "dmitry.torokhov@gmail.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "lee.jones@linaro.org" , "lgirdwood@gmail.com" , "wim@linux-watchdog.org" , "linux@roeck-us.net" , "linux-input@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-watchdog@vger.kernel.org" , "benjamin.gaignard@linaro.org" , "eballetbo@gmail.com" Subject: Re: [PATCH v4 4/8] regulator: stpmic1: add stpmic1 regulator driver Thread-Topic: [PATCH v4 4/8] regulator: stpmic1: add stpmic1 regulator driver Thread-Index: AQHUZsFCff0rP/nvtUWEQ9H/MMA/OQ== Date: Thu, 25 Oct 2018 13:23:08 +0000 Message-ID: <5BD1C3BB.6060500@st.com> References: <1539853324-29051-1-git-send-email-p.paillet@st.com> <1539853324-29051-5-git-send-email-p.paillet@st.com> <20181019115015.GC5895@sirena.org.uk> <5BD06B96.3080809@st.com> <20181024131716.GQ2103@sirena.org.uk> In-Reply-To: <20181024131716.GQ2103@sirena.org.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.45] Content-Type: text/plain; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-25_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Mark, Le 10/24/2018 03:17 PM, Mark Brown a ?crit : > On Wed, Oct 24, 2018 at 12:54:46PM +0000, Pascal PAILLET-LME wrote: > >> I'm sorry, I'm not sure to understand. Would you prefer to not register >> regulators that >> are not described in the device-tree ? > No, I'm saying register all regulators regardless of if they are in the > device tree - you shouldn't be looking at the init data at all here, > just let the framework match them using of_match. I have reworked the code so that we don't touch any more to the init_data. the new loop to register the regulators is below: for (i = 0; i < ARRAY_SIZE(stpmic1_regulator_cfgs); i++) { ret = stpmic1_regulator_register(pdev, i, &stpmic1_matches[i], regul); if (ret < 0) return ret; regul++; } Each regulator is registered, even is it is not described in the device-tree. stpmic1_regulator_parse_dt() and stpmic1_regulator_init() are now merged inside stpmic1_regulator_register() function. Thank You, pascal