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 7597BE71080 for ; Sat, 7 Sep 2024 13:31:39 +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:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AVyHj+kHeytN5f6467hurBl2GF8UUhscK4VWCXzgi7Y=; b=E5pSVOvSCa1fIF+47t7uiYe6eg Vxr0bcA1mN4EvJZ0u4JmW9b2hueLtSf877Jzsq8rdjFpP5S0URqQcgAoJabYG6G5iSqnUvAIRyhux 0rslYzyu/CADmlSxKSvVldRwox0agAvAQjZ/nL4iwx1PUUa1WAmBX61kSJUl9Ld80h7swpiQ5SBZx bUS8zufKU19VKyo4y5oJyZA94DjxuyOCakXNOowGHOu19RvZgxf3z98nSFx1HTF6zEV7qA26FZDEc n3abfmpxfHA/IIRpwpdirXsJWXrVic4fEjT7OaXYm31wUd4YmqagQjIx4plQlrCRSxFxtMrEwWGHC AeGKY4/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smvXD-0000000F4me-15k7; Sat, 07 Sep 2024 13:31:27 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smvWB-0000000F4ik-2n9E for linux-arm-kernel@lists.infradead.org; Sat, 07 Sep 2024 13:30:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E66665C4606; Sat, 7 Sep 2024 13:30:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87618C4CEC2; Sat, 7 Sep 2024 13:30:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725715821; bh=aY18vlW/L4kb/gRa6VcsduMXnD5MdEnK7MC9k8KzS2M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=D3oiQbe2QgRd3H0U4NZ1b7p7SZtUJeQAxP7E53oY4EVY44Q/yf1BHh3URlksXF8h2 h27FzkWsjkaDXQMfqd6qISAMjG1VzPU8XO6cwsnAD4sCPhPj69SgGKFNAQrHPDVbFx azd73H7wzlJqUuDDNhpGu3CPlGy9XyMNJBKASgKmJ+LBKXl1cGXLUtaayMm4h9Iukk JrjdMwO/xcCWdmg+44vy6Bj9oPdq+hidsQv2KAiUDMW33rGxvYdYbbfWnP0+mCuj4D xgXwUx4g+FVhGY5gTPDknXab7iXRLbHSw/QGLYg7dlScYxNe53hPWUk6K8Q+6LEV8f a/hHcK3/mcsCg== Date: Sat, 7 Sep 2024 14:30:11 +0100 From: Jonathan Cameron To: Chris Morgan Cc: linux-sunxi@lists.linux.dev, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, quentin.schulz@free-electrons.com, mripard@kernel.org, tgamblin@baylibre.com, aidanmacdonald.0x0@gmail.com, u.kleine-koenig@pengutronix.de, lee@kernel.org, samuel@sholland.org, jernej.skrabec@gmail.com, sre@kernel.org, wens@csie.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, lars@metafoo.de, jonathan.cameron@huawei.com, Chris Morgan Subject: Re: [PATCH V4 00/15] Add Battery and USB Supply for AXP717 Message-ID: <20240907143011.56ab068f@jic23-huawei> In-Reply-To: <20240821215456.962564-1-macroalpha82@gmail.com> References: <20240821215456.962564-1-macroalpha82@gmail.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240907_063023_837207_C7990BD8 X-CRM114-Status: GOOD ( 26.67 ) 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 Wed, 21 Aug 2024 16:54:41 -0500 Chris Morgan wrote: > From: Chris Morgan > > Add support for monitoring the USB charger and battery charger on the > AXP717 PMIC. This required some driver refactoring of the axp20x USB > and battery charger as the AXP717 is somewhat different but can still > benefit from some common elements. > > Note that as of now the charging current now value may be incorrect as > the scale and offsets were not documented in the datasheet. I suspect > the scale is 1 and the offset is somewhere around 450mA though. Applied 1, 8 and 12 to the IIO togreg branch. I was waiting for some mess related to my tree to pan out upstream. Unfortunately that leaves us rather tight on timing for the coming merge window but hopefully Greg will take a last minute pull request for char-misc. Jonathan > > Changes from V3: > - Remove accidental AXP717_BOOST regulator in header file, as it is > not part of this patch series. > - Add an absolute min/max constraint for input-current-limit-microamp > in device tree documentation. > - Correct an issue found by kernel test robot by > explicitly adding linux/bitfield.h include. Details here: > https://lore.kernel.org/oe-kbuild-all/202408201228.Hee4eSYl-lkp@intel.com/ > > Changes from V2: > - Added constraints for input-current-limit-microamp constraints for > x-powers,axp20x-usb-power-supply.yaml. > - Used FIELD_GET() and removed unnecessary -EINVAL per comments from > Jonathan Cameron. > > Changes from V1: > - Refactored against mainline to remove BOOST pre-requisite. > - Corrected commit subjects for DT bindings. > - Split refactoring and AXP717 support into different patches. > - Added IRQ for VBUS over voltage. There appears to be a bug > with the VBUS fault IRQ because it is assigned IRQ num 0. > - Corrected battery driver to report POWER_SUPPLY_PROP_VOLTAGE_MIN > and POWER_SUPPLY_PROP_VOLTAGE_MAX instead of *_DESIGN. > > > Chris Morgan (15): > iio: adc: axp20x_adc: Add adc_en1 and adc_en2 to axp_data > power: supply: axp20x_battery: Remove design from min and max voltage > power: supply: axp20x_battery: Make iio and battery config per device > power: supply: axp20x_usb_power: Make VBUS and IIO config per device > dt-bindings: power: supply: axp20x: Add input-current-limit-microamp > power: supply: axp20x_usb_power: add input-current-limit-microamp > dt-bindings: power: supply: axp20x-battery: Add monitored-battery > dt-bindings: iio: adc: Add AXP717 compatible > dt-bindings: power: supply: axp20x: Add AXP717 compatible > dt-bindings: power: supply: axp20x: Add AXP717 compatible > mfd: axp20x: Add ADC, BAT, and USB cells for AXP717 > iio: adc: axp20x_adc: add support for AXP717 ADC > power: supply: axp20x_usb_power: Add support for AXP717 > power: supply: axp20x_battery: add support for AXP717 > arm64: dts: allwinner: h700: Add charger for Anbernic RG35XX > > .../bindings/iio/adc/x-powers,axp209-adc.yaml | 12 + > .../x-powers,axp20x-battery-power-supply.yaml | 7 + > .../x-powers,axp20x-usb-power-supply.yaml | 72 ++- > .../sun50i-h700-anbernic-rg35xx-2024.dts | 21 + > drivers/iio/adc/axp20x_adc.c | 182 +++++- > drivers/mfd/axp20x.c | 25 +- > drivers/power/supply/axp20x_battery.c | 591 ++++++++++++++++-- > drivers/power/supply/axp20x_usb_power.c | 353 ++++++++++- > include/linux/mfd/axp20x.h | 26 + > 9 files changed, 1188 insertions(+), 101 deletions(-) >