From patchwork Wed Apr 14 17:29:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12203423 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CAEBC433B4 for ; Wed, 14 Apr 2021 17:32:00 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9A796113D for ; Wed, 14 Apr 2021 17:31:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9A796113D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=6bQJ2OTuISvVamTUOVECwh1/jmU8QVO3hOaOkWnwv8Y=; b=mcEkThzvOT6V7+vex6wb1sn15 /li3RKKhdyz575XDUNI4IghW7x8GxqumqN8UGrgyt7Xiu9lQI/YXl+3S7tkcGEh1ePsTnMdKESKQ5 pc8aTslFL5QW7WkSfEKsva5lg/PmXH6qddXDxH0wOlIkltWgEmusV+XaoueNbzCSK2T7CUqahyt0A yrzibNz6j1DSpGa72fNGgk7dYJI5A4cQEDyQvJu3JDgbJqGPj2rHkm+Z0wj6QN/vycIiTqjXs8INt SN/ueOQNvrPvnw822M27Ei6Lv0BRDS1LW/PGc0LylmWiYyRmh6L/K5QCYx3H40tfW9ZfZn64Ocege +7GEl7+wA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKw-00DGTq-8K; Wed, 14 Apr 2021 17:29:58 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKS-00DGQH-Kd for linux-arm-kernel@desiato.infradead.org; Wed, 14 Apr 2021 17:29:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Ezz+xwgw5OBNct98QIx3DrKz2g6nfTcGTggPHQsngzE=; b=yA8VE3a8JPK4cpBNHQkuJz6hTF BD8BRQUON2zapt7DdBNq0b2HfC80A41xtgifd0s0iCR0APMFMnoiUPXjYpEb7vjwaFD993ldTzKdy cLNVe1Ieli3R0waoXX3ZJ1NYiIkcDjvaH5mqC+RKwK/pzY2Bf/f9oc2iHV7OwQ2G9WPOwQuIY/a4W ZJNa5gI/v5O+9tNR6WL1dgsC+aQ2y5zwkncld0IJCfrULGdxH5tF/voGRRelzjvVR4vJObK28MCpR dUtJRBLbeDGmuAoDEWqYbZBVwOenSZyMKmpK6TzoAdFCb5kPwkkQyyIMlm0aJM5N3Mo5auUexefwN 8Q4D2HoQ==; Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKP-007yZc-Sg for linux-arm-kernel@lists.infradead.org; Wed, 14 Apr 2021 17:29:27 +0000 Received: by mail-pf1-x42a.google.com with SMTP id n38so14227939pfv.2 for ; Wed, 14 Apr 2021 10:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ezz+xwgw5OBNct98QIx3DrKz2g6nfTcGTggPHQsngzE=; b=C63pm7W76A7SIp9UYZ+J8BtLdlaH/RX2PaCySXAJoR/LKzJ2bOWM5zvyfMundtO5Jk cLEXickkIAcACf4uwt1m+KL17nG0kXSFQdnsmAScPPrqpCDnuCpWThFhKF2qDQ5WX6tC eX1iuq5/dmaeh+2ZZLN1piYmWW89BwHyMa/r0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ezz+xwgw5OBNct98QIx3DrKz2g6nfTcGTggPHQsngzE=; b=cQ7ZZptkNqsDKO0I2/xOHCFW1uix2oawwKdswQADZcgsr2HGtsBiUOd9mbAVgGEvm6 SqgvKGF7g5/cy+9pOTnAdUkvU7jLNWs9772aA8krav4aq3nc8UdIIYKHTRj+KUYQxu72 ZDPOFOSF2iqA93WaEzbJTOft3yF4a6Qsb8U3024Cv9zENVpkrBX5lYQh7gRKiqwhcQUq lJqCglX/Ax+rq9dCCzUA6l/WB8bLJq7QS8GNyDgReIkSxX3pkb7W8niw0F8bSQX++nMM 58+31i9PVfEjwAIQTAjs8oPK9zvBFxrWZl9I4LRWKZKC2wBM7EAwlNeLFAG5Rj/BiPp2 GmEg== X-Gm-Message-State: AOAM533lvOBRbx9Qxu5O4skKWcOfzFoJediar3k3xuwZWNx4Gp6A1LYs LgssjD5XyYb7XAANBxYGSobLtw== X-Google-Smtp-Source: ABdhPJysgkKW/4EtFf6y57mg3LS1NKoTRa4gq/KpnlkO4xtU2BgzYr96EezjQNXpi9pXPRC8z+P1sA== X-Received: by 2002:a63:4a44:: with SMTP id j4mr394617pgl.283.1618421364951; Wed, 14 Apr 2021 10:29:24 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:bae3:4af0:9792:1539]) by smtp.gmail.com with ESMTPSA id e31sm63460pjk.4.2021.04.14.10.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 10:29:24 -0700 (PDT) From: Hsin-Yi Wang To: Wolfram Sang , Matthias Brugger , Rob Herring , Bartosz Golaszewski Cc: linux-i2c@vger.kernel.org, Qii Wang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Mark Brown , Marek Szyprowski , Bibby Hsieh , Arnd Bergmann , Jani Nikula , Joonas Lahtinen , intel-gfx@lists.freedesktop.org Subject: [PATCH v19 1/6] i2c: core: support bus regulator controlling in adapter Date: Thu, 15 Apr 2021 01:29:11 +0800 Message-Id: <20210414172916.2689361-2-hsinyi@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210414172916.2689361-1-hsinyi@chromium.org> References: <20210414172916.2689361-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210414_102925_952627_61C72B43 X-CRM114-Status: GOOD ( 20.92 ) 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 From: Bibby Hsieh Although in the most platforms, the bus power of i2c are alway on, some platforms disable the i2c bus power in order to meet low power request. We can control bulk regulator if it is provided in i2c adapter device. Signed-off-by: Bibby Hsieh Signed-off-by: Marek Szyprowski Signed-off-by: Hsin-Yi Wang --- drivers/i2c/i2c-core-base.c | 88 +++++++++++++++++++++++++++++++++++++ include/linux/i2c.h | 2 + 2 files changed, 90 insertions(+) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 24c8f11bac73..c34920f30c5a 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -461,12 +461,14 @@ static int i2c_smbus_host_notify_to_irq(const struct i2c_client *client) static int i2c_device_probe(struct device *dev) { struct i2c_client *client = i2c_verify_client(dev); + struct i2c_adapter *adap; struct i2c_driver *driver; int status; if (!client) return 0; + adap = client->adapter; client->irq = client->init_irq; if (!client->irq) { @@ -532,6 +534,14 @@ static int i2c_device_probe(struct device *dev) dev_dbg(dev, "probe\n"); + if (adap->bus_regulator) { + status = regulator_enable(adap->bus_regulator); + if (status < 0) { + dev_err(&adap->dev, "Failed to enable bus regulator\n"); + goto err_clear_wakeup_irq; + } + } + status = of_clk_set_defaults(dev->of_node, false); if (status < 0) goto err_clear_wakeup_irq; @@ -589,8 +599,10 @@ static int i2c_device_probe(struct device *dev) static int i2c_device_remove(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); + struct i2c_adapter *adap; struct i2c_driver *driver; + adap = client->adapter; driver = to_i2c_driver(dev->driver); if (driver->remove) { int status; @@ -605,6 +617,8 @@ static int i2c_device_remove(struct device *dev) devres_release_group(&client->dev, client->devres_group_id); dev_pm_domain_detach(&client->dev, true); + if (!pm_runtime_status_suspended(&client->dev) && adap->bus_regulator) + regulator_disable(adap->bus_regulator); dev_pm_clear_wake_irq(&client->dev); device_init_wakeup(&client->dev, false); @@ -617,6 +631,79 @@ static int i2c_device_remove(struct device *dev) return 0; } +#ifdef CONFIG_PM_SLEEP +static int i2c_resume_early(struct device *dev) +{ + struct i2c_client *client = i2c_verify_client(dev); + int err; + + if (!client || !client->adapter->bus_regulator) + return 0; + + if (!pm_runtime_status_suspended(&client->dev)) { + err = regulator_enable(client->adapter->bus_regulator); + if (err) + return err; + } + + return pm_generic_resume_early(&client->dev); +} + +static int i2c_suspend_late(struct device *dev) +{ + struct i2c_client *client = i2c_verify_client(dev); + int err; + + if (!client || !client->adapter->bus_regulator) + return 0; + + err = pm_generic_suspend_late(&client->dev); + if (err) + return err; + + if (!pm_runtime_status_suspended(&client->dev)) + return regulator_disable(client->adapter->bus_regulator); + + return 0; +} +#endif + +#ifdef CONFIG_PM +static int i2c_runtime_resume(struct device *dev) +{ + struct i2c_client *client = i2c_verify_client(dev); + int err; + + if (!client || !client->adapter->bus_regulator) + return 0; + + err = regulator_enable(client->adapter->bus_regulator); + if (err) + return err; + return pm_generic_runtime_resume(&client->dev); +} + +static int i2c_runtime_suspend(struct device *dev) +{ + struct i2c_client *client = i2c_verify_client(dev); + int err; + + if (!client || !client->adapter->bus_regulator) + return 0; + + err = pm_generic_runtime_suspend(&client->dev); + if (err) + return err; + + return regulator_disable(client->adapter->bus_regulator); +} +#endif + +static const struct dev_pm_ops i2c_device_pm = { + SET_LATE_SYSTEM_SLEEP_PM_OPS(i2c_suspend_late, i2c_resume_early) + SET_RUNTIME_PM_OPS(i2c_runtime_suspend, i2c_runtime_resume, NULL) +}; + static void i2c_device_shutdown(struct device *dev) { struct i2c_client *client = i2c_verify_client(dev); @@ -674,6 +761,7 @@ struct bus_type i2c_bus_type = { .probe = i2c_device_probe, .remove = i2c_device_remove, .shutdown = i2c_device_shutdown, + .pm = &i2c_device_pm, }; EXPORT_SYMBOL_GPL(i2c_bus_type); diff --git a/include/linux/i2c.h b/include/linux/i2c.h index e8f2ac8c9c3d..953a4eecb88f 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -15,6 +15,7 @@ #include /* for struct device */ #include /* for completion */ #include +#include #include #include /* for Host Notify IRQ */ #include /* for struct device_node */ @@ -729,6 +730,7 @@ struct i2c_adapter { const struct i2c_adapter_quirks *quirks; struct irq_domain *host_notify_domain; + struct regulator *bus_regulator; }; #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) From patchwork Wed Apr 14 17:29:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12203425 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35191C433B4 for ; Wed, 14 Apr 2021 17:32:18 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC47161166 for ; Wed, 14 Apr 2021 17:32:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC47161166 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=GfHGdYkQsNRaBvmJ1v4zjgfTcV3YIOwd8tIG97BYflI=; b=EUk3Y5h+JBcoND9TYquOPdZsB eZhKbdeqiSNBoqU1ohJr5WU5a3j6YQLjY6ZRPZX/sOgeSeWtJaJphnSzKXSPhMibz/UaboZHGAb1/ A7RsLyTHSQ4z58KjWlhpi64K/nRSoShXzXrAv1ZYUE8BuCySy+upeeWNTXh3ob1MISFDHGL7cqCH0 ZGnjIba3WxacSxiuZwiR+rIV2klxOyJqM9CKpgBpeOweTwTLl/LKxUqDle9l0BxVKd58w/YbQGT+G E88j3HkZCms/Gv1lQLNjGtKFedia2SdLFtnujm4bXRl8bYZnVFg2cG2RKlLBWUCmYjm9M1P8CoNdW LYbp8OH1Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjLC-00DGWN-Dw; Wed, 14 Apr 2021 17:30:15 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKV-00DGQc-8Z for linux-arm-kernel@desiato.infradead.org; Wed, 14 Apr 2021 17:29:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=7XXmpI6HkWp3If8HQFwzyKKNYzDH+WeOIEtuebDT2y0=; b=eJsrda/+YUPFEYcNxvWRrZsKAx khkfSkTNyH7+bwEK/irXl3AHtYGAO+zUyU1HQ3XXvgBdCmt8hm21FyElN6Z5w6tM/zt13scrdle2I gRQW72dtYeu52Wm/s7pxHQ3MmtoiRhvmdYgIe06w2Yhm1GFKvKOo4XYP3eFLQamkdfpe/eE4UJm8a +bjIPSiUFpbG5gAyNndyJjUwkLRNO1FSGps1Bfpu61hBpMaSevLt7FSof2y0ktfstvw8XC4bCV/4G uSAjJX06nWg0HMdKlWcrB47U2AniGJdQlDeILYD/I00PR2oBlCE/FKZwVLsBL6EP5gFeoG+BYusuZ fjeuxfoA==; Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKS-007yaC-Qn for linux-arm-kernel@lists.infradead.org; Wed, 14 Apr 2021 17:29:30 +0000 Received: by mail-pj1-x1032.google.com with SMTP id s14so5778698pjl.5 for ; Wed, 14 Apr 2021 10:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7XXmpI6HkWp3If8HQFwzyKKNYzDH+WeOIEtuebDT2y0=; b=I+HzJNsWwPu+FB2uLUNEccOp0IOpNLd7gjigdfWKoW+DkwAVBGxH6GGl4TCfcMoszJ xRSSk+Z6mg9TI3va5vffbfIW6+DPVXdqsbzrAfZU4eQkN+wxC7jtCncWq/8r0rTElKO4 o8YvKWheqTGhnCuUklNdzVElOTiQliz9cKSx8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7XXmpI6HkWp3If8HQFwzyKKNYzDH+WeOIEtuebDT2y0=; b=CShPoK/3wZC4A+xvvxHZQXOjjamtjsGxyfcN1ro6GAzUO0Ca2Mcf0d8kYGDWge1ogS u/i66p9t5x+09mqTsfql9QHUVjYEXW0EjOJgCm69BOmsVukyBPthLIWkKNEmdv9o0+hz o6JArUJHLKs7Fyec+KgLJ9T9sDfSrxNsW+AqloKGHZ3itqDsuNiwn+qrr++ZEOjbYZxI en1uNsemZ6frg9DwqniWpVnkMTcdSbGy0v/aKyTj9I23ILFPwRlUf5S8wU0gXhJ+iavn o8GGTc3Ls46Gky49hJXqhfkGc1Xrz9HLcIEuqVMG6Xp09q8QCyIjequ+b2dxHOaj1Wwo /vug== X-Gm-Message-State: AOAM531+RGqYzkA7RAHoSTJtHX9Fy2jZM3cL/7dEO5BnwH9U/c5KLyrZ sk4tvQUo3+et/9/gfBA9AIZvtQ== X-Google-Smtp-Source: ABdhPJyKkMkvbglTteDlYjGwaiEf42P1VA/e4pB2K1gUgp1BeKp2w9jFz51WnfyldOcx2B7bgOvJYg== X-Received: by 2002:a17:902:ea89:b029:ea:c781:daad with SMTP id x9-20020a170902ea89b02900eac781daadmr23289889plb.62.1618421368025; Wed, 14 Apr 2021 10:29:28 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:bae3:4af0:9792:1539]) by smtp.gmail.com with ESMTPSA id e31sm63460pjk.4.2021.04.14.10.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 10:29:27 -0700 (PDT) From: Hsin-Yi Wang To: Wolfram Sang , Matthias Brugger , Rob Herring , Bartosz Golaszewski Cc: linux-i2c@vger.kernel.org, Qii Wang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Mark Brown , Marek Szyprowski , Bibby Hsieh , Arnd Bergmann , Jani Nikula , Joonas Lahtinen , intel-gfx@lists.freedesktop.org Subject: [PATCH v19 2/6] dt-binding: i2c: mt65xx: add vbus-supply property Date: Thu, 15 Apr 2021 01:29:12 +0800 Message-Id: <20210414172916.2689361-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210414172916.2689361-1-hsinyi@chromium.org> References: <20210414172916.2689361-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210414_102928_882860_224C0B98 X-CRM114-Status: GOOD ( 12.12 ) 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 Add vbus-supply property for mt65xx. The regulator can be passed into core and turned off during suspend/sleep to reduce power consumption. Signed-off-by: Hsin-Yi Wang Acked-by: Rob Herring --- Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt index 7f0194fdd0cc..2c45647e9f0b 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt @@ -32,6 +32,7 @@ Optional properties: - mediatek,have-pmic: platform can control i2c form special pmic side. Only mt6589 and mt8135 support this feature. - mediatek,use-push-pull: IO config use push-pull mode. + - vbus-supply: phandle to the regulator that provides power to SCL/SDA. Example: From patchwork Wed Apr 14 17:29:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12203457 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F10FCC433ED for ; Wed, 14 Apr 2021 17:32:56 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 791A861177 for ; Wed, 14 Apr 2021 17:32:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 791A861177 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=wmFvrRNcOXVJGax9A1JoGzAbdWh3Cz9a2vIkJXpNSdE=; b=lES7bzyFG8acv/iJ6jAqnfR2r 1pX1M2mJonO5LlS7Ytzn7qQ6Uguho46gs6pzo3EOEaXHVH8DJcKlKBfJCvgnU3aah9RzAMy0yuCXC yzXxinaM1nhuxZ2qdW8c+Dg3fzlPbgESkDiM/B84IsOfv6khZ//SQTxWcdwy9CQdjIsnFkGBN01NQ hNDc3k3JuZAwIX5CZwayH0bDhcW3SF7c+Yycdv8+cXoGG0dzxp92TpVpigu4O3YGTKScVGOgxMztG gFjwgseemCQ4LgKVrOIK45r+4dMVHOVvSgbvdr0aPAAbp0nIF/KFi3cOausMf9cheotK/cDS8Bc8l laKyBHIQg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjLe-00DGcS-Bj; Wed, 14 Apr 2021 17:30:43 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKY-00DGRE-9Z for linux-arm-kernel@desiato.infradead.org; Wed, 14 Apr 2021 17:29:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=plmO0AdMl820K1E1EewPUIFFIYm0UYQ8GWMNCMfiNMs=; b=LfPUQvndWnlQX5oTV7XDAsvZVf PWOm1KL0aFGQ0Czw4HLnQanyCY+ndHpbeQ4XtFiW1j89UnBq28SNRTBBBh0Z8gg7Qofo6By1Y86zn PgywY7bJEe1mAFpnOjJr1ywSO7nJpJeK74BKc10MEC0H0xjdT7m0ZMgPa0cOHTkAyAYm69ZFKg/Mm BseF5UnifCAJTHE2svl2GDzPH295Su47Srflwg1ExpH1Swiqg5M+7crW5XeKPLjn7u2J+Ls8+oAOz llhhcfrckDEEZdylAMRqpMDYBfDMR6Gv6I2Azl2O6Z40HY0zq+ZQOVEAz2SjHzEkfy3wj2pYTFweb es/YcdCg==; Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKV-007ybK-U6 for linux-arm-kernel@lists.infradead.org; Wed, 14 Apr 2021 17:29:33 +0000 Received: by mail-pj1-x1030.google.com with SMTP id j6-20020a17090adc86b02900cbfe6f2c96so11205535pjv.1 for ; Wed, 14 Apr 2021 10:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=plmO0AdMl820K1E1EewPUIFFIYm0UYQ8GWMNCMfiNMs=; b=LWWkG7tf2pAAxOYa62M6wF4DR6wuiuWheoc5zSNFuwA0w62Prt2SPX7h0tg3QF4d2V 44nkwDeNFfIzGlhxsD0/euzgJwjZy8/voyo4Fri/H5W/ug6v0hmlUPQH+WHtMo0TjM9m zGTvuXagrcNpxaxXK+HoZoVJQf5Z62gbvDiKQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=plmO0AdMl820K1E1EewPUIFFIYm0UYQ8GWMNCMfiNMs=; b=C7wQQDzUXiv3bwauy4Mcu6Rxd66w0WuyyNg9LA9FqtLM+llpIZhocIBkRdn9Ruv69i dIfPSvN2M3LC1RhsUqCii74JEIGH8Pq5YbuaG6asJSiXeVp3m1FRJD58+ZywCJIwMBpY p+IYdQW8y8l+FQP/yKGIo/EbSdtBEs++qBjpiU5fgmAfMlmSnzYWSpHvEzHBUuGQHFiE ZV24HdAUNoJO2/gxBK2uzDHyDaZT6EVgU9N/cYZEeKwa0hXy04hr96CzUenJk/5kpyLR TibuhOk2kJqkVEqd/B/qP4ltuA8FZq7N8gtrrud5G+gHn5l8swjq1g3IiLpg3D0hiFP3 R0Xg== X-Gm-Message-State: AOAM5323t6b/5s4QbSjr6rgaAAp4+AQJNSjaZnjMXsPKqJaRBdeNTOLd yhggZLTCnrNEC+wGQqv92oHrzQ== X-Google-Smtp-Source: ABdhPJzqi2vvW8j/Szl8iVKwjP6K0nUzELS0dvdFZgmCztvcUb4kX2kyyJdsJNS5/ctFp046mYN23w== X-Received: by 2002:a17:902:fe91:b029:eb:ad8:c5f with SMTP id x17-20020a170902fe91b02900eb0ad80c5fmr15248007plm.63.1618421371078; Wed, 14 Apr 2021 10:29:31 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:bae3:4af0:9792:1539]) by smtp.gmail.com with ESMTPSA id e31sm63460pjk.4.2021.04.14.10.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 10:29:30 -0700 (PDT) From: Hsin-Yi Wang To: Wolfram Sang , Matthias Brugger , Rob Herring , Bartosz Golaszewski Cc: linux-i2c@vger.kernel.org, Qii Wang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Mark Brown , Marek Szyprowski , Bibby Hsieh , Arnd Bergmann , Jani Nikula , Joonas Lahtinen , intel-gfx@lists.freedesktop.org Subject: [PATCH v19 3/6] i2c: mediatek: mt65xx: add optional vbus-supply Date: Thu, 15 Apr 2021 01:29:13 +0800 Message-Id: <20210414172916.2689361-4-hsinyi@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210414172916.2689361-1-hsinyi@chromium.org> References: <20210414172916.2689361-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210414_102931_987516_A787CB8F X-CRM114-Status: GOOD ( 14.08 ) 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 Add vbus-supply which provides power to SCL/SDA. Pass this regulator into core so it can be turned on/off for low power mode support. Signed-off-by: Hsin-Yi Wang --- drivers/i2c/busses/i2c-mt65xx.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c index 2ffd2f354d0a..82f2b6716005 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -1215,6 +1215,13 @@ static int mtk_i2c_probe(struct platform_device *pdev) i2c->adap.quirks = i2c->dev_comp->quirks; i2c->adap.timeout = 2 * HZ; i2c->adap.retries = 1; + i2c->adap.bus_regulator = devm_regulator_get_optional(&pdev->dev, "vbus"); + if (IS_ERR(i2c->adap.bus_regulator)) { + if (PTR_ERR(i2c->adap.bus_regulator) == -ENODEV) + i2c->adap.bus_regulator = NULL; + else + return PTR_ERR(i2c->adap.bus_regulator); + } ret = mtk_i2c_parse_dt(pdev->dev.of_node, i2c); if (ret) From patchwork Wed Apr 14 17:29:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12203459 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBCE6C433B4 for ; Wed, 14 Apr 2021 17:33:38 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A1D561164 for ; Wed, 14 Apr 2021 17:33:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A1D561164 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=pyeu+OGOVTdKJXfCaKb0d0spLv3re7OK2h1qp8KxDYY=; b=HE4DAovFF5AJtDfoTaZu7RZQ4 /M30xpeXrvASnLnp2Qx9GAXBPnPMjT7Fg2OzNoAdNe/nVWNyYPVtJx8SGu4JLKCCaPsuO0L+ls8KW HJt4ecqQk03i2vKN10K0GXA91YnktIk77LYOQiUcyZonBqTnYUSlDw+VFhPPs5JisyCnEA1ge0Mev y9hX7heO3swZt+HmHch0Uum2aGvOmtHynJsDGBiW4ftIzSkIO5mU9pNwBSoyL+IU7l6rrjn42Ww2A 1oYSRkjW3eTWvIzkM/JUsfP3QzLF4Uh3Xl9Ix4rB84uoypF2OSvChNZ6cpiOHns0V5fohNSX1V9xS kane7WtCg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjLw-00DGhT-Oe; Wed, 14 Apr 2021 17:31:01 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKb-00DGRc-EA for linux-arm-kernel@desiato.infradead.org; Wed, 14 Apr 2021 17:29:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=NtcyLr97vt7tBtf+Evf5JrbdU0JuK+5BO0OeaqqfGII=; b=I2LwVfy/z5JOolyJp+wflNB9aU 83hKOobhxVPlo5FQxEepzGNx7lS6e3b+nLZoprERgH3fSmIM5uX7sgrRViTICvqfdONtcZHUA5vIa SGdDJSALJexENSNTOD/mNlSzgx8oVrZZt5VhN+xcwbfUR/c3i8bJWnKKuOxfiVj0QRwFJqkiSOXGw rutxjL7nxJx9oh0//kyMqbmMU7oT4Cv/U/ARdFb441nHPw/ZBnU44UOJCgddc2JjtULiS9/l0gOfv zBrTzBH8RCtPJNlCoizbhhCkQODT7t7tW8divi20GBXBn4x/CsfxwknxQsD9zhQkcLb5T3qn6ps+h RWn6nHcA==; Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKY-007yc9-Vn for linux-arm-kernel@lists.infradead.org; Wed, 14 Apr 2021 17:29:36 +0000 Received: by mail-pl1-x630.google.com with SMTP id h20so10528381plr.4 for ; Wed, 14 Apr 2021 10:29:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NtcyLr97vt7tBtf+Evf5JrbdU0JuK+5BO0OeaqqfGII=; b=U3p66+Be9J9brLNZfLCAa72fmyHRhYkU2dLerndAukBzw9zqH+m1l2LBgLkyJu6/04 s1uRRZ+UJIiAk+qKJDPUqbNlfS9edRSd1TqeoyJPJaOheuKDsALg4RevMCAL+aM1mJni RIbOhRQmnkWslS55DoyiBjiz4r02jbQvoJm18= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NtcyLr97vt7tBtf+Evf5JrbdU0JuK+5BO0OeaqqfGII=; b=Ed4GjGremOSD94Y5QcdeXXriM3gx422XztLJuMVkiZ5dzS8pEXRiLlz4ElMDC9x/yc /y8rdnrZYKv3g0sTAiyvC/fk8Yt+vFAvvezP/mZH/kNprw2+nDBE96qdIPChwNfoChmo CpKIHt9+p7BSZA1SCx2InhKN8BqePO5e+MD5T50zxgJgZyEVInpitF8BtGln+3XUc1hS E5cyLKlF5640RT1YlYjwkU6qY9HAQdVTHluvQCytcOchHI8EijBCuuJlBaVEkaw7pPhC cl8s5JJXe2un71Xdz8TJzmQih1R7pzEY0TGNBDUpEkqQS6X3XUtLwrFLNhs98KA3Gj3A gk4Q== X-Gm-Message-State: AOAM531fubFL6oNULu7kHg7idl2drK+y7hvzQIgbYLs9pO/xVIP0wprK yr41SnK4b58ZQf9NhsxVXIPgkg== X-Google-Smtp-Source: ABdhPJwPcZosbX6F/FEtrRwct5NPpkw0jknr5o9f0r7xAc5sBoT3Dcx5C3arvvo3qFB/+caOXsY09g== X-Received: by 2002:a17:90a:ce8d:: with SMTP id g13mr4686960pju.85.1618421374136; Wed, 14 Apr 2021 10:29:34 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:bae3:4af0:9792:1539]) by smtp.gmail.com with ESMTPSA id e31sm63460pjk.4.2021.04.14.10.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 10:29:33 -0700 (PDT) From: Hsin-Yi Wang To: Wolfram Sang , Matthias Brugger , Rob Herring , Bartosz Golaszewski Cc: linux-i2c@vger.kernel.org, Qii Wang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Mark Brown , Marek Szyprowski , Bibby Hsieh , Arnd Bergmann , Jani Nikula , Joonas Lahtinen , intel-gfx@lists.freedesktop.org Subject: [PATCH v19 4/6] misc: eeprom: at24: check suspend status before disable regulator Date: Thu, 15 Apr 2021 01:29:14 +0800 Message-Id: <20210414172916.2689361-5-hsinyi@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210414172916.2689361-1-hsinyi@chromium.org> References: <20210414172916.2689361-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210414_102935_029015_1D89FCF8 X-CRM114-Status: GOOD ( 13.49 ) 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 cd5676db0574 ("misc: eeprom: at24: support pm_runtime control") disables regulator in runtime suspend. If runtime suspend is called before regulator disable, it will results in regulator unbalanced disabling. Signed-off-by: Hsin-Yi Wang Acked-by: Bartosz Golaszewski --- drivers/misc/eeprom/at24.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 926408b41270..7a6f01ace78a 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -763,7 +763,8 @@ static int at24_probe(struct i2c_client *client) at24->nvmem = devm_nvmem_register(dev, &nvmem_config); if (IS_ERR(at24->nvmem)) { pm_runtime_disable(dev); - regulator_disable(at24->vcc_reg); + if (!pm_runtime_status_suspended(dev)) + regulator_disable(at24->vcc_reg); return PTR_ERR(at24->nvmem); } @@ -774,7 +775,8 @@ static int at24_probe(struct i2c_client *client) err = at24_read(at24, 0, &test_byte, 1); if (err) { pm_runtime_disable(dev); - regulator_disable(at24->vcc_reg); + if (!pm_runtime_status_suspended(dev)) + regulator_disable(at24->vcc_reg); return -ENODEV; } From patchwork Wed Apr 14 17:29:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12203461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA28EC433ED for ; Wed, 14 Apr 2021 17:33:41 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 46CFD61177 for ; Wed, 14 Apr 2021 17:33:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46CFD61177 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=I/BQ1ihigM9OG0OQc0nqv+zUEKCuELlMMArny4O4Wc4=; b=h/fIxrZvcQichkz+r51me+QVJ Ps5yRbm1ETaFyXVkpihc13SNiVmKyRO3TF5O0Xfx2Z8qcCuKcgmTrFUhO7Rgyk52V3rH0kZUjJ/Dv o/cWi2p23WLrxVQskNNiKgQvm83uZsmKJwUHSchq8JI3CmlP8dzZIBaGj9yJEKwpcX7f2WrM3CjXy AacrOVq0sBuXib3VCJbyTYriC1URTHj64Nt4ki0Tn9K9emX72/w/dcfVlR4Zgv2ZFmE5VIEVcWupr jXwnyceSZxDCyHL1yXLeIb7GGn2/fjEljdSWKT13LdViRjlrcLkrvXi6+RYWTubu7W32D9qwGrvhg Si8Q3/4QA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjMH-00DGoL-9p; Wed, 14 Apr 2021 17:31:21 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKe-00DGS7-NE for linux-arm-kernel@desiato.infradead.org; Wed, 14 Apr 2021 17:29:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=SDiflsGvBCYCoVMBt0Fyo3zuZR1BmIQO6zXHXOu40Mw=; b=llnS4mR8q4lDQe+ZSuICtgErnM Dba3o7/ELt8Vs9GwJnxQl2we5/RxxHtA85zHd7+CJ+rfB9FxX9ClgjpeHf9QPKNDmu5b7hqaKmskq uzHjHTK1Py7x83rRK+FobC5UxWw12j7RCbETnQvXSh8xzAM1ZZUE2iw5V2iwW7MM1taEFoPThRZb+ KVFII1DBNNOeNdpk0eM/ISI6rbzTTotoq+9WNSWaWBH9BKJ0Fi4DX/5bvYCAd4h4J+qyJKKomoOYT 9HQRF8W9sRCB4a1dffbDWh0lyiFcVLUQ2JjWg+mSDP65N8EAWXkGcBJR1b+A82NlsdFfphQGCC2qI 5UgTJrnw==; Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKc-007ycv-4K for linux-arm-kernel@lists.infradead.org; Wed, 14 Apr 2021 17:29:39 +0000 Received: by mail-pl1-x62c.google.com with SMTP id y2so10522353plg.5 for ; Wed, 14 Apr 2021 10:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SDiflsGvBCYCoVMBt0Fyo3zuZR1BmIQO6zXHXOu40Mw=; b=bXgPeL+8QRF9Gjxpyiun2OlMg3Of3XNusHjUl10Do3tPZf0xCI4aDB2CRppJls5vCo cQZrEVi7aWWJZUwv0C5LOB+dx0PcrY8Q6BfrgGB9OUU8NfN7SFS2zO5jCmIGYunfeawR ywMgma3p50C1zJmwfplwwtgbrNeGp+IuyCWhA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SDiflsGvBCYCoVMBt0Fyo3zuZR1BmIQO6zXHXOu40Mw=; b=nU78ZVhJX6P+o+2IUJI5OyCECd/y6aSHgLZm5aIRFkWDgemd1cgpq0jIn33DkGs7bq /0hr26iFDWZToZiMtl8RRSjzvtR56V0ozUaaA3d+6+T++dKYtr0hklgH31uxxbqMpjHh 81mstv3GFjzSBUX5PrMDLhgEEk6tZsNzeizY0TIiBlvW7YlPi4OvM5a0hsgzKDG35AP3 BST2VDFcYyKlXnL9g2c9igPf5k9wExUMvSMkNGra/VXrT9JUDZdjrx1PDQXLa2gAEA1R VgXoOl3X3uV5AIZOOmtbkt8ZqXw8QXeXe/LsYys6F2fR61BicM8hj1KBr2BmRN5s424f 1/mw== X-Gm-Message-State: AOAM5302SfLDMi6xehQUaoByNWGBr5r88hiKHTmPbnFcLgYrf9fYQfbx 3KCEDbWI+4Co+P0RuFKLogCFXw== X-Google-Smtp-Source: ABdhPJwM/DI2o34F+WDaWrZsOlue0b7UjEhkAxTdz2w/M4qUcKAuHYkMB4oCu8X13AIH9xl4tSLwfg== X-Received: by 2002:a17:90a:df17:: with SMTP id gp23mr2497950pjb.7.1618421377192; Wed, 14 Apr 2021 10:29:37 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:bae3:4af0:9792:1539]) by smtp.gmail.com with ESMTPSA id e31sm63460pjk.4.2021.04.14.10.29.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 10:29:36 -0700 (PDT) From: Hsin-Yi Wang To: Wolfram Sang , Matthias Brugger , Rob Herring , Bartosz Golaszewski Cc: linux-i2c@vger.kernel.org, Qii Wang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Mark Brown , Marek Szyprowski , Bibby Hsieh , Arnd Bergmann , Jani Nikula , Joonas Lahtinen , intel-gfx@lists.freedesktop.org Subject: [PATCH v19 5/6] arm64: dts: mt8183: add supply name for eeprom Date: Thu, 15 Apr 2021 01:29:15 +0800 Message-Id: <20210414172916.2689361-6-hsinyi@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210414172916.2689361-1-hsinyi@chromium.org> References: <20210414172916.2689361-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210414_102938_194737_48080C0B X-CRM114-Status: GOOD ( 12.38 ) 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 Add supplies for eeprom for mt8183 boards. Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtsi | 4 ++++ arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama.dtsi | 4 ++++ arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtsi index b442e38a3156..28966a65391b 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtsi @@ -88,11 +88,13 @@ &i2c2 { pinctrl-0 = <&i2c2_pins>; status = "okay"; clock-frequency = <400000>; + vbus-supply = <&mt6358_vcamio_reg>; eeprom@58 { compatible = "atmel,24c32"; reg = <0x58>; pagesize = <32>; + vcc-supply = <&mt6358_vcama2_reg>; }; }; @@ -101,11 +103,13 @@ &i2c4 { pinctrl-0 = <&i2c4_pins>; status = "okay"; clock-frequency = <400000>; + vbus-supply = <&mt6358_vcn18_reg>; eeprom@54 { compatible = "atmel,24c32"; reg = <0x54>; pagesize = <32>; + vcc-supply = <&mt6358_vcn18_reg>; }; }; diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama.dtsi index 2f5234a16ead..3aa79403c0c2 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama.dtsi @@ -62,11 +62,13 @@ &i2c2 { pinctrl-0 = <&i2c2_pins>; status = "okay"; clock-frequency = <400000>; + vbus-supply = <&mt6358_vcamio_reg>; eeprom@58 { compatible = "atmel,24c64"; reg = <0x58>; pagesize = <32>; + vcc-supply = <&mt6358_vcamio_reg>; }; }; @@ -75,11 +77,13 @@ &i2c4 { pinctrl-0 = <&i2c4_pins>; status = "okay"; clock-frequency = <400000>; + vbus-supply = <&mt6358_vcn18_reg>; eeprom@54 { compatible = "atmel,24c64"; reg = <0x54>; pagesize = <32>; + vcc-supply = <&mt6358_vcn18_reg>; }; }; diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi index fbc471ccf805..30c183c96a54 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi @@ -71,11 +71,13 @@ &i2c2 { pinctrl-0 = <&i2c2_pins>; status = "okay"; clock-frequency = <400000>; + vbus-supply = <&mt6358_vcamio_reg>; eeprom@58 { compatible = "atmel,24c32"; reg = <0x58>; pagesize = <32>; + vcc-supply = <&mt6358_vcama2_reg>; }; }; @@ -84,11 +86,13 @@ &i2c4 { pinctrl-0 = <&i2c4_pins>; status = "okay"; clock-frequency = <400000>; + vbus-supply = <&mt6358_vcn18_reg>; eeprom@54 { compatible = "atmel,24c32"; reg = <0x54>; pagesize = <32>; + vcc-supply = <&mt6358_vcn18_reg>; }; }; From patchwork Wed Apr 14 17:29:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12203463 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE893C433B4 for ; Wed, 14 Apr 2021 17:33:56 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5297B61164 for ; Wed, 14 Apr 2021 17:33:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5297B61164 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=VjImr12khr2zeieTo47eL/f4lR9O5wT4QCu9g/t+dmc=; b=o1McX2rX0m8zVzyfjOP/bw3fN TfmD5//dtEYVGyTRbyAYJZBKwqA1pAkEUfmyf2wKDad3XW4SqV3L3MmJQYKd/qn6SPRBBYyaJMsW8 zHVCQn6EGu+46lVVKAKB2gxrhYuS0S+Hn/J8CW2vEDE9JDAYMohAWkMiIDpJA+av/Vpb4CmVYMIbt b+IMEayDlBl5qzrAAL9MRs4bGgiFjt0RdfqHtZph0Yqy5+gqKHcwQjj4j30CEabdAsJAh4jWMOyKN oVNdAuzm3pGqBGLbWRKYln2OJg0h5qL+BHnIKxPyqGvY6po0zIUCoF3S2ZdhaOp4+LuIcvZsVFb9F WG5Xt6y2w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjMl-00DGyH-9T; Wed, 14 Apr 2021 17:31:51 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKh-00DGSS-53 for linux-arm-kernel@desiato.infradead.org; Wed, 14 Apr 2021 17:29:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=70dSAhdvNf9rW7naVyB8FacZo/tKpmgYTIzZpzN71Cs=; b=ytwyHyPrUWfnOmxzSCuYUYsr1I 0qUAlDQH0jToA1NiIc8etpQb/cAfIwE0qUfKMts6BEMe+H28WVqv4fcHPq5QRhNZeZ6wQs+lgUi6b oT3I/ig4A4UG5bWi3HM+PQxhJjVQqIDC3G8Sk57+RyMSP38gpbbgCRmtQ1MOW8SRIIyO51rp6+yrC fs6zwRBGRKlo8lRGXEy9AbqaueauDRe5RcYydWaOeQyOANAgbWdDXMlI7iz9aE0MxL2F+onjZptkM 8pdKbFUGvrX5TIw2hSrfF1GuJliU0/NW2RiTDj79fUWJt2+7wrxYZexPWyi8LYf4ckYRI/gfOgVX4 lRiSbtmw==; Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKe-007ydl-Nb for linux-arm-kernel@lists.infradead.org; Wed, 14 Apr 2021 17:29:41 +0000 Received: by mail-pl1-x62b.google.com with SMTP id h20so10528557plr.4 for ; Wed, 14 Apr 2021 10:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=70dSAhdvNf9rW7naVyB8FacZo/tKpmgYTIzZpzN71Cs=; b=LsiMLszNVSqTMFSOmT7Vt7BL2HWjYpQnn9/Ah8Ahmt14VXi38iwnxuRRnAMd7nV+F4 L8OiYKIW4vYpw8N0fUeTwgUCiDMq5+HbPF+3sOym2H36ZFwtvq4PnCKSeplaTzdczwh+ M1/M+ijlrnFtXNjeEsgG7aN63y8Ce7LLt8uSE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=70dSAhdvNf9rW7naVyB8FacZo/tKpmgYTIzZpzN71Cs=; b=T9F4gVwHeCv4NzZJISPbX5X1n2kgFMSaWr3mGUZRCPxT3io2VdXEvnSpu/s40eTZWs PXTnCUHSsQODh5ZFfopOHGa263i33vbpNCuWPJRuY4/+TYF0T7aHkyBfR4uEL931JVB1 2DjRKaNMckczEuRnx3Uw1dUb/XFT7TFeBTKnCHZHpR8PgdeJ0PYpSlr4uWOawIEBJxVu f1Ddh3szUYHXaATA/vuUGnEgeEXz+rxT8VQABRwf3jJLmdgN8CsBBP9pIYDByZCWc/en yetSyjZamUgDPmCk5z/5sqvvxjLKUL0NtoJzvll3kBsgDWHgIBUrDE+FguJpPKDjlkEs Nyxg== X-Gm-Message-State: AOAM532kOztkwHxtVopKYbnBjhzu4zz3ylyLXyON8e7gBEsvqQqCnZdm 1N1Ttg+gomdtQ88B3SVc+cmSYA== X-Google-Smtp-Source: ABdhPJwqy6xfsxSkXZwh4yhPlR+yx5Kxrr/lleQqawAAaqaYA9AZc2k7rgE80MSaJDQAOD1ejSDS8w== X-Received: by 2002:a17:90a:ca83:: with SMTP id y3mr4896192pjt.191.1618421380273; Wed, 14 Apr 2021 10:29:40 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:bae3:4af0:9792:1539]) by smtp.gmail.com with ESMTPSA id e31sm63460pjk.4.2021.04.14.10.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 10:29:39 -0700 (PDT) From: Hsin-Yi Wang To: Wolfram Sang , Matthias Brugger , Rob Herring , Bartosz Golaszewski Cc: linux-i2c@vger.kernel.org, Qii Wang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Mark Brown , Marek Szyprowski , Bibby Hsieh , Arnd Bergmann , Jani Nikula , Joonas Lahtinen , intel-gfx@lists.freedesktop.org Subject: [PATCH v19 6/6] drm/i915/selftests: Rename functions names Date: Thu, 15 Apr 2021 01:29:16 +0800 Message-Id: <20210414172916.2689361-7-hsinyi@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210414172916.2689361-1-hsinyi@chromium.org> References: <20210414172916.2689361-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210414_102940_789891_C5F2C81D X-CRM114-Status: GOOD ( 14.56 ) 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 pm_resume and pm_suspend might be conflict with the ones defined in include/linux/suspend.h. Rename pm_resume{suspend} to i915_pm_resume{suspend} since they are only used here. Signed-off-by: Hsin-Yi Wang Reported-by: kernel test robot --- drivers/gpu/drm/i915/selftests/i915_gem.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c index dc394fb7ccfa..525afda9d31f 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem.c @@ -94,7 +94,7 @@ static int pm_prepare(struct drm_i915_private *i915) return 0; } -static void pm_suspend(struct drm_i915_private *i915) +static void i915_pm_suspend(struct drm_i915_private *i915) { intel_wakeref_t wakeref; @@ -116,7 +116,7 @@ static void pm_hibernate(struct drm_i915_private *i915) } } -static void pm_resume(struct drm_i915_private *i915) +static void i915_pm_resume(struct drm_i915_private *i915) { intel_wakeref_t wakeref; @@ -152,12 +152,12 @@ static int igt_gem_suspend(void *arg) if (err) goto out; - pm_suspend(i915); + i915_pm_suspend(i915); /* Here be dragons! Note that with S3RST any S3 may become S4! */ simulate_hibernate(i915); - pm_resume(i915); + i915_pm_resume(i915); err = switch_to_context(ctx); out: @@ -192,7 +192,7 @@ static int igt_gem_hibernate(void *arg) /* Here be dragons! */ simulate_hibernate(i915); - pm_resume(i915); + i915_pm_resume(i915); err = switch_to_context(ctx); out: