From patchwork Tue Jun 14 15:17:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravanan Sekar X-Patchwork-Id: 581873 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 748E1CCA47E for ; Tue, 14 Jun 2022 15:17:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356438AbiFNPRm (ORCPT ); Tue, 14 Jun 2022 11:17:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356622AbiFNPRi (ORCPT ); Tue, 14 Jun 2022 11:17:38 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECE2FB1FD; Tue, 14 Jun 2022 08:17:34 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id gl15so17852974ejb.4; Tue, 14 Jun 2022 08:17:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hZ1It0Vji/uE1zL1NVsuKRSwGtzM25+5b2pW/UiacoM=; b=i8KDJKFWADV276MwZTB+vSolB+mqy0JCjcSVoGMWjrNvUMgFjYLJZozYf2ZuHc0m0P nJvhm6aA58Kd9S7ed4wOJWqcL/Hf8x90EDEJvcjsuNvABJiJ9pAH9SHqZChuXT8f34iU ByWGJa3Ah60jPSF5M/jLh+txjSN8yB8fSWUo563UNW3pNTkj8Q6xlq17M5n5cx5kWqr+ nI2zXUKJUX8nylocNvEmWrONTx/f1ILhJx6sZrisAvgO0vxzqqObEtYLuMcMK1fXBvdf FiUEbQo7glZ2PrYfI1ZLYYfmOq3oPely2Sirs2WKpdQy+QncFlUPTQuYJ9ehdwSOOBjx HNkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hZ1It0Vji/uE1zL1NVsuKRSwGtzM25+5b2pW/UiacoM=; b=lHjI/dOQa4lowx6wV/VzehQLtnNUGhAs/OWjtChRHdt1r7n/8fmiWXjRrOffPwJeR1 BNQJ6hQT8S5TFnXKVFO6eCBLcvdoTwymzdN1waUpSe6GWRFX2ByhY3+uOajl4aBHw+iO PshTPaUbHojeY+YmG3pZSAue/PUGtd/H2wEsSlGMay33nb+YmcbXBx49jBXB7OeXMY5e rr7QBjeWBgwOmhr81tdEUVx4P0Rc7bnNEPOwnX7u4dRYCRBj+WigWo8kNtrRbvcmBv90 rF2I2beOc820hd8hpLbHsf6A2I2uNQURop9BRnbOV1eQE5koMzJYrPIGJrnrd/YWpWt3 KHXQ== X-Gm-Message-State: AJIora/+2Nz4G7Quldszuowo6+xjvU6nuTp2q3pTqTf81Wuo9RmRg5WT yF49bAkdqgj+54NxzeMA0Tz8USobi08mXQ== X-Google-Smtp-Source: AGRyM1vXh266UHC3NnoZdb+TgfGbXSZEOsshPfjzAT9pyHGDK3xuydFO8pMjRPjdqKUPd+EuulyHMw== X-Received: by 2002:a17:907:ea9:b0:710:9003:9b33 with SMTP id ho41-20020a1709070ea900b0071090039b33mr4623225ejc.175.1655219853178; Tue, 14 Jun 2022 08:17:33 -0700 (PDT) Received: from localhost.localdomain (p5b3f7f9c.dip0.t-ipconnect.de. [91.63.127.156]) by smtp.gmail.com with ESMTPSA id f1-20020a50d541000000b0042dd7e13391sm7198180edj.45.2022.06.14.08.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 08:17:31 -0700 (PDT) From: Saravanan Sekar To: sre@kernel.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, Saravanan Sekar Subject: [PATCH 2/6] dt-bindings: mfd: Add mp2733 compatible Date: Tue, 14 Jun 2022 17:17:18 +0200 Message-Id: <20220614151722.2194936-2-sravanhome@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220614151722.2194936-1-sravanhome@gmail.com> References: <20220614151722.2194936-1-sravanhome@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add new compatible for mp2733 mfd driver. Signed-off-by: Saravanan Sekar --- Documentation/devicetree/bindings/mfd/mps,mp2629.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mfd/mps,mp2629.yaml b/Documentation/devicetree/bindings/mfd/mps,mp2629.yaml index f91acc42d652..fe13869e2c58 100644 --- a/Documentation/devicetree/bindings/mfd/mps,mp2629.yaml +++ b/Documentation/devicetree/bindings/mfd/mps,mp2629.yaml @@ -19,6 +19,7 @@ description: | properties: compatible: const: mps,mp2629 + const: mps,mp2733 reg: maxItems: 1 From patchwork Tue Jun 14 15:17:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravanan Sekar X-Patchwork-Id: 581872 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 8BF7DCCA47C for ; Tue, 14 Jun 2022 15:17:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236776AbiFNPRo (ORCPT ); Tue, 14 Jun 2022 11:17:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356556AbiFNPRl (ORCPT ); Tue, 14 Jun 2022 11:17:41 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9868F614B; Tue, 14 Jun 2022 08:17:40 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id v1so17769568ejg.13; Tue, 14 Jun 2022 08:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6jDc8NYKw9j0qO0CfGbHbtkna/x8yWVycKpFAr90cjc=; b=DZkOtGjEpO1sJbNy9nSKfTkiIbp+P4QmGZ81uEl5vOYZ5lyOkbez4qLuDZUlalBylI 6jXgiSugt/73hRCOI+k6NKXAE7qVfj1I20ZQ3xHt2KTsufSCJ160PGNV9w856nwtzZYJ YYtb0xDTAS5L/bPmdeNHo7/mHpBvkU0nWVSwFkJVLFgcyYZANvH4QguhyKv4CTPTg2r8 IHe3JwnlC2SWjdVA1LMtPltPEkC4iMPqm8h6QhUfhTN4hyMHd6CQcuUUGfs65tvMQ/bU /6R0lE5JL3yyx3tKPqvi/7qYxhsiI9ObzKeHi/n5CvpfVYTOq8wmuep5dZO+SHKTiApD 33rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6jDc8NYKw9j0qO0CfGbHbtkna/x8yWVycKpFAr90cjc=; b=vIo4leAUHMxSOc9puO/56Yd3MiLXj+DgV3PnLxcXPfLZhkMEJxVxjksE31Hfb8S9z/ Ebl1uslY/dCcljNQRis9tHQWBaPWaVnUbtf8fLQ+PZAMZJWevwDvVw4WyWjkrlosYVpW bdlqCbgJhgxFEV0qPEAQSOUVt5cwiu23DoRicm6M72S26jQKuYBidI9BKIvOSZj28tTc UgpkDMyf9CvX0tqhQdKlyh4ZlAJoLvOVljczBQsubxgTjzm5cspMfTwFlsS9szTxD25G 7l12LEsSu9Nb7rackgZT+MikXSSYXigSOP6+DCOrTXPHCHTMV7sPzH1d8pu6HPdt1JTx b/mg== X-Gm-Message-State: AOAM5307p/L+rZzklZn4tF95V00abY4f4bbmgYShBJ1vfAf5o5/7N5q8 qRYnS2BebnqySXsGNGbGzrk= X-Google-Smtp-Source: ABdhPJxycYdV5oj3QkuWaDhyeE3cJZaHW0V0ek65XDvKBULDtJWpvFGpHN0YGp01wvdr2UEk+BBcQg== X-Received: by 2002:a17:907:2c43:b0:715:85cb:21a with SMTP id hf3-20020a1709072c4300b0071585cb021amr4523321ejc.541.1655219859188; Tue, 14 Jun 2022 08:17:39 -0700 (PDT) Received: from localhost.localdomain (p5b3f7f9c.dip0.t-ipconnect.de. [91.63.127.156]) by smtp.gmail.com with ESMTPSA id f1-20020a50d541000000b0042dd7e13391sm7198180edj.45.2022.06.14.08.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 08:17:37 -0700 (PDT) From: Saravanan Sekar To: sre@kernel.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, Saravanan Sekar Subject: [PATCH 4/6] iio: adc: mp2629: restrict input voltage mask for mp2629 Date: Tue, 14 Jun 2022 17:17:20 +0200 Message-Id: <20220614151722.2194936-4-sravanhome@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220614151722.2194936-1-sravanhome@gmail.com> References: <20220614151722.2194936-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 higher range of input voltage. Signed-off-by: Saravanan Sekar --- 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 e7fbfe92e884..28d048eefce3 100644 --- a/drivers/iio/adc/mp2629_adc.c +++ b/drivers/iio/adc/mp2629_adc.c @@ -64,6 +64,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; @@ -73,8 +74,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 Tue Jun 14 15:17:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravanan Sekar X-Patchwork-Id: 581871 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 D7C92C433EF for ; Tue, 14 Jun 2022 15:17:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356546AbiFNPRs (ORCPT ); Tue, 14 Jun 2022 11:17:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343645AbiFNPRq (ORCPT ); Tue, 14 Jun 2022 11:17:46 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49D2B614B; Tue, 14 Jun 2022 08:17:44 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id v1so17769568ejg.13; Tue, 14 Jun 2022 08:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2W1wCeUkrJFdZgVUbL1ARvVnvMUdCeqcmW2xMidDUMw=; b=ksfRLZiEEqqqPT9ugF93LrfXd+48fpeQ+2CqwR2liioi5OvFf8ogwo9yxuJwJ1s31C bkM+H/vysA3efjajHEUfhkkZcUKgZsd9/8hxpJMgozvzrikGlPCAFI19cXNYoXRDAQ+o uDYh15tWIRnKMkZUqz3mM565GR4gpaPTKKjLvrLhpx4iPoAkJwhewM4QG6XPUyK6k9/S 7A6fH/T/6b/cw7HXrJDu8qum6mvCU/xWEdl/i+5Y9MUK/yIIVv9NKStLgckgEs5uelLF gzIMryAUDK0L2swAggGi7XFzqVTq5Hmw2Wcv9tEfmkcKFhl+D8CVaJQe6Q4YhLMLMznS Sasw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2W1wCeUkrJFdZgVUbL1ARvVnvMUdCeqcmW2xMidDUMw=; b=7Jaa27jXQjFg5M0lNb7kAdTsqMjSo/ffUi9iyMI+uBAMS+pChPsaIgnt7K6wrbpXna G+ocxBgHOBRuYkulI8vHF4ruUaaa98zPUx6XMeu+JSE2agAjh4AuzMlOV/bTY9BwojWW sSeNpWnKgEQC3KFfMBVecq8qwyIFbwnoHq1CKnBR4bOCi2ub9z/rYgVDUrrjcDaWJKNb pcSSPaG1mmNU8eKV2JOB5QeMDSYXEWJ5m+jOo6jJQsXXzxx7XnKL8TZP7eUs9KqmVR+t DuOflFMzELfSmx1nRRAiOoU6cX53CqjvAk2YHenfWzkSBsn2sB3L4mC1cIqYnUtjW7Ro MdCA== X-Gm-Message-State: AJIora9Tqa8U/7o73ooRE6UI/UZZDd06i9WbeDYOzNvfQMO+uTvjSE/P CHOmdzZgjJJ6Uc+r4BEeRLA= X-Google-Smtp-Source: ABdhPJy1mWhyep+XKrfVSwjeDQnhUleoXiuLknBv9l0tW/sYCIz0d5YBMgJ96+24pyLgKyUNmsKEcA== X-Received: by 2002:a17:906:1c9:b0:712:1115:42a5 with SMTP id 9-20020a17090601c900b00712111542a5mr4654969ejj.662.1655219863821; Tue, 14 Jun 2022 08:17:43 -0700 (PDT) Received: from localhost.localdomain (p5b3f7f9c.dip0.t-ipconnect.de. [91.63.127.156]) by smtp.gmail.com with ESMTPSA id f1-20020a50d541000000b0042dd7e13391sm7198180edj.45.2022.06.14.08.17.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 08:17:42 -0700 (PDT) From: Saravanan Sekar To: sre@kernel.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, Saravanan Sekar Subject: [PATCH 6/6] power: supply: mp2629: Add usb fast charge settings Date: Tue, 14 Jun 2022 17:17:22 +0200 Message-Id: <20220614151722.2194936-6-sravanhome@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220614151722.2194936-1-sravanhome@gmail.com> References: <20220614151722.2194936-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 --- .../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..42f37675aa0e 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: April 2020 +KernelVersion: 5.19 +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