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 78E9AC38142 for ; Tue, 31 Jan 2023 12:27:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231731AbjAaM1K (ORCPT ); Tue, 31 Jan 2023 07:27:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbjAaM1I (ORCPT ); Tue, 31 Jan 2023 07:27:08 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FF0C3A90; Tue, 31 Jan 2023 04:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675168027; x=1706704027; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=pm+2Xp9G75JHYb1LMbl4t3W66mzSj4xDQZ/8FSjmgMw=; b=GESqnCWahHJhpR5ZJWD9wqpAViL4gjusMmBSNxvvtuTzmHhnJeafylhN PZJwWJrRad9C9rgAHnjSXXqHLVJrYxbk77pS46NKh7c7ykVds5Kp28If7 UWH+6vfg7vNcQbeJzGD8aR7PxyEo2oJyDTR8x6qXYxQ0UFDrwLavOSgJ1 eiWYoyWB7Y6wcZ4LYDe8ZLacZIqzftkqib/h4jljtZ1UZ0LC+2MqsB4jU r4qckRau/6IuHQJZlD+zvLBZU3lobjtt4VhxVNigdSNVsD345nfKuXRjm YlmtOR+OaVxTuH3QbCXeM0o/05LVSC90ZiRmWua59WO8w4IHLIUBAsMrg A==; X-IronPort-AV: E=McAfee;i="6500,9779,10606"; a="325522679" X-IronPort-AV: E=Sophos;i="5.97,261,1669104000"; d="scan'208";a="325522679" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2023 04:27:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10606"; a="733091691" X-IronPort-AV: E=Sophos;i="5.97,261,1669104000"; d="scan'208";a="733091691" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga004.fm.intel.com with ESMTP; 31 Jan 2023 04:27:01 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pMpj0-000FHX-2y; Tue, 31 Jan 2023 14:26:58 +0200 Date: Tue, 31 Jan 2023 14:26:58 +0200 From: Andy Shevchenko To: "Sahin, Okan" Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 31, 2023 at 09:27:48AM +0000, Sahin, Okan wrote: First of all, please do avoid top-posting. > Sorry for second question. I do not want to bother you, but I realized that I > need to be sure about driver_data before sending new patch. You said that you > need to use pointers directly for driver_data then I fixed that part in mfd, > but I do not need or use driver_data in regulator since chip_id comes from > mfd device so I think using like below should be enough for my > implementation. > > static const struct platform_device_id max77541_regulator_platform_id[] = { > { "max77540-regulator", }, > { "max77541-regulator", }, > { /* sentinel */ } > }; > MODULE_DEVICE_TABLE(platform, max77541_regulator_platform_id); > > 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. -- With Best Regards, Andy Shevchenko