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 EB775C001DE for ; Mon, 31 Jul 2023 07:37:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=MRKLwu9xWFzI5krCrEihC3WRkNL39bEwuFno1XqnRBo=; b=HMNaTA71t12mH2 s52mLNCwgGoCHTTO8YD892bfZrfIfPgl+ZikbsX37MUQNJDCkTqcmlKk/U0mS4iFNeT4Z885H2oTZ bSF6C7wev8+Qosd0ldGYWWHOPT9Igxy2RDguocmlEDI5HKK3DDE0g93mHZ2/lMMqxAH83Svmmx/RB 5xpCtelyb/+J9gLBC5+u+Zcbg6vb31HxSgIDF/LAAlEcMJpbYuoT/JRGcXuy0//VhQoJu36oYpmaB l0N7hZuzs53Q3r2q3mv7p7WYn8LczbhYAwFkIesAQEMsIf5OYWLTAQAvKegn7GnTDSQ70cddI3+P1 EAhUQwq4ehDG/3USZ0vw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qQNSQ-00EKsb-2Y; Mon, 31 Jul 2023 07:36:46 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qQNSN-00EKrK-2r for linux-arm-kernel@lists.infradead.org; Mon, 31 Jul 2023 07:36:45 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fe2503e3easo3450374e87.2 for ; Mon, 31 Jul 2023 00:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690789001; x=1691393801; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Hzdhk0ebkmUYoCBKRbfkR1Q6pt7LGGJe4r7tXcUet/c=; b=iJ0JqDQ2ZTYnDGgCpqod//O7osZfnEJjrci3V2uPBJtWfFZPKvuqjiC91NbBXJyMVl q/tfgo0fxfA/G5Rdj1xuT5MaPIXBYLR/WIuYLQQlQN3Jz4WOagSn/vWncm6jOsge6fVc php93bVT/QUqXoFGMRePafILv6slXWUVnEztCdx+HBm709w8+Fq9IzrCUun7/N2JFnZQ wo6yXZhAJxRzfAGma2wpk3NMq0GES8wj7u6zXfaau3fi3V0/Fz4+oRQVVr/lIJIAUXX/ G7Dh6V+EncRp+g10/GVbWCBkA+m3XhVME5KGKW06+2GTdk+VMxrY9iIdf60ZzKySauJw 8m6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690789001; x=1691393801; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Hzdhk0ebkmUYoCBKRbfkR1Q6pt7LGGJe4r7tXcUet/c=; b=M7VyRCIEh4ZeepT0bHOu+GhWupoHUQHc69pqoZJYbIAjQJyh3HxiF5aHWt3wzjnySf AvBxqPayYSMiFoiBZ+K4La0VD1AGLGkI+2XThwPP2MCFJ2Jh8wKryAMMbrYHJCeeS0G7 CIWs2GLnrjhcowbOYn8XtDFdNmJet7DFUkp1R0KEb7QAND7LvNzilhrjFI8gUhKtfyhN meU9YNMCasAO6gimooyzaqwP5dBL8xOuVUr5KQD5QFB+UrIz/sdwJs5Hb3MYmpD9tjAl 196uuzwrbqyrqt2C7u/0h24ZjPLzsV0RfY5y4VmQJZLzpP32a1Yx3F56aOs+GeFFgxZS clEQ== X-Gm-Message-State: ABy/qLZggy+/H7EPdvmtRbCOEnWLNeLBYMxoczbscmNf52TZn8lwtyba +8i92b8oTV9xPJBGWn+7FA8= X-Google-Smtp-Source: APBJJlFY4kV6I1U+VYb6F6yeQbs+NqG/JlgJR0lPQ2BxzdrB+XmwhyTU9KMCEq1jauG5DKPopxvjFw== X-Received: by 2002:a05:6512:3b13:b0:4fb:cab9:ddf with SMTP id f19-20020a0565123b1300b004fbcab90ddfmr7209989lfv.57.1690789001106; Mon, 31 Jul 2023 00:36:41 -0700 (PDT) Received: from xeon.. ([188.163.112.48]) by smtp.gmail.com with ESMTPSA id m14-20020a056512014e00b004fe3229e584sm586898lfo.270.2023.07.31.00.36.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 00:36:40 -0700 (PDT) From: Svyatoslav Ryhel To: Iskren Chernev , Krzysztof Kozlowski , Marek Szyprowski , Matheus Castello , Sebastian Reichel , Rob Herring , Conor Dooley , Russell King , Alim Akhtar , Arnd Bergmann , Jernej Skrabec , Svyatoslav Ryhel , Claudiu Beznea , Stefan Hansson Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v3 0/4] Add optional properties to MAX17040 Date: Mon, 31 Jul 2023 10:36:09 +0300 Message-Id: <20230731073613.10394-1-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230731_003643_924874_D2212349 X-CRM114-Status: GOOD ( 14.13 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Extend properties supported by max17040 fuel gauge if it is accompanied by different devices. If max17040 is coupled with a charger, pass charger status since it should match and max17040 has no dedicated status detection ability. max17040_get_online can be reused for PRESENT property since if it is online it must be present. Finally, max17040 may be coupled with a dedicated thermal sensor which monitors battery temperature so lets add support for iio channel to match hw setup. With that said, the driver got dependency on CONFIG_IIO which was added to Kconfig. All defconfigs apart s5pv210_defconfig have IIO already enabled so only s5pv210_defconfig needed adjustment. --- Changes from v2: - documentation: fixed typo i2c0 > i2c - added dependency on CONFIG_IIO - enabled CONFIG_IIO for s5pv210_defconfig to avoid regressions (all other defconfigs which include max17040 already have IIO enabled) Changes from v1: - documentation: dropped monitored-battery and power-supplies (inherited from inclusion) - dropped passing charger health as battery health - dropped patch for simple battery cell support - switched iio_read_channel_raw to iio_read_channel_processed_scale - switched iio_channel_get to devm_iio_channel_get - re-organized implementation of temp channel (implemented in way *_get_optional functions usually act) --- Svyatoslav Ryhel (4): dt-bindings: power: supply: maxim,max17040: update properties power: max17040: pass status property from supplier power: max17040: get thermal data from adc if available ARM: configs: s5pv210_defconfig: enable IIO required by MAX17040 .../bindings/power/supply/maxim,max17040.yaml | 31 +++++++++++++++++++ arch/arm/configs/s5pv210_defconfig | 1 + drivers/power/supply/Kconfig | 2 +- drivers/power/supply/max17040_battery.c | 27 ++++++++++++++++ 4 files changed, 60 insertions(+), 1 deletion(-) -- 2.39.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel