From patchwork Wed Nov 23 17:54:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravanan Sekar X-Patchwork-Id: 628152 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC161C43219 for ; Wed, 23 Nov 2022 17:54:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236601AbiKWRyp (ORCPT ); Wed, 23 Nov 2022 12:54:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237461AbiKWRyo (ORCPT ); Wed, 23 Nov 2022 12:54:44 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A465861743; Wed, 23 Nov 2022 09:54:43 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id b29so17984714pfp.13; Wed, 23 Nov 2022 09:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=Q7SDO8Hfv8UNbCG9VUfErLc2iywPx7lgKEb1KGhgxPQ=; b=B8qFyvJ0ncXIpKh8Uz+tA+NVGOEhLdB35VewuYn15B+1aUQAzc1ojGCWU7dKUqfdG6 ixZeESZi4myMt3y5S4vc3gFlD78dPjPC3kmDr5HkElp4gqt5YeXrlDnBSIB3y/jnJDbu fp4TK2S1nH+lMs3RSAQPfcIaunm+jYc22HhOypMsBcdNF45ONzcV9X5OOjpmP7z/aMmn FppIwyOrCHDj4ht5hx6Mlv/grnF9OLNiAzlzin6t8/ioW2v3OaBxehYYUXHNxcjzmQ9K EvQjUulZFrdacDouK+Xv6HJnNKb1Hlqwnri5vH1p3hCJTima3kgmox4QWYkKOxZyJlZd HVDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Q7SDO8Hfv8UNbCG9VUfErLc2iywPx7lgKEb1KGhgxPQ=; b=stuUsFP05VqjIM6oaZVxmqqCEg8dRnZH8JhFVHETH36uoXnFGlRefbhkDIDd2YOeoI rQrIgelpwLUfDOuzwtcPXHy6JdmIjcy0zdEafQqVulp/EJb2UFCno9Mnip39rfA6kb6w WcIXmPqbs4R7aJHiPB3Xz8SKPkkW3A7U3GyEf9yRnRmW5QFrJ8TLjIYjugAGnYCtgeEV 3lT2ZOyIzNuHAusq2OgOf76uLIRaIaNL7TZ7Y18Ap1izC2mZ/IE8bPm4jkkVWuOXIV7L M+CP+GSOsZ/r0Fxk0kXCBf4Ht9HHthtca0EpvKkyd3KnYNr1HJZ7Cuvrre3eGj5DP9q0 E6CA== X-Gm-Message-State: ANoB5pk5V5YaiVxUFRgwWJ0dJsUKsCbMWB0taypND5kNUOoEM1yGTLSp 7US4k/pvEimZt5sHGcz9gFBeenS75fE= X-Google-Smtp-Source: AA0mqf5+cnVz3hSy30L2DJBG/IkNjGN+e/YIar8DRBKJ7BNLNd/Ti0vZ7RCnhS12aQ8Op9gtkz/APA== X-Received: by 2002:a63:389:0:b0:477:7f68:bbbc with SMTP id 131-20020a630389000000b004777f68bbbcmr4199498pgd.279.1669226083192; Wed, 23 Nov 2022 09:54:43 -0800 (PST) Received: from discovery.. ([2401:4900:483b:e422:60e:77bf:baa2:9d8b]) by smtp.gmail.com with ESMTPSA id y76-20020a62644f000000b0057470a06694sm837503pfb.40.2022.11.23.09.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 09:54:42 -0800 (PST) From: Saravanan Sekar To: sre@kernel.org, lee@kernel.org, jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com Cc: linux-pm@vger.kernel.org, linux-iio@vger.kernel.org, Saravanan Sekar Subject: [PATCH v6 1/7] mfd: mp2629: fix failed to get iio channel by device name Date: Wed, 23 Nov 2022 18:54:19 +0100 Message-Id: <20221123175425.564042-2-sravanhome@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123175425.564042-1-sravanhome@gmail.com> References: <20221123175425.564042-1-sravanhome@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The mfd cell devices name populated on sysfs entry is dynamically derived from an auto instance which introduced a regression. As a result mpc2629_charger driver failed to get adc channel because of iio consumer name mismatch with the sysfs. /sys/class/i2c-adapter/i2c-1/mp2629_adc.0.auto/ /sys/class/i2c-adapter/i2c-1/mp2629_charger.1.auto/ Fixes: 466a62d7642f ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes") Signed-off-by: Saravanan Sekar --- drivers/mfd/mp2629.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/mp2629.c b/drivers/mfd/mp2629.c index 16840ec5fd1c..f4c5aa06f38c 100644 --- a/drivers/mfd/mp2629.c +++ b/drivers/mfd/mp2629.c @@ -51,7 +51,7 @@ static int mp2629_probe(struct i2c_client *client) return PTR_ERR(ddata->regmap); } - ret = devm_mfd_add_devices(ddata->dev, PLATFORM_DEVID_AUTO, mp2629_cell, + ret = devm_mfd_add_devices(ddata->dev, PLATFORM_DEVID_NONE, mp2629_cell, ARRAY_SIZE(mp2629_cell), NULL, 0, NULL); if (ret) dev_err(ddata->dev, "Failed to register sub-devices %d\n", ret); From patchwork Wed Nov 23 17:54:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravanan Sekar X-Patchwork-Id: 628151 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1807C433FE for ; Wed, 23 Nov 2022 17:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239186AbiKWRyy (ORCPT ); Wed, 23 Nov 2022 12:54:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238639AbiKWRyx (ORCPT ); Wed, 23 Nov 2022 12:54:53 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D047064A2C; Wed, 23 Nov 2022 09:54:52 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id a1-20020a17090abe0100b00218a7df7789so2764013pjs.5; Wed, 23 Nov 2022 09:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=POR67NNOWOg5L0ub1cqdpDYlQnLokUngs3/LSYj03K0=; b=K88ASrwDTFK4OGChFmDH1LZtBUdGBGKG9j41LYJLOWnAbYk8fe1ZQSE5LLRDKmTLK4 2s4glEMHtObtvX13izlex/80fofnqLokFZ4+9A4IiuIsLUGCcEPTyRB8d2nrSUVaR+A0 7zcs8IA96gwwwlifelFXbovvYhS0CaBJwxp73+d9hthMUrCNX1cLieMxkn9rnJ4X0j1K ddrQP5jK+LNMNP3IRBVkgG/ISabCdlRckD+suCjBPPDz6xO6UatSyTHzoTGryHFj0VpG 0h26/Yt0oAY7+wqL8SM6Djt9VXd3bwQnmT0KXwih/PpQsYv4xSiSLndCIM1IMr6oPdey Sh9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=POR67NNOWOg5L0ub1cqdpDYlQnLokUngs3/LSYj03K0=; b=D6+zGyl97LtohsGknjS+sy4o04AKA1L9GBq/XxlhU5+phDy2zzK0JyfCD+4d4lv/wr nVssvL31GCpj6bKg+QdFT2GVvGjPVabqH24dNwBOGWZ1wDxhHajSz5q3clxFr2X1f8ps Q/9WakooWGvTitaGa8KV1LDrJ2cRgIHVzuAsK+eFXHhnmkpkAdinsSDaA1QQMe8o2Gnj zm990M2pjBaNqOtoB7DzYgdPDkGItsDJ6LXUEyOwGHe3uaWMeZNSIUNAb+Eidqro3+8t KVvTYD4kDDMq9ycjnD+oGMdqXf65f0SsKKJmBhxsTRYJfUt2JhT6N6eSKfukFPfd27PO MWJg== X-Gm-Message-State: ANoB5pm1wL6V7AIcaHJAbRUKmh7CzVKR6HPdXEgkNXd0wQzgUeoBakv3 +02if2TPPo+r1xD5d6eyPb6AfTUHml4= X-Google-Smtp-Source: AA0mqf6frPtH2L1iIleqUdyaFNUp/p4wFW/uiXFyonXhv6aMaL1JrFfFIAl1CqOYz8N0iuIwp5PAGQ== X-Received: by 2002:a17:902:ce82:b0:186:ed91:5086 with SMTP id f2-20020a170902ce8200b00186ed915086mr9795463plg.59.1669226092356; Wed, 23 Nov 2022 09:54:52 -0800 (PST) Received: from discovery.. ([2401:4900:483b:e422:60e:77bf:baa2:9d8b]) by smtp.gmail.com with ESMTPSA id y76-20020a62644f000000b0057470a06694sm837503pfb.40.2022.11.23.09.54.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 09:54:51 -0800 (PST) From: Saravanan Sekar To: sre@kernel.org, lee@kernel.org, jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com Cc: linux-pm@vger.kernel.org, linux-iio@vger.kernel.org, Saravanan Sekar Subject: [PATCH v6 3/7] mfd: mp2629: introduce chip id machanism to distinguish chip Date: Wed, 23 Nov 2022 18:54:21 +0100 Message-Id: <20221123175425.564042-4-sravanhome@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123175425.564042-1-sravanhome@gmail.com> References: <20221123175425.564042-1-sravanhome@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Introduce chip id machanism to distinguish chip Signed-off-by: Saravanan Sekar Reviewed-by: Andy Shevchenko --- drivers/mfd/mp2629.c | 4 +++- include/linux/mfd/mp2629.h | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/mp2629.c b/drivers/mfd/mp2629.c index f4c5aa06f38c..a3fc02ad5ec1 100644 --- a/drivers/mfd/mp2629.c +++ b/drivers/mfd/mp2629.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -43,6 +44,7 @@ static int mp2629_probe(struct i2c_client *client) return -ENOMEM; ddata->dev = &client->dev; + ddata->chip_id = (uintptr_t)device_get_match_data(&client->dev); i2c_set_clientdata(client, ddata); ddata->regmap = devm_regmap_init_i2c(client, &mp2629_regmap_config); @@ -60,7 +62,7 @@ static int mp2629_probe(struct i2c_client *client) } static const struct of_device_id mp2629_of_match[] = { - { .compatible = "mps,mp2629"}, + { .compatible = "mps,mp2629", .data = (void *)CHIP_ID_MP2629 }, { } }; MODULE_DEVICE_TABLE(of, mp2629_of_match); diff --git a/include/linux/mfd/mp2629.h b/include/linux/mfd/mp2629.h index 89b706900b57..072c8181b48b 100644 --- a/include/linux/mfd/mp2629.h +++ b/include/linux/mfd/mp2629.h @@ -9,9 +9,14 @@ #include #include +enum mp2xx_chip_id { + CHIP_ID_MP2629, +}; + struct mp2629_data { struct device *dev; struct regmap *regmap; + enum mp2xx_chip_id chip_id; }; enum mp2629_adc_chan { From patchwork Wed Nov 23 17:54:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravanan Sekar X-Patchwork-Id: 628150 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB4E6C433FE for ; Wed, 23 Nov 2022 17:55:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239309AbiKWRzJ (ORCPT ); Wed, 23 Nov 2022 12:55:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239207AbiKWRzH (ORCPT ); Wed, 23 Nov 2022 12:55:07 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28340B97CF; Wed, 23 Nov 2022 09:55:02 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so2774524pjc.3; Wed, 23 Nov 2022 09:55:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=Sa9+zB2hHRJShe6/SZl8Kai19estoaLiBOw5LdWRhFM=; b=i1mnF3o9X2VVwhcc/7mMkcUzGBgFLXlUVrVryPxRvZVsboC0Rm6ZtiAC47G13l29v3 QlAI45XfTHCQeT/uWgld7yZY0122erVTLAgKPzLOFtPIpDRi7fTCuSU6iU0nSvpMBbxU /5JGmSUYmEWuvYa4/55dWhFarMPXtnfJYKECPD0CkybsHQ+GBVFnPHxRe/b/20qWS9TM UuhGzgezb8h3iVXmpMM0raRV38ya4qirlq64bspEZQCl5MmagksPUJY/ApqAS5W2x+uZ 1vZcgd0KsrjJo4E1dgVWDF4oa6LIAJ1EVFhTlGJYA78XD3dJ78kjjZj2mVbSrO34mdrd PPRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Sa9+zB2hHRJShe6/SZl8Kai19estoaLiBOw5LdWRhFM=; b=vHZ7krtrk7HpzcJGnOGx4mF64BpsTLhgChr2fZ5tyQXjjxdZusKZqhUWRAdEyGosqs eWILvFOZRZrIfj4d/Uq/Ps+ltCO6Rh2Lcm9Pfxp6+7RYW9VzKM/W4gu2Z/TmzVHVSHfR Nh+vEzlC5ttB/7p30hpnGALZgMURNaobcLuf4habeKL9h06pXqN0YhclMTIatoqTdDmw Nfq+qwO5wvhUYJEUr0td+8dz2/KM336lNT2dsXEaItpKogh09TFJy5ufH/aSLYoavvk6 DgI+Nk23XlxDLkOQ4L1E3pAIDQ688zcTtZr3wbBkgd16IdCj89K0mwFCBpODdJdH9h/u gg+A== X-Gm-Message-State: ANoB5plL83w7SEZo/s6u/Y8/ITRP4YAbr5OzyrugM9mL7qCRlHz5njHY spoeollx3ubMzzys3jVMy53RV6RW+hs= X-Google-Smtp-Source: AA0mqf6G/6YAi7FR4gkYG/ewDYRZ832a02qcb3kGoos+y+LKdcuH19EwQgU6xU5ZkvW9mk3IfneIlA== X-Received: by 2002:a17:902:ce90:b0:186:6d34:b7b5 with SMTP id f16-20020a170902ce9000b001866d34b7b5mr13021371plg.37.1669226101693; Wed, 23 Nov 2022 09:55:01 -0800 (PST) Received: from discovery.. ([2401:4900:483b:e422:60e:77bf:baa2:9d8b]) by smtp.gmail.com with ESMTPSA id y76-20020a62644f000000b0057470a06694sm837503pfb.40.2022.11.23.09.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 09:55:01 -0800 (PST) From: Saravanan Sekar To: sre@kernel.org, lee@kernel.org, jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com Cc: linux-pm@vger.kernel.org, linux-iio@vger.kernel.org, Saravanan Sekar , Jonathan Cameron Subject: [PATCH v6 5/7] iio: adc: mp2629: restrict input voltage mask for mp2629 Date: Wed, 23 Nov 2022 18:54:23 +0100 Message-Id: <20221123175425.564042-6-sravanhome@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123175425.564042-1-sravanhome@gmail.com> References: <20221123175425.564042-1-sravanhome@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add support for mp2733 which is updated version of mp2629 with a higher range of input voltage. Signed-off-by: Saravanan Sekar Reviewed-by: Andy Shevchenko Acked-by: Jonathan Cameron --- drivers/iio/adc/mp2629_adc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/mp2629_adc.c b/drivers/iio/adc/mp2629_adc.c index 88e947f300cf..18290e176e1e 100644 --- a/drivers/iio/adc/mp2629_adc.c +++ b/drivers/iio/adc/mp2629_adc.c @@ -66,6 +66,7 @@ static int mp2629_read_raw(struct iio_dev *indio_dev, int *val, int *val2, long mask) { struct mp2629_adc *info = iio_priv(indio_dev); + struct mp2629_data *ddata = dev_get_drvdata(info->dev); unsigned int rval; int ret; @@ -75,8 +76,10 @@ static int mp2629_read_raw(struct iio_dev *indio_dev, if (ret) return ret; - if (chan->channel == MP2629_INPUT_VOLT) + if (chan->channel == MP2629_INPUT_VOLT && + ddata->chip_id == CHIP_ID_MP2629) rval &= GENMASK(6, 0); + *val = rval; return IIO_VAL_INT; From patchwork Wed Nov 23 17:54:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravanan Sekar X-Patchwork-Id: 628149 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4DE7C433FE for ; Wed, 23 Nov 2022 17:55:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238510AbiKWRzS (ORCPT ); Wed, 23 Nov 2022 12:55:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239176AbiKWRzO (ORCPT ); Wed, 23 Nov 2022 12:55:14 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3767DC6548; Wed, 23 Nov 2022 09:55:13 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id w79so228175pfc.2; Wed, 23 Nov 2022 09:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=m+M3x55LJlAjHZJKxmYKxIY2+MF/c7xVWLTdidtcZn4=; b=b3UVpwmGo3F4HCcrN0/3YXUiCz7Qzq3EIzUyux4zu/Usmg51yIMJPmFtWtDggK5S8f lI7LCMtHp6E4jtx8gmyI6gf+W+JkDqmnj1lzEpw6aljSLBTxQSWf4bwohTD8XuCTc72+ ZMI+8nXMEQWnigyxM8sbRT5SDl9drWpXk+7WnD1g+PWIQ+j0AAq5yAnn1nAcTTq2aD0y J4beUJeALB/LOaDYXzGQkwBVW5nx1PNGE8xi39oyvqEdVzhNUn7VXdklTspp9F/j+LEZ Lw75eYUc6vhLzC1COtFM8sWQamshZHMbMq2wm+/vn7wOPmPuEL0Bc1HrpNiFNWN9C7gR DDhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=m+M3x55LJlAjHZJKxmYKxIY2+MF/c7xVWLTdidtcZn4=; b=4El3w7xoCSZM53StdczRDO8fF0OT6zzIXqaUXuHXG3sbbswjKlauejM+rbKHZATqhF TDyEm+qXHqe9DTozOfNY98Vk4CvRGVQ9HlW2ECYqAcmBWJJPodWbRdbVKzWCDvcgiQo1 q0is8f5LeF3u6UIiVsPYwjzPQQnxNSXSpF3CkTQqWX/PovMSfAtj3600WSzBlxVHC9p2 UX+Bn2UwxOYGylFF8dQZNNyIyOdxiN0tPvsi8pgPZRsYXLPTQupe7FW5ooiCHNGuwhB6 ZXjfKxOu+6MODYAQvGwF8w8khYsEzr2sGcNNfvlNscgePKgSYu58A7NYsBa76hx4Wwgu 31CQ== X-Gm-Message-State: ANoB5pnGXIeFxnKFcA6AbIt7KhPCpnm9EcUX2Ix8La9fg078L935EC3J ZGGoBBP1ssp5MYABY3/iPao= X-Google-Smtp-Source: AA0mqf58zOVYwaWP7qDZBa6fJLF9D8FVab+2rjJ66s8oQ+tlRPc9N//pjAKRFg6ppcYOMchpCNVlIQ== X-Received: by 2002:a62:2544:0:b0:565:b27d:1f61 with SMTP id l65-20020a622544000000b00565b27d1f61mr19760787pfl.85.1669226112706; Wed, 23 Nov 2022 09:55:12 -0800 (PST) Received: from discovery.. ([2401:4900:483b:e422:60e:77bf:baa2:9d8b]) by smtp.gmail.com with ESMTPSA id y76-20020a62644f000000b0057470a06694sm837503pfb.40.2022.11.23.09.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 09:55:12 -0800 (PST) From: Saravanan Sekar To: sre@kernel.org, lee@kernel.org, jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com Cc: linux-pm@vger.kernel.org, linux-iio@vger.kernel.org, Saravanan Sekar , Sebastian Reichel Subject: [PATCH v6 7/7] power: supply: mp2629: Add USB fast charge settings Date: Wed, 23 Nov 2022 18:54:25 +0100 Message-Id: <20221123175425.564042-8-sravanhome@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123175425.564042-1-sravanhome@gmail.com> References: <20221123175425.564042-1-sravanhome@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Allows the user to change the USB device fast charge setting to advertise host on enumeration helps to accelerate the charging cycle. Altering this value resets USB existing connection. Signed-off-by: Saravanan Sekar Reviewed-by: Andy Shevchenko Acked-by: Sebastian Reichel --- .../ABI/testing/sysfs-class-power-mp2629 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-class-power-mp2629 b/Documentation/ABI/testing/sysfs-class-power-mp2629 index 914d67caac0d..40abb9a11d97 100644 --- a/Documentation/ABI/testing/sysfs-class-power-mp2629 +++ b/Documentation/ABI/testing/sysfs-class-power-mp2629 @@ -1,3 +1,19 @@ +What: /sys/class/power_supply/mp2629_battery/usb_fast_charge +Date: November 2022 +KernelVersion: 6.1 +Description: + Represents a USB device fast charge settings.Altering this + value resets USB existing connection + USB DP:DM[0:0] 0.6V : Hi-Z + USB DP:DM[0:1] 3.3V : 0.6V + USB DP:DM[1:0] 0.6V : 0.6V + USB DP:DM[1:1] 0.6V : 3.3V + + Access: Read, Write + + Valid values: Represented in bit DP & DM setting. Valid + range is [0, 3]. + What: /sys/class/power_supply/mp2629_battery/batt_impedance_compen Date: April 2020 KernelVersion: 5.7