Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2359274rdh; Tue, 26 Sep 2023 23:20:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF3E8kir1k+948bjXp927Sfvy6pUGkqGC3BxQb2xwPyHj5tss+8uKFP/VEjDRsCWRJ1pK5R X-Received: by 2002:a05:6902:544:b0:d7e:44de:1c1 with SMTP id z4-20020a056902054400b00d7e44de01c1mr1177360ybs.14.1695795634923; Tue, 26 Sep 2023 23:20:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695795634; cv=none; d=google.com; s=arc-20160816; b=i9+4KXM16fmoDabfujZOsKXjuM/vtExhpfOW2gwTZibWfTh6c8fugXDG76TnbtxiAR tOfUaQ4wQjkXKXyqHL6rxNym1al4d4XNFogENWD5riDxO+F1haHdNiE83M0qJSrJ7OzV z/xyoZQZvC4H5+4f0wkZ5Y50ukRfkiukm/GmL4tVxpOLd41Va/wkDQluzQS6Bk/K7ihg 9or9/b7fKACutvfEV0vX77kWq+f4HCLbAxcgVZ72VnjFde4r+63qZefiHk1i6wzRUWBs jRGdcwKyFr4uuPHbrme+9VmM8okrvXxgjDN85C8G3uxwVwZ2UOTXsrIK99wI7l0M76Ww b/Zg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=nZysiqfTQ6hkM6jDfZN72nc6S9wN6Tq8p5sHukAaays=; fh=z7xhp4NjEFteykLnVlhmd44GPb7Y8u0V5VxOmWKCS4Y=; b=D9HnH3I0awiKKgQwYCTctPigG+XjI6HiDVrr93sQgf/vlc2TmAcBErbkPZBJmdnC/I 2tJ4Cc3fRjuq6KTDL+gnVPJgXbKVJC4vg8LYtiEF3F6je7nfBRY8p/59asugRT/96mmB GTl/LMppnyOH9x3NO1J8kxFsLUM1fAo/cih4D/mKXNRhFPX6Zd6VJaVAl+RdiURHz62r tQD5P/ypDrPYoqrkdWTMrDdekJ3gEoLYcsk9+3sBl9+JjiIQ9L64Wcj8XLDq9xhqejd8 O7AGsx/u+Nxsv1uDsB3Dn9J6Rq1ZSLFBTvUyQbslrR/xo2Ecw3ZCiqx8/OLFg9580Mc2 GtDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="bTD/lTus"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id r9-20020a634409000000b005694492c259si14571739pga.282.2023.09.26.23.20.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 23:20:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="bTD/lTus"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E17E68033375; Tue, 26 Sep 2023 12:44:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232712AbjIZToE (ORCPT + 99 others); Tue, 26 Sep 2023 15:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232241AbjIZToD (ORCPT ); Tue, 26 Sep 2023 15:44:03 -0400 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B3B0121; Tue, 26 Sep 2023 12:43:57 -0700 (PDT) Received: by mail-il1-x12d.google.com with SMTP id e9e14a558f8ab-3512f905f6cso20474435ab.3; Tue, 26 Sep 2023 12:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695757436; x=1696362236; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=nZysiqfTQ6hkM6jDfZN72nc6S9wN6Tq8p5sHukAaays=; b=bTD/lTusib18TTJMRirapJTG1KrX81Cqunib68bZufBD+oYt3fmw0pxZIUoyBWYNwA F0Sd2J0T53GOrpyG7//JCqPTd9YR2mq9SVNRAUUl7Xwfv4VcwKdO45lmpf1Ya/6s3fOw IuKIxbzKW+Qg9MblAFZLN8tpdcDoNU67nXgPWxg+HOtXc1WzsBo07aNn3ov9mzRNHYdN Bcvl0uO+DwHWUfqE0geykWpuMtVH8Iqtj8+Nt+Nozo64/gPnBxJGVScHl3kxvDvn6Y+W 0TrvMwvN+z5MRZ7NQ+MiulPzfj9QSgj1y+ur7u2Aql1QcxeZYK8aXywt8ifL4QY6s7+T xa8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695757436; x=1696362236; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nZysiqfTQ6hkM6jDfZN72nc6S9wN6Tq8p5sHukAaays=; b=AnMk5UKZJB9q+KsFcVyXOqcQZ7uXZzBE7tQLvEEmVo/H9n4Rx40ibqP67yJxwXb1Dg c9TAlNgTv8AKaaI+8kxEPvO1Q+NkISHonI4HA6mnMSuRiN7Zob7Iqv6rNLc8DoycKAzS UfkX+wjOmdBkdxJo8iVHZ0o7/3OUs6M1Y59ioUeycsM037+aWwVcd8xGyzffkf+ghnyI 3HkuZ+mh0xbO7z6wAVkabKXj+0WmZkDDTPJpMr/1OeuUqFavagDjG2LZUTXYJdGi6lk0 JPIeDF98NMrJ0jBSOowM9kHbwcySVaNqizYmdx2XK35AdXqaTwCruu/1mGZQ1ySf9xOT 34Kw== X-Gm-Message-State: AOJu0YwnPU+NABNhTGvHoW/Ft30iNds60DmgOpGbEradAy4NDwiv0fdm 4pHoqsn82mxPFSCExgTY5AEoBrEkB+E= X-Received: by 2002:a05:6e02:1bcb:b0:351:59db:a215 with SMTP id x11-20020a056e021bcb00b0035159dba215mr2132024ilv.18.1695757436524; Tue, 26 Sep 2023 12:43:56 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id k1-20020a02c641000000b0042b09036e5fsm3585824jan.175.2023.09.26.12.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 12:43:55 -0700 (PDT) Sender: Guenter Roeck Date: Tue, 26 Sep 2023 12:43:54 -0700 From: Guenter Roeck To: Mark Brown Cc: Naresh Solanki , zev@bewilderbeest.net, Liam Girdwood , Jean Delvare , linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Subject: Re: [PATCH v4] regulator (max5970): Add hwmon support Message-ID: References: <20230919054824.3368656-1-naresh.solanki@9elements.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 12:44:12 -0700 (PDT) On Tue, Sep 26, 2023 at 05:28:15PM +0200, Mark Brown wrote: > On Tue, Sep 19, 2023 at 07:48:23AM +0200, Naresh Solanki wrote: > > Utilize the integrated 10-bit ADC in Max5970/Max5978 to enable voltage > > and current monitoring. This feature is seamlessly integrated through > > the hwmon subsystem. > > Guenter, are you OK with the hwmon side of this? Sorry, I lost track. Not really; see my response to the patch. I think the memory allocation in that driver is a bit too complicated. It trades simplicity for minor memory savings, and even those savings are questionable. It would have been much easier and simpler to just add a two-element regulator_dev array to struct max5970_regulator and live with the "lost" memory if only one of them is used. I suspect that would have consumed less memory and code overall. Guenter