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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 219A1CA5FA1 for ; Mon, 28 Sep 2026 21:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mwQvTeNf1PFOWqJX6AW6JQAQxKZVMMKWGFfi7n1j4uE=; b=QIcI4pcuW9/o/QqVo3O3PzTUY+ w1oW3OcG+/92g/shvyR0VpUaZMQ9EKanNMhKOFYfEWUwTdtazyMjVmhetzse444YyjAX585FcxPGq TahPJ8d3VnJa9mHS+DyOL0cYu47AEMtGCNGWMCdsuTPIgrhKIBUFy4NliVN/xMuTCSj6DOBE6DfP8 zS3CI7p5+JkBd6wlv4VOTW7qHUsYI7Me/7DKFf6MUqklMKlD1I0gJzaLf6JPTDDuZ4ud7P7+csDE4 E5lYygFrzqvJTCyglCKz1Q07GjpiYz4QodNnI4hlIOir5zuRuS5+B/KXA8w7EkfRcwVEGhYYFRb8A /os09m8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xBJEU-00000001huQ-2I0b; Mon, 28 Sep 2026 21:49:58 +0000 Received: from mgamail.intel.com ([198.175.65.19]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xBJES-00000001htf-3JcT; Mon, 28 Sep 2026 21:49:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1790632197; x=1822168197; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3A2k4B1MyyYGlKtnyMek8DNyKiLznOjV5xluhGSwX50=; b=KzoB7SWmvkclxeO9BF6RYEVP1a2ZSx0txCUWobXDZbhurGj42WqLrlqA Wz9L4hLINisbEV7tNEscyhwOTX5k5wIDI+mCZz57ZnAFGdV5spGNNwWDJ mOhp5x5vpEHB9eaanHce+ZwKLWqFV4321em9tzi25wQVkv+YikOKEZGz5 NdPHsVCtiNfgn6F5yuYm8arXZwHaW8/tQxoVOwi6bd39Yv5I3r/QG5TxQ dm9cx+16ZYWrSKL9pvA1Z56aSEoiSbK8qiRQ5a19jrcbI0P2KePgE1zBn DIFogY1fMd1x0Q+qfj7qq4FkpJ22yjkbcmzgJDR0sgOOB0l0BQWsjsVNw A==; X-CSE-ConnectionGUID: 4b++DzpPTQuhiVHUcjEzyA== X-CSE-MsgGUID: kofwAIpcSge3nMUUzdjHzw== X-IronPort-AV: E=McAfee;i="6800,10657,11919"; a="90295163" X-IronPort-AV: E=Sophos;i="6.27,129,1787036400"; d="scan'208";a="90295163" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2026 14:49:56 -0700 X-CSE-ConnectionGUID: agS7fjZAS8yA+UD6RGr5mQ== X-CSE-MsgGUID: LfT05oMtSsy/cY302rRjFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,129,1787036400"; d="scan'208";a="278380629" Received: from conormcd-mobl2.ger.corp.intel.com (HELO localhost) ([10.245.244.42]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2026 14:49:52 -0700 Date: Tue, 29 Sep 2026 00:49:49 +0300 From: Andy Shevchenko To: Ryan Brue Cc: Jonathan Cameron , David Lechner , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Lee Jones , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, mfd@lists.linux.dev, Roman Vivchar , Luca Leonardo Scorcia Subject: Re: [PATCH v4 2/3] iio: adc: mt6397-auxadc: add mt6397 PMIC AUXADC driver Message-ID: References: <20260928-rbrue-suez-upstreaming-mt6397-auxadc-v4-0-23533a0d30e3@gmail.com> <20260928-rbrue-suez-upstreaming-mt6397-auxadc-v4-2-23533a0d30e3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260928-rbrue-suez-upstreaming-mt6397-auxadc-v4-2-23533a0d30e3@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260928_144956_876504_BA691E0C X-CRM114-Status: GOOD ( 17.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 28, 2026 at 03:57:20PM -0500, Ryan Brue wrote: > The mt6397 AUXADC is a 10-bit ADC behind the SoC's PMIC wrapper. On boards > built around this PMIC it is the only way to read the battery: the SoC's > AUXADC is wired to board thermistors and the charger ICs these boards use > have no ADC of their own. > > Add a driver exposing the battery voltage and battery temperature > channels. Only those two are described, so a channel ID in the device tree > indexes the driver's channel array rather than the PMIC's channel number, > as mt6323-auxadc does. The ready bit lives in a channel's raw result > register, but the value comes from the chip's factory-calibrated copy. > > The battery voltage is measured through ISENSE, because a board with a > switching charger in the power path leaves BATSNS on the charger's system > rail instead of on the pack. The thermistor only reads correctly with the > PMIC's battery-detect bias and input buffer enabled, which take 20 ms to > settle. Both are switched back off afterwards. > > Reads average sixteen conversions in software; the chip's sample > accumulator makes no measurable difference at any setting, so it is left > at one sample per conversion. Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko