Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp716281rwl; Wed, 12 Apr 2023 03:08:02 -0700 (PDT) X-Google-Smtp-Source: AKy350bjwXBUqVyKR53XchqOeYZ+ZV0AWO5K7ZJZ+Pu6n0Tc4dgjsKQHNtWvCTsVc1Ay2si0Xxyi X-Received: by 2002:a05:6402:20f:b0:505:661:fdf2 with SMTP id t15-20020a056402020f00b005050661fdf2mr886996edv.23.1681294082207; Wed, 12 Apr 2023 03:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681294082; cv=none; d=google.com; s=arc-20160816; b=u+F/y4jY1unoE7qtFAET0ULzuR2wAhTrxv1rVQmQESKJSPuczT6hYXkSjOxd8IXHsp Bv1VplPQmcE+yXaFwInajD/bf4XTH2rA6SwY+rtAjf1jilxQhf8SEmwLiTv9oQMVD59o wwjD7O5TCFq7R5ACdFUHHlpjKbWQRbpEqBSsJm0JBvC/YJQKgFfhUmo1HMezhIqMg9wh RP5Tbsmuh4DCGqKHYwCoceTVVsXliugQ2YgJBL+qvOGf1Qy7+t4tzdwdVtO8dKPV9Qaz 7FXq0Z8pfbjseFaVwZ+FyCVlyP14h7BtvKq1oLF0JZtn2b8QsLyS9USEJNZIGncRr302 21Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=v+ja7mJb6qHHdiY6faMtZMz/6lagMgImkP/SQFvf00w=; b=mkIrNgghG+ITiOW1wrBxkzPIO2i+MPkpjUSvQGiH2M0OhQSupNplYh17ngwzlyim20 BeBvy3OFHDh9saeEoQzW8hW5qocB/yrA8pv9rdFFOF9wtLrn4i4i5cZd8R1h22xTX6fS cW0VV9HGCDC2HQj+aje4mMET7rZmKM0ue9rLqYPMi57RuZP3oxIUCCVlO85CE+ghCujf Zo6WHuHGAw0tfjq0XDgEPNAU3G/ydh1ow8PC5y+O+gx60IIC2yKTbaBLSSCqSsuZLiO9 88F14RHy55PgOs3SzmbBz+Wn8f5AKU8wYoXys+NKAnTcC5ARitgTWXyt1t0xZGIfUA1E bW/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g4Z9/965"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j5-20020aa7ca45000000b0050463d3eafesi13559989edt.640.2023.04.12.03.07.38; Wed, 12 Apr 2023 03:08:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g4Z9/965"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230291AbjDLKEU (ORCPT + 99 others); Wed, 12 Apr 2023 06:04:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbjDLKER (ORCPT ); Wed, 12 Apr 2023 06:04:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A8A37A9E; Wed, 12 Apr 2023 03:04:16 -0700 (PDT) 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 CACC063283; Wed, 12 Apr 2023 10:04:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29E94C4339B; Wed, 12 Apr 2023 10:04:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681293855; bh=OrehFqW8/NTBq41+buEdl7J1qPg50LFC9ahWXbWfHL8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g4Z9/965eaQPtuSLS4ih4Sbt0T0+A81oGGb8DSGiMqueah9K6KQNOL2IHfo37QeyP V6EQ41XvoDQ1YXrvyQFRdvIc7u1JlXXh3aKaPyR6PemQczLljoBRxhflyBqLodEtCb DR0JybIjy5f22YW/9LXebGSVI3EgpehVNmWdBvxlWfq8pkHAMuAvPdkGO8e7WocFa9 y9ib62FVyf99KyvgiZ+gstK94X9NV6JVdGjsVJwEXo8dWt5s3bJLv9L+zlcu+OnJep bsJZtWurhdbonr47xtnX7DXsiL/fJaMiz3ri81k9EQHoXv7rSHIw+gWF1vnxZBwtug KaRMmc1bEDmHw== Date: Wed, 12 Apr 2023 11:04:07 +0100 From: Lee Jones To: "Sahin, Okan" Cc: Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Jonathan Cameron , Lars-Peter Clausen , Cosmin Tanislav , Stephen Boyd , Caleb Connolly , Lad Prabhakar , "Bolboaca, Ramona" , ChiYuan Huang , "Tilki, Ibrahim" , William Breathitt Gray , Arnd Bergmann , ChiaEn Wu , Haibo Chen , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-iio@vger.kernel.org" Subject: Re: [PATCH v6 5/5] mfd: max77541: Add ADI MAX77541/MAX77540 PMIC Support Message-ID: <20230412100407.GA8371@google.com> References: <20230307112835.81886-6-okan.sahin@analog.com> <20230315175223.GI9667@google.com> <20230315175257.GJ9667@google.com> <20230329143615.GS2673958@google.com> <20230403140950.GF548901@google.com> <20230405133938.GD8371@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 09 Apr 2023, Sahin, Okan wrote: > >On Wed, 05 Apr 2023, Andy Shevchenko wrote: > > > >> On Mon, Apr 03, 2023 at 03:09:50PM +0100, Lee Jones wrote: > >> > On Mon, 03 Apr 2023, Sahin, Okan wrote: > >> > >> ... > >> > >> > >> > > In fact, one of the maintainers suggested assigning chip_info to data > >> > > instead of enumeration. Then I added chip_info and put devices into > >> > > sub-structure above. I will replace chip_info with id structure in max77541 > >> > > device structure, right? I will use enumeration for data as I will assign > >> > > it to id, and distinguish different devices. > >> > > >> > Yes, that's correct. Please remove chip_info altogether. > >> > >> Then it will provoke casting in the OF ID table which I believe is not what > >> we want. I would agree on your first suggestion to have a plain number in I²C > >> ID table, but I'm against it in OF and/or ACPI ID table. > > > >And I'm against passing MFD information through the OF/ACPI APIs. > > > >You can put through raw platform data or a device descriptor. > > > >Ref: git grep -A5 "struct of_device_id.*{" -- drivers/mfd > > > >-- > >Lee Jones [李琼斯] > > Hi Lee, > > Right now, as you suggested I rewrote code like below > For of_device_id, > . data = (void *)MAX77540, > .data = (void *)MAX77541, > For i2c_device_id, > .data = MAX77540, > .data = MAX77541 > I also rewrote other part as chip_info is excluded. I want to be sure before > sending new patch. > > Does it seem correct? This is one suitable method, yes. -- Lee Jones [李琼斯]