From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44580C636D3 for ; Tue, 31 Jan 2023 13:32:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232217AbjAaNcW (ORCPT ); Tue, 31 Jan 2023 08:32:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232231AbjAaNcS (ORCPT ); Tue, 31 Jan 2023 08:32:18 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 557064860E; Tue, 31 Jan 2023 05:32:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E70E261512; Tue, 31 Jan 2023 13:32:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D43FC433D2; Tue, 31 Jan 2023 13:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675171936; bh=zluzqNhEDMREcE7HOdEzAROjhz7qIrAFoLUueku9epg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EqldAqGluycuPltb9QjJTewitzBFRIqBWPBUXjM7TI8Hk9tvRpmW0bNiUjRshltgn j4VOxKyfNdLtfLTcwsVTPquPF9zI1OB7cOHrNMuWBLNpf0jPlDnwxr/Q8S/GRwkEab +JpRH8Vuy6dERNa+r94kXD4NZFumvnDpLYQylzTntfsGHE0LJ+QNNomBC78h8a2jd3 Lwm1NMWbUVHnoGmZRZI0+KN9gPn/JftaylokInYnahWk5A1ARfR7EuZn3dQy239QPg DRTPTA3gabSXqUL6ZwonHCuA2k+4xiYxjfjC1Na/k+Ykv6dMZuFxeGjjmuGZF/Sp32 pxa1nHcmXlPrA== Date: Tue, 31 Jan 2023 13:32:09 +0000 From: Mark Brown To: "Sahin, Okan" Cc: Andy Shevchenko , Lee Jones , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Jonathan Cameron , Lars-Peter Clausen , ChiYuan Huang , "Bolboaca, Ramona" , Caleb Connolly , William Breathitt Gray , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-iio@vger.kernel.org" Subject: Re: [PATCH v3 3/5] drivers: regulator: Add ADI MAX77541/MAX77540 Regulator Support Message-ID: References: <20230118063822.14521-1-okan.sahin@analog.com> <20230118063822.14521-4-okan.sahin@analog.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SyVB6RxR1IPYQ5gk" Content-Disposition: inline In-Reply-To: X-Cookie: MS-DOS must die! Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --SyVB6RxR1IPYQ5gk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jan 31, 2023 at 01:23:33PM +0000, Sahin, Okan wrote: > Andy Shevchenko wrote: > >> static const struct of_device_id max77541_regulator_of_id[] = { > >> { .compatible = "adi,max77540-regulator", }, > >> { .compatible = "adi,max77541-regulator", }, > >> { /* sentinel */ } > >> }; > >> MODULE_DEVICE_TABLE(of, max77541_regulator_of_id); > >> What do you think? > >If you have got all necessary data from the upper layer, why do you need to have > >an ID table here? I'm not sure I understand how this OF ID table works in this > >case. > I added it since there is regulator node in device tree. With the help > of devm_regulator_register(..), driver takes parameters of regulator > node. I also used id to select and to initialize regulator descriptors > which are chip specific. So far there is no comment about OF ID table > so I kept it. I thought I need to add both of id table and platform id > table as name matching is required to initialize platform device from > mfd. You probably shouldn't have compatibles for subdevices of a MFD unless it's some reusable IP that'll appear elsewhere, especially for something like the regulators where grouping them all into a single device is very Linux specific. --SyVB6RxR1IPYQ5gk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmPZGFgACgkQJNaLcl1U h9AMsQf9F35rB6oz1Aj0FUXAVJYnE1F/r7OWDi89yHeoLbiwjYXUtwpxzxzJoe0a uCfU/5+eH3AnL0gvqSb+6930Oieh7Bdoq38dW/GYORr5h+KZrZXb6cPPrAV0L/Uv o4mkVKb0EqubUCddiA6uTdf5c+1fWEvgyhk8C4sJJCiKBO2mKbu3RDrF/bSvgLPY dsz1VFXmBNPRl0/aEQPXVWI/kQ7oi6OpFku+p/G3cMRdKwP2i6M/iMmjPRedP68K RffMWc02z+qOWCdRrzp4U4KWoTaASVuWzqWbaqodHNKjB1M4g4dLh9hrZ798o2Ea roefahQsaxhBe0hg38uCJ3DBQoBOhg== =jgfu -----END PGP SIGNATURE----- --SyVB6RxR1IPYQ5gk--