Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp768388rwl; Wed, 29 Mar 2023 08:13:40 -0700 (PDT) X-Google-Smtp-Source: AKy350bqkbgcJcwWGV0SYn/Jw7wT+wD1b7C046nRIfwb47TQ5nY7u37b2YNhX/qouRMvl31Yqe+U X-Received: by 2002:aa7:d806:0:b0:501:d43e:d1e6 with SMTP id v6-20020aa7d806000000b00501d43ed1e6mr19848119edq.4.1680102820755; Wed, 29 Mar 2023 08:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680102820; cv=none; d=google.com; s=arc-20160816; b=TtglH7MmNWaYkOEocflv3Yqey84JVbJSMM5IGz8KM+Wz0fbXvazYElB4w823WOXoyr x4rmOnIRXisiTGOlZ/wO6cZCPfk7v6c05sYVZYss/Km0xE+OiF37PfGDX8f5x/Fj9oCV asEk8K6EF3Qb1UK8uAjYR1nAgrghndUVY98F6IltfIw8IzXVIjZ3XGppju8B8Tjst71j dysoyOgKTom5b0T+uHokTmxRh3sy7p1tCeks9CU9HLeahWjM0n5KlwaZGuA3WYeO8PLp DM6JHRej4zUFXJbBI+33z/KdxVVk069vWvSaJ2BGj9xVLqtkK97Xnax0yPpC7ePAdifu GLAQ== 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=TIICsGn80CykAsd5BR/eWfvozr5jUsxGnf61Ve1zj7Q=; b=YvZJfPHq2sQ5XEqMlHnkeMeNsLJp0v7qpGSxlNF9Rr0Oy6PdRK5evYTRc1/5dBYnVY QXd8RFghkDgi9rfNQs+0jCaPVSdmqoCSFWoQo2RpY3HbGYqekHKrbKf/ykSas/N0lQU0 p97eHnhgdWlG7OEBmAWFnpE9NoXVSZKlFAJkmxfSJfnceOzpvP9Lz4fkwHfIOPcp/P4v Fbo0m0QexXh6+7rI/F5Q1dU2MIZDwbG8ReFMv8G63cfuvDijQ9TJLAodHE9nVhmzaPUB nCHlEwu0OxKJmSdez//yTeF96nsPeQ4xfAXUwKA2ncN5Qn3Jnhv1nqjwOx8i8rbmGJFk 6yYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CZlNV5Jj; 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 c7-20020aa7df07000000b004c698b5018esi33454524edy.347.2023.03.29.08.13.16; Wed, 29 Mar 2023 08:13:40 -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=CZlNV5Jj; 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 S230317AbjC2O4t (ORCPT + 99 others); Wed, 29 Mar 2023 10:56:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjC2O4r (ORCPT ); Wed, 29 Mar 2023 10:56:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3BE712E; Wed, 29 Mar 2023 07:56:46 -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 ams.source.kernel.org (Postfix) with ESMTPS id 80B28B8235D; Wed, 29 Mar 2023 14:56:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81F10C433EF; Wed, 29 Mar 2023 14:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680101804; bh=FCJy/eYSZT7WLb3OmK/7JeXcs8+xQniddc7s7LZp8ko=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CZlNV5JjqH5js/0zQleguzsHeOZkCCPx4jL1M1Y+jBMvpkJ4pvL277nYQ+sGqk2qe 4SaOYNFvs/9Q1inf4qDJfx7hQm/4FWZBnQmLbmWFUT0wJMyIn4+rKAXCYtcjlQ9aU7 hxzUqHVtVqo/g8ej+ooE9wQEZLslhGn/LFd1FTmo7Sf3inqF9thLJG03Q5QP9aTTcA kXSEAnyKzL9TY/Byv0OpBztC1Dr/4gmr1gxviXXlcVI3HSXvpgxVqXW9JpiNslorVN aYU/dPg06KkIG7Vp45x9JNFH3sEjPCwTKgqEm7NCm1aogS8QwJ58wrn5IJMJQ8mGC7 mt4VfNjupKBug== Date: Wed, 29 Mar 2023 15:56:36 +0100 From: Lee Jones To: Andy Shevchenko Cc: "Sahin, Okan" , 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: <20230329145636.GV2673958@google.com> References: <20230307112835.81886-1-okan.sahin@analog.com> <20230307112835.81886-6-okan.sahin@analog.com> <20230315175223.GI9667@google.com> <20230315175257.GJ9667@google.com> <20230329143615.GS2673958@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=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 Wed, 29 Mar 2023, Andy Shevchenko wrote: > On Wed, Mar 29, 2023 at 03:36:15PM +0100, Lee Jones wrote: > > On Tue, 28 Mar 2023, Sahin, Okan wrote: > > > >On Wed, 15 Mar 2023, Lee Jones wrote: > > > >> On Tue, 07 Mar 2023, Okan Sahin wrote: > > ... > > > > +static const struct i2c_device_id max77541_i2c_id[] = { > > > + { "max77540", (kernel_ulong_t)&chip[MAX77540] }, > > > + { "max77541", (kernel_ulong_t)&chip[MAX77541] }, > > > > Just 'MAX77540' is fine. > > I tend to disagree. > > There is an error prone approach esp. when we talk with some functions > that unifies OF/ACPI driver data retrieval with legacy ID tables. > In such a case the 0 from enum is hard to distinguish from NULL when > the driver data is not set or not found. On top of that the simple integer > in the legacy driver data will require additional code to be added in > the ->probe(). Use a !0 enum? The extra handling is expected and normal. -- Lee Jones [李琼斯]