From patchwork Mon Jul 31 07:36:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 128511 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1901426vqg; Mon, 31 Jul 2023 02:45:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlHzSFBQU6H/t75ORrs6JzZ0h40bTZ7V554TJpfptoWGGsPQW7MD08orhdOPERg+vhysTt5N X-Received: by 2002:a17:902:d4c3:b0:1b8:b3f0:3d57 with SMTP id o3-20020a170902d4c300b001b8b3f03d57mr10276467plg.31.1690796742080; Mon, 31 Jul 2023 02:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690796742; cv=none; d=google.com; s=arc-20160816; b=R/zvCu4dTTCSLsLVf9BP/F/ABtX6XJOk0KpgugmNQ10kR9In33VWX3ToVX0H+nY58x 3k42dRT63PnrtTZi2wa2No0zcqmSoan8MPqbALpI5ucq0fpw/tg4bEdMvVe1hwSD3u/b L1TDZiDrwcNP+/2X08gXiMzW8r/69/PYAYfJefhhfLqCAfBkbQzq1VPGyaxLkUODMy5j tm4OYTvNWVrQH3Xd4lBWekv5C93mSCvC6cNbR8//0HfNZBekns6n5Yt2TIyejJEGvdP1 1BotzV/5X6o2JboDJpyiy4Q4T/zz8OP5D2lhZOfZXZ+GxiEaEICUCg6iMB1JubChTydd OoSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ceNIGOPbsyHjJmTOQVPb/Eaqj2M4+lsBZ1EpEQosohQ=; fh=BYYxYocqtJiC/MlqHuXF0UZXhvoN/4a0Xtp0KZwYhQ0=; b=E5J8YlPLZr4hQqbtSpJFobdiGcLs/Il8w4S+mm+v3Gz/L3kT2ppddXqy6kTzplJubT gDeIy1L18eXauvA8OETm8rGS8jyLIyhQHdNY2HjefdHmFj1xdcDeiA3KTMilvevknsRM Q3MZ5RTo8tXA+h8gHifI6n1rAXqqF9Hg0pmLhThDSipDwju8Ape2M/4py/5KFAse300Q h2DhPMH/XBCcG1JcNhuB1Tukb3tnRM+WQJ8WD1xq2abkTQZbBwzJDxde6e/YN2LUDUTD n+VarfqSOeK/4Nol7/fep7rll5Xrax4KJ1gl3jLT6CFAWPlhutzcPeixpVgD6IM9hDyk rHqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="DJ/sDPnz"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lg5-20020a170902fb8500b001b8a69660c1si6896676plb.88.2023.07.31.02.45.28; Mon, 31 Jul 2023 02:45:42 -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=@gmail.com header.s=20221208 header.b="DJ/sDPnz"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231126AbjGaHhC (ORCPT + 99 others); Mon, 31 Jul 2023 03:37:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230172AbjGaHgp (ORCPT ); Mon, 31 Jul 2023 03:36:45 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68E7B12A; Mon, 31 Jul 2023 00:36:44 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4fb7373dd35so6717179e87.1; Mon, 31 Jul 2023 00:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690789003; x=1691393803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ceNIGOPbsyHjJmTOQVPb/Eaqj2M4+lsBZ1EpEQosohQ=; b=DJ/sDPnzy3nCJlSj7g4OH8HbDEsuOk4b9KqLMo9yBq+CovS27mK9oR9qNWdrDczEPu ygntwmf3IlgUCzaE9DJOjSuJg4oGyCpPC14Scc1yCdoO6xTlbP731f3XJrm1dGhkcT1m GJ8zgBfZBbV8Lb8LZd1srCF/dhs4PJmXIpQPS0YGcpTW6+vaYnSE4Mj9hEd6dfjAHrVg TaXIX5I/pWdRk5KFexNYIg8XPHDC7/guX19mvITnbvbMyEMMM4Hk4VoB1Poo1WzQi//A wkle7jx8kJCzMht6G5Z67g7dWU0+RZ74txzTlKjLQ4+Kj8KadW5gQXHwCaVGEorZ2JJp hf9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690789003; x=1691393803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ceNIGOPbsyHjJmTOQVPb/Eaqj2M4+lsBZ1EpEQosohQ=; b=jY/UtDpcPrp3lEneIsKpUzgrJMfOtGfr0W4HdG9VFIdrCYn1eXDAZyQWvaW/9mXMeZ S/OqstEvBX2uW5CjpJd8uj3LJv40qxsuAcKkuR1SEeXzgcLKS+XCd58jRsyYEvf41ErC tfc17Qxe9jc7qI/HMcLjyxW21KqfvMxRuK9xMsIf1XP29I64kP6UhOP3PSeTsR5HIMR2 dwWrpPB0IEWfpuCyh3PtrOuEd4FUxjVXQvGQTKfPfiesGF1TQCfPRafPyMfpAZav6Zoc 13S8aakasW5V6pPupboxxKQS45+AeUUNO45s9yAI8XRaVF2pyTT4l6vL+1HHNnt6w9LU quPg== X-Gm-Message-State: ABy/qLanaTYsX4dySgn2jdCOuEFRz3mMTCCv7uzrdt9PrMy9wBFOQrb+ 8xIzeVAP3rcf1AyUrXR26Uy+ckZ+lRjSUw== X-Received: by 2002:a05:6512:2391:b0:4fb:c9e1:5286 with SMTP id c17-20020a056512239100b004fbc9e15286mr4097169lfv.7.1690789002457; Mon, 31 Jul 2023 00:36:42 -0700 (PDT) Received: from xeon.. ([188.163.112.48]) by smtp.gmail.com with ESMTPSA id m14-20020a056512014e00b004fe3229e584sm586898lfo.270.2023.07.31.00.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 00:36:42 -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 1/4] dt-bindings: power: supply: maxim,max17040: update properties Date: Mon, 31 Jul 2023 10:36:10 +0300 Message-Id: <20230731073613.10394-2-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731073613.10394-1-clamor95@gmail.com> References: <20230731073613.10394-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772928884646055886 X-GMAIL-MSGID: 1772928884646055886 Add status and temperature properties. Signed-off-by: Svyatoslav Ryhel Reviewed-by: Krzysztof Kozlowski --- .../bindings/power/supply/maxim,max17040.yaml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml index 2627cd3eed83..377cbb2c2c1f 100644 --- a/Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml +++ b/Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml @@ -55,6 +55,14 @@ properties: interrupts: maxItems: 1 + io-channels: + items: + - description: battery temperature + + io-channel-names: + items: + - const: temp + wakeup-source: type: boolean description: | @@ -95,3 +103,26 @@ examples: wakeup-source; }; }; + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + fuel-gauge@36 { + compatible = "maxim,max17043"; + reg = <0x36>; + + interrupt-parent = <&gpio>; + interrupts = <144 IRQ_TYPE_EDGE_FALLING>; + + monitored-battery = <&battery>; + power-supplies = <&charger>; + + io-channels = <&adc 8>; + io-channel-names = "temp"; + + maxim,alert-low-soc-level = <10>; + wakeup-source; + }; + }; From patchwork Mon Jul 31 07:36:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 128428 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1867021vqg; Mon, 31 Jul 2023 01:13:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdopZAr2uXC0AbU0pwyntOmC0ekONlLNcM4l4ucX5W8/Xfjikho38T7bnge1fAYrSDOr16 X-Received: by 2002:a05:6358:5e0a:b0:133:b42:69ca with SMTP id q10-20020a0563585e0a00b001330b4269camr5381088rwn.18.1690791223738; Mon, 31 Jul 2023 01:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690791223; cv=none; d=google.com; s=arc-20160816; b=Rfka4xK1HeyNchr5VHJVsa7Co8t15RmpuxrkHFDoipfde5g3p2iuNK3N4OVv6EUf7n j9UfL6l5BVGg/O0jCSsXh7XTAqCTdKsUWsSALKRvcH35b+idspyIA++E5+1F0/0iZRTe QKgGw3+a9enaEjQyC1cnx7zmw11oYgVL3pEEAeBp3sChNBhbKjcDhlxjJ0ue7l9I0ax7 eyaMpKuEHkfT1ldc4EMFdMxO//mSaurxKWS1hFsWYITxX6LPde/FNRg4SnYFhfJZxlQ6 petUMlmjUxaIz74oNdTjHIXVm8Sfv3qb47N9nWjMzfMy13cs0x06sz9DZPGGbPZrtx/p oAqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JEyRUtIvngdn2xYibH+4khtHK+n4dlGEHPyQwJGcHe4=; fh=BYYxYocqtJiC/MlqHuXF0UZXhvoN/4a0Xtp0KZwYhQ0=; b=Drdwr37xpw8pEryqAF6+zmi5csl23mZObNBJPweg5xOA27BWoQ48WD1Xp2A6tUz5mS LURMuRkDYIK9S6Wj8a9czNs5X96Dzm4Jn1QUvm3eOBg2dyTZfDWW2fPYcDmE41en9tqi x+3cyzSWYHHMSvAiNUiUu9kI2pV7N+YIVLMTC+AIYPOoksPO8ylL0m63mufpJCoa1H3F EJkWcgV3yym0vAY/qxeCuBgh6TITFpTtv6m55e8F3l+ekhN4hIWF1Nxh33pVOPgRtkyX OlukxD9Y+62hl3R5/zwOBCX8/ndKFRqGXHiQ9WdvGLKEvkMjEuWRZF3ep2mm6Y+LJc4Y sGdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=PO8oxGNH; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a63100a000000b00563de9d4ed5si6971220pgl.357.2023.07.31.01.13.31; Mon, 31 Jul 2023 01:13:43 -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=@gmail.com header.s=20221208 header.b=PO8oxGNH; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230406AbjGaHg6 (ORCPT + 99 others); Mon, 31 Jul 2023 03:36:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231258AbjGaHgq (ORCPT ); Mon, 31 Jul 2023 03:36:46 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA9E8184; Mon, 31 Jul 2023 00:36:45 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4fe21e7f3d1so3832445e87.3; Mon, 31 Jul 2023 00:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690789004; x=1691393804; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JEyRUtIvngdn2xYibH+4khtHK+n4dlGEHPyQwJGcHe4=; b=PO8oxGNHcTtgWi1NRPLGFfe54ktB+onMq+Xc77bm6mdLBo8mK9Eru0NyCXckzENbp9 VCLGcQmqHlSLmR99JjKdfJnjwkzhnUVBlMIjp4jecVwYWyR18NmCAuuueSdH1O8OvgfP zRxnTz409xJQ15OStMNHTjGb3rlO0gfPKWr2fM0rFTQZcciehI+LV8bvCuF1jjtVUNib RxSaMoV3GsoIHFdtvienaEt/idkwukYtYTIGYrr8yckrPneKWQy9Pv6KmtQGQqGLmQrw Ugb8uBONDZkjv9n0J36PrbAXjEsxELSsNpxlfOLw2+qX4eoESQzIDEVkKreZ4+5fLjRc YuJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690789004; x=1691393804; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JEyRUtIvngdn2xYibH+4khtHK+n4dlGEHPyQwJGcHe4=; b=AANWoNE/59OAoNhLJQU3fdHelAyZiSmdXM6hZwf0dkSYsY8Qu0jeEKDyZhWcrZhVsI berkNVBw9cCnOKVIlV/9AqAewctUXVWPtp6zkhq3sRgMA3jEz1C0Tn0gPmt24z1Nd4el bWxUTUZ7k+r8xQnYGUkvH/Ws6jDu5MgrvWCWjvAI0lGz1JDli34/BN4nXuSRfFJVp2bF cEGuduEeCzqMBn4+95IrnK3hLhJFqAmT0FsyMjxHMPaX3lcl2EuiA6QCPsfm5tTNCSto hjyKKBUjndLCVPZIcsCEYJyodi3ySpWAWmQENDO0K8MwFHYMgPEmWPsdNHLZ4V/C198b bTuw== X-Gm-Message-State: ABy/qLZx+ttxioYR9Frxl3VmmVhFg5z9NAme/VsED4A+5Aj/1bLyXqmB lbVYx+OIGCzmSvWLblX9cLA= X-Received: by 2002:ac2:58c9:0:b0:4fd:cae7:2393 with SMTP id u9-20020ac258c9000000b004fdcae72393mr4853658lfo.2.1690789003805; Mon, 31 Jul 2023 00:36:43 -0700 (PDT) Received: from xeon.. ([188.163.112.48]) by smtp.gmail.com with ESMTPSA id m14-20020a056512014e00b004fe3229e584sm586898lfo.270.2023.07.31.00.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 00:36:43 -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 2/4] power: max17040: pass status property from supplier Date: Mon, 31 Jul 2023 10:36:11 +0300 Message-Id: <20230731073613.10394-3-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731073613.10394-1-clamor95@gmail.com> References: <20230731073613.10394-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772923097915632104 X-GMAIL-MSGID: 1772923097915632104 Optionally pass status property from supplier if has support for it. If cell is online assume it is present as well. Signed-off-by: Svyatoslav Ryhel --- drivers/power/supply/max17040_battery.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c index d1075959dd46..3301e8a4b16c 100644 --- a/drivers/power/supply/max17040_battery.c +++ b/drivers/power/supply/max17040_battery.c @@ -389,6 +389,7 @@ static int max17040_get_property(struct power_supply *psy, switch (psp) { case POWER_SUPPLY_PROP_ONLINE: + case POWER_SUPPLY_PROP_PRESENT: val->intval = max17040_get_online(chip); break; case POWER_SUPPLY_PROP_VOLTAGE_NOW: @@ -400,6 +401,9 @@ static int max17040_get_property(struct power_supply *psy, case POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN: val->intval = chip->low_soc_alert; break; + case POWER_SUPPLY_PROP_STATUS: + power_supply_get_property_from_supplier(psy, psp, val); + break; default: return -EINVAL; } @@ -415,9 +419,11 @@ static const struct regmap_config max17040_regmap = { static enum power_supply_property max17040_battery_props[] = { POWER_SUPPLY_PROP_ONLINE, + POWER_SUPPLY_PROP_PRESENT, POWER_SUPPLY_PROP_VOLTAGE_NOW, POWER_SUPPLY_PROP_CAPACITY, POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN, + POWER_SUPPLY_PROP_STATUS, }; static const struct power_supply_desc max17040_battery_desc = { From patchwork Mon Jul 31 07:36:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 128402 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1862462vqg; Mon, 31 Jul 2023 01:02:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlEkk088A2ao3CR9s0t9G1Dn4gRdPgUVb8ZRrRD7dYv4GQC63ATZZbTs+mwrr6zEVKBVnPra X-Received: by 2002:a17:906:cc13:b0:992:a90a:5d1f with SMTP id ml19-20020a170906cc1300b00992a90a5d1fmr5780185ejb.68.1690790543505; Mon, 31 Jul 2023 01:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690790543; cv=none; d=google.com; s=arc-20160816; b=oLrWEu1J7mVXQcHDTA3MNkF068igTumZJXIWwTMOqYts4rCd625pjLLwfLgrmgchCW eC9AIyQtRparQ7tFCHoKGrdO223IvV6HylV32VQ/pQ63p0pjFwyRxmCSIoIUz2dPWzVe N3eZmhRdIYq18nUfNVKTwiW1KM1emn0TpxvmxD6+FtccfuFkIH87trL53WU043ZwmBeW Q7dF8pSVGKONYDvmh45UG78YyrJkGTV75pWczxoBPmeQx5ksOOgWIAmfFR+sI67oSgSE USIVPrMQc4iLp5pPFya3N2MnAnVhKDzjZ1ij/D45/p8TRJkcry8OLDZFsBZnImlrFPgY XFLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UDXgSylBUJtlqgXKl+eFyzEmuuOxDLbY4Ry7v67coaU=; fh=BYYxYocqtJiC/MlqHuXF0UZXhvoN/4a0Xtp0KZwYhQ0=; b=MozsnEmEe9JordJnkxsSn9yOm9Yyl5Tj+VbrCdQybbNg24LWUGobHqLFVvABY+Jn5W iNj0r++BP53H1/u1aeEqvN76dCb/W+1GwuA+6xQ+E5n/aLyTAZwFehBEAdoIHlcF5D17 QPxKX5tRHPuJHYd6ww1DzoAPVHsFd7OItsroXPGkWhwzxSb5rvU/rmpr3rs00D4AeePt lQcoCiN08lK4k3MeQPc3epknVDCSjYd/+OEURTyt8umThEipYkYmU5/5cUNrOx4fRAJr wc1z6uL8kgdRBAi0VWJnuxvtjiTUonnZ1GH6R/NDWAABa/v0TfCuNhXpXsl2qZJ6zC6R kcgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=M+YmC08C; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga15-20020a170906b84f00b0098cee0f8cfesi7314000ejb.969.2023.07.31.01.01.58; Mon, 31 Jul 2023 01:02:23 -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=@gmail.com header.s=20221208 header.b=M+YmC08C; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231389AbjGaHhH (ORCPT + 99 others); Mon, 31 Jul 2023 03:37:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231280AbjGaHgs (ORCPT ); Mon, 31 Jul 2023 03:36:48 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E0FF11B; Mon, 31 Jul 2023 00:36:47 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fe28f92d8eso2078000e87.1; Mon, 31 Jul 2023 00:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690789005; x=1691393805; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UDXgSylBUJtlqgXKl+eFyzEmuuOxDLbY4Ry7v67coaU=; b=M+YmC08CYkEd/jALSE78ke/tk19xg7gETYrI9RtT46ASu0nDcTimuCNCo4EEtrz6ov 5D8N2FpMJGBgFJpLZiRXgpSGMWDDgHLA3whI3hP4xZOBs/41HeeuN75/hdABoiCkKR/x ZAWGLeEp1XhiphGT2d57V3xw+M8ju0IMnoPT2GS14Upj9BIdgIMx8xzcvULpMHBQPImS wr3XXNhu3XkeS1loHJGEa0LVgTLe8QWJ6zHFjs0srBHlL4O/N2pVYN86lJoMrRDeY9Mr wXdjJokRabzgMz2UNV6GXyxN85LVMnK3jc2l2KmuiTpKmKeLBNqf3M6ym+km8ZucXBUy HPRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690789005; x=1691393805; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UDXgSylBUJtlqgXKl+eFyzEmuuOxDLbY4Ry7v67coaU=; b=I4QIoLOP9lN03ivUaRVQBFQr+AGufk8rPkl7UBZa2coWDpKK9CXzdXpuF/kUmFdeen o4zBDczotplCBguHLywWxPONw9lhKQZBRk8EW1RRIkp1r2oiCeH66vVBqg2e4+LdL80G C5Y+sxO3YdZaHNgLYEcjQlwGa5WmP9tTutkRy1sC/V5v1Kbhlylt7+oeldMxNBsQ9Vym g7QqOOPnLsBYyueNRQIqac+/4dbqIjGtv3tgaDXKHKf8eMTAcQe9mOxz1gQ8tNIsNXGo 4r6qT7aU1YLnG54j9isTWOx+1HgQNUdzr12L/o3z6Hrxwyz53lFJ4qmpjWTmNoBu4dJU lB/Q== X-Gm-Message-State: ABy/qLYyheoHQ9wJeba1Hng6GtXJx5dpio7pd56ctYGmYdOBNB81Od/Q k/s/WUXl7KohpPtbzPOQ3rg= X-Received: by 2002:ac2:58c8:0:b0:4f9:596d:c803 with SMTP id u8-20020ac258c8000000b004f9596dc803mr4878541lfo.53.1690789005107; Mon, 31 Jul 2023 00:36:45 -0700 (PDT) Received: from xeon.. ([188.163.112.48]) by smtp.gmail.com with ESMTPSA id m14-20020a056512014e00b004fe3229e584sm586898lfo.270.2023.07.31.00.36.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 00:36:44 -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 3/4] power: max17040: get thermal data from adc if available Date: Mon, 31 Jul 2023 10:36:12 +0300 Message-Id: <20230731073613.10394-4-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731073613.10394-1-clamor95@gmail.com> References: <20230731073613.10394-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772922385059527207 X-GMAIL-MSGID: 1772922385059527207 Since fuel gauge does not support thermal monitoring, some vendors may couple this fuel gauge with thermal/adc sensor to monitor battery cell exact temperature. Add this feature by adding optional iio thermal channel. Signed-off-by: Svyatoslav Ryhel --- drivers/power/supply/Kconfig | 2 +- drivers/power/supply/max17040_battery.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig index c78be9f322e6..32600609865b 100644 --- a/drivers/power/supply/Kconfig +++ b/drivers/power/supply/Kconfig @@ -374,7 +374,7 @@ config AXP288_FUEL_GAUGE config BATTERY_MAX17040 tristate "Maxim MAX17040/17041/17043 family Fuel Gauge" - depends on I2C + depends on I2C && IIO select REGMAP_I2C help Driver supports Maxim fuel-gauge systems for lithium-ion (Li+) diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c index 3301e8a4b16c..54db20637c87 100644 --- a/drivers/power/supply/max17040_battery.c +++ b/drivers/power/supply/max17040_battery.c @@ -18,6 +18,7 @@ #include #include #include +#include #define MAX17040_VCELL 0x02 #define MAX17040_SOC 0x04 @@ -142,6 +143,7 @@ struct max17040_chip { struct delayed_work work; struct power_supply *battery; struct chip_data data; + struct iio_channel *channel_temp; /* battery capacity */ int soc; @@ -404,6 +406,13 @@ static int max17040_get_property(struct power_supply *psy, case POWER_SUPPLY_PROP_STATUS: power_supply_get_property_from_supplier(psy, psp, val); break; + case POWER_SUPPLY_PROP_TEMP: + if (!chip->channel_temp) + return -ENODATA; + + iio_read_channel_processed_scale(chip->channel_temp, + &val->intval, 10); + break; default: return -EINVAL; } @@ -424,6 +433,7 @@ static enum power_supply_property max17040_battery_props[] = { POWER_SUPPLY_PROP_CAPACITY, POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN, POWER_SUPPLY_PROP_STATUS, + POWER_SUPPLY_PROP_TEMP, }; static const struct power_supply_desc max17040_battery_desc = { @@ -469,6 +479,17 @@ static int max17040_probe(struct i2c_client *client) i2c_set_clientdata(client, chip); psy_cfg.drv_data = chip; + /* Switch to devm_iio_channel_get_optional when available */ + chip->channel_temp = devm_iio_channel_get(&client->dev, "temp"); + if (IS_ERR(chip->channel_temp)) { + ret = PTR_ERR(chip->channel_temp); + if (ret != -ENODEV) + return dev_err_probe(&client->dev, PTR_ERR(chip->channel_temp), + "failed to get temp\n"); + else + chip->channel_temp = NULL; + } + chip->battery = devm_power_supply_register(&client->dev, &max17040_battery_desc, &psy_cfg); if (IS_ERR(chip->battery)) { From patchwork Mon Jul 31 07:36:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 128464 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1883508vqg; Mon, 31 Jul 2023 01:58:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlE2pCHGMEKX98L8Hq32gFAf7milQ+Dg5LgxnrJpRbFlN7mQQy2LHO5h6U0aycvNrIFYfFc1 X-Received: by 2002:a05:6a21:7889:b0:117:3c00:77ea with SMTP id bf9-20020a056a21788900b001173c0077eamr11573777pzc.0.1690793937019; Mon, 31 Jul 2023 01:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690793937; cv=none; d=google.com; s=arc-20160816; b=qzAcTilIDtG6DoBKFK+Ceh1EUuxoOOTDWGRPhUWH8/nhrT5V8hwQhHt3y4Y73f9uvb nQ8kkJ9AYBg3qx/75ME41EF2VSx803sWuKAaxpj7Hf2dhcrvzK7zp/3g34gt6Xxde4NT KklXL8GMEP8PuVNa/Tr9QWvHcFSoHJtc26doyoYJpjBu0Iz8BXfpEFmNbFD5HJilt7u8 FG8V7gAxIZs+X8WO5oD5pTooGb/n9G/hh7X15qSjD1pv+JpAn6ocwL5Xu+qd+eq/4cvr HLBOQSJG1huqi8Ky7S7C5eF7bKTGS6idaY0zxpH2beZkc4dV1UNRItTFPzXe0AvwT0Pf 56HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6j0RW75STEI+5ZneQ+EaoJsYheY8+d1jwea7sk4EPgA=; fh=BYYxYocqtJiC/MlqHuXF0UZXhvoN/4a0Xtp0KZwYhQ0=; b=KZfckRUEHvaQSrjtOtrl1TPl0kuxECJ3BrVSCp6emVB5Xo6UcIfqKc4Y/xALzeR69L Zr8SNUGTx4nVNb7ik+7ITQMzI3PVEecGhOSTFBC8rS3HpvnmMAPzppmhtHDpxgaQpJ8r q22ZlwxTc+xPCROwiGjyJ0rbKdhZZ1lo12UgrD9A8sIdn+d981uCZ/Bq+sYcLNDvSDGR XSX6yi3HcpiIOLTdDnDyPVF52bTxySdCl4ttNGK3ggvjoTuAM6K+i9cYzz4nQfYlqb9D 3xzAC2woYMdB/pgdjHTo3nsWjLVH0p5281z387NuQRMDc+f+NuXMHMG0YyGX9ISwTsoL nRVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="T/MFohop"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw23-20020a056a00451700b006824e0fdcb0si3449366pfb.98.2023.07.31.01.58.44; Mon, 31 Jul 2023 01:58:56 -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=@gmail.com header.s=20221208 header.b="T/MFohop"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbjGaHhM (ORCPT + 99 others); Mon, 31 Jul 2023 03:37:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229813AbjGaHgt (ORCPT ); Mon, 31 Jul 2023 03:36:49 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A259EE; Mon, 31 Jul 2023 00:36:48 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fe0e34f498so6319506e87.2; Mon, 31 Jul 2023 00:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690789006; x=1691393806; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6j0RW75STEI+5ZneQ+EaoJsYheY8+d1jwea7sk4EPgA=; b=T/MFohopS/BeXcEOIKcI+cKbio9xHJw754uW1T4iafV4Cpc+VMjI32RZqanKyS0c3u ClVlopqABlN0fqoAfTJQ1PEq2enBvzqMS1t65L3ynFlWX6m7Sq2zHmP0XKqYL/rEtfw8 DgZV22HlJaGMpLTaP9J+NixAUS71c+zIIQZ6o/8q/Cfdw1jPi1TAusj14G50cQHwGxcE C8NgkGO3B1UUKEMSgrPrL4wLGz43APbpoLnUIKnSbs4Uz0eVw5CU91pz7c5JnFMscf6B 5ZUrxnGap4NaiA5LuXs+0koOCjymRdigu1CsB4Kg/AHFVaSpftWmMQ504YBe4WpnuuiU sHOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690789006; x=1691393806; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6j0RW75STEI+5ZneQ+EaoJsYheY8+d1jwea7sk4EPgA=; b=b5RX22qso+PF+kbtNK7KlW/f2wIj+2J978XV8Dx4+2rMgkNrl759oDU2PU8fi6LXWq 0J3Qx/Rgjrxl58hFeMuh0/BcYhEHh7zSYtqE/Zn9V/RfNsxKRtdgeTAd+Ob9zpW8B14J KAG55c9uUuUjYXuTN2dYA4W7QlF/HbrcGuR+ROXpOoP2rtpgfmveBP3f3FxrwjTGP4mn M+H09ri9zywRLyonz6yE0ogLUpLflkjTbRV+qgdtTS51JytJUsy0sTxeoiIYFPkePZQc XmMGEfkahK1MURX5/Ur7gy+BQMGctJ/qCty3Xofze6C/dmM1la9yW6uUC+QcPl0MxHlx ztmA== X-Gm-Message-State: ABy/qLYlF1wuJsX3yM6eXYJL+ADu6dL99Nr1sCpBVeiqIVA+y/ufK6Mn OAzMP0PIOlhsYe6rQXtHtW1Pfs6rdvmI8A== X-Received: by 2002:ac2:5df3:0:b0:4fb:89b3:3373 with SMTP id z19-20020ac25df3000000b004fb89b33373mr4822337lfq.43.1690789006542; Mon, 31 Jul 2023 00:36:46 -0700 (PDT) Received: from xeon.. ([188.163.112.48]) by smtp.gmail.com with ESMTPSA id m14-20020a056512014e00b004fe3229e584sm586898lfo.270.2023.07.31.00.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 00:36:46 -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 4/4] ARM: configs: s5pv210_defconfig: enable IIO required by MAX17040 Date: Mon, 31 Jul 2023 10:36:13 +0300 Message-Id: <20230731073613.10394-5-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230731073613.10394-1-clamor95@gmail.com> References: <20230731073613.10394-1-clamor95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772925943396007461 X-GMAIL-MSGID: 1772925943396007461 After adding support for passing temperature data from thermal sensor to MAX17040 it got dependency on CONFIG_IIO. From all defconfigs using MAX17040 only s5pv210_defconfig did not have IIO already enabled so let's enable it to avoid regression. Signed-off-by: Svyatoslav Ryhel --- arch/arm/configs/s5pv210_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/s5pv210_defconfig b/arch/arm/configs/s5pv210_defconfig index 4c1e480b5bbd..24070ee3d43e 100644 --- a/arch/arm/configs/s5pv210_defconfig +++ b/arch/arm/configs/s5pv210_defconfig @@ -97,6 +97,7 @@ CONFIG_MMC_SDHCI_S3C_DMA=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_MAX8998=m CONFIG_DMADEVICES=y +CONFIG_IIO=y CONFIG_PWM=y CONFIG_PWM_SAMSUNG=y CONFIG_PHY_SAMSUNG_USB2=m