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: 12203429 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 4BEFFC433B4 for ; Wed, 14 Apr 2021 17:30:20 +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 BE0B161179 for ; Wed, 14 Apr 2021 17:30:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE0B161179 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-mediatek-bounces+linux-mediatek=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=4/dn85/DBxE7vWgIpbMlsw6cH4clYTqgOX3N8DQch8A=; b=Isw4BktC0aNg0ClxcfwvKZ9hK 5Y+5Kvj0TGgV7KHAV1ElpBlAeUcD6j3Jy/ZIvXhgzb9le251s4qHepMjw4woP6z1cB4LT27R4M4Iv 4RSgXjOa8lDG6DtZsm8pBXNrulI1uE5MY5cYT6rljQvPMs6LKlnMBkb/bzoh0Hj/z67m/v68wsF3y gPu/oB7J1UkJHubLn1rHxXaW8IRzoB92zcatMjFCkRPU55dpafSvMhhQmlu0ALlvPuAj1rkyRL1Ph 5rcWp8SWC1hn/fIh/G24bPI7a06BhDAPpf8nYAufnVroWLe18aC8xqLddDeGow3aaxWAyqu5bZSG5 X2Pw4ZDeA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjL5-00DGVR-E7; Wed, 14 Apr 2021 17:30:07 +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 1lWjKT-00DGQI-BU for linux-mediatek@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-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKP-007yZd-T9 for linux-mediatek@lists.infradead.org; Wed, 14 Apr 2021 17:29:28 +0000 Received: by mail-pg1-x529.google.com with SMTP id p12so14912857pgj.10 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=eHXD9zcEOuGrF2D+jlaQAag+1mmaEH4Fq3iKQgjSOr8pi00Weovis9y11FtNMdFZ0z Dzqg/yGqFqKzmMU29FNhAKxE0SeJitAg5o0g80BlqbhxYNLlqwt38zBUmKcqi10YqC95 Urp0JgBektmPQLe8t9287Y2c8EKZX4Qn5FimEDxytrYI4aDV6AeYsvejxmxXhXepzZIy LKkN0COObiZ2FOjjGuagEj8orkYFcF1mPyW5qq99jX5BVuFB4iWudSE9PlqSWiv8ATU3 nHkoW6U3sLjsRS8hy3xFONzkUs4KRK03PVRDS38G/aFWCbAyizl+LpWqfhny6ZP86e1n 5yyw== X-Gm-Message-State: AOAM531SnpulNqN5Os94/56tKfsIqotzJMaUpIdrDdZbnimq6M0wSveI n99O8PmRCgrwkI7Vb2OZh92J+A== 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_955391_B176CE9B X-CRM114-Status: GOOD ( 19.60 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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: 12203431 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 82E2EC433ED for ; Wed, 14 Apr 2021 17:30:42 +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 F0E0161166 for ; Wed, 14 Apr 2021 17:30:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0E0161166 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-mediatek-bounces+linux-mediatek=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=UDjU4IDUoLLEFCsfrUJ7z79jKSa7H3owNfsNzlYOw+U=; b=IR3h41yrjkq1mN6uymCK8pzxM RFirTd23Mp5mJoIRl66slULYqOCP5JoY/pofwsZb39DTRVDI5K/0EJVMsylQLWxAh/T1X1hs3EoOu 0HXwnRh+CoP1V2iRdWMDEnXlAdbpQh9+VKZwLP+rshj6QGxm4wV1FI2EJq+5kHJWcTC5WJjada3/X 7OVRd1W6ZR3VI5T87+x4S9ViHExi2LdbYCud50UR3hcROtgzPFURtqxVwgTD5goUwpUn6u1m4EO/O hUxehQs8e/HMrVIDcApZWqPz1h0fbEXZ4QwOazOGRdOCjhII3KCVF+vk+AjM5Qqap7PKhu8uJLv8i sQM96W5Dw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjLR-00DGYe-IT; Wed, 14 Apr 2021 17:30:29 +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 1lWjKW-00DGQt-Da for linux-mediatek@desiato.infradead.org; Wed, 14 Apr 2021 17:29:32 +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-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKS-007yaD-Sh for linux-mediatek@lists.infradead.org; Wed, 14 Apr 2021 17:29:31 +0000 Received: by mail-pl1-x631.google.com with SMTP id y2so10522089plg.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=roRmtHiGpqEInR/wfKywutKBUypOe+8CnRxVp81Cwfhb7ekPgUkjF+ZfNgji7gQzVy gPykKchoK9iO2dpLY9n1BlPJOtBdjGJegh7bLto61ipdyH4RUfHbbKqyJjiEssUCGvkQ OWAnEzYL3NIYa0joy+De403RyLb/D/jFiy0qdhGS+9rEXfNvmpJnxk2A1HmhJ938e5oA rvUXm/vIrfajgHXpWR9bxRXIjM3birNd9jlgz6z+ChLmVPfWmJPN3rlohCYhIs+C3rXR 6rL7k4ePLN+rZexwFRu6NE3VDjxbcwE3zxS8rghPaOI75fnWblWDxVfWj+KITBvatxQF ngPQ== X-Gm-Message-State: AOAM531SXFImmPhbj1wp4uYsTkChSSmksSgpc+MkRQ5kc9bTYYu0kPo+ ttxcs+9gB/GurrLu7NUUlkXCkA== 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_932089_E214967B X-CRM114-Status: GOOD ( 10.80 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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: 12203433 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 61123C433ED for ; Wed, 14 Apr 2021 17:30:58 +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 CB6B761168 for ; Wed, 14 Apr 2021 17:30:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB6B761168 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-mediatek-bounces+linux-mediatek=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=ZMY4tBT4jMDL8+S4atQahzbdZD92maplrS8fp23rW2E=; b=n6qMcNcfwt30cyu+Ei8WtVVr/ xpHKM/N0DBrk4dP9Mg3KBrsfPPLWGBjHKz0QUr0x6bsHcvjqdyy2wb+ekVdVyA+bMm6KoQVQCu8s/ wjLxbu/J+dHm811+jQt6hiN2rBSBuuBDG7jbBjh3xRtYQfpmoN5Of5YwavmflR9BQsZCV0VvKVRU+ Uqr3TzjMIhvYFAxLvOfKgDmB2CvUMGqmd6VedgRW90Tr9s4UCCQ3mRTfya9o8toncWs85FOiMPCUE DUkE7N9Oax/4VOYLlWVIJYiU3wPreYRI+svtRdbEIGy1nyirKnYqr/eoHhmApHEOGwWHEGCuH3/xF aJxwsaWUw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjLZ-00DGas-84; Wed, 14 Apr 2021 17:30:37 +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-00DGRF-BS for linux-mediatek@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-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKV-007ybJ-Tn for linux-mediatek@lists.infradead.org; Wed, 14 Apr 2021 17:29:33 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d8so10512125plh.11 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=b7fAK8QnNI/+g9uHPaFK6UeAx4VxlQsEA3CVJREM5OURWW/Mjm/RkvRAOHuv7btOA6 uLrXM+H2KqYwCslj7ygq0rkxkuOz5K/L8OgE76JJf2s1n8JYDbwVsJ51LAsdbQEMSSf4 ujpK+CaukILVHIM+k6xgQHtK1CYWTx/ahsO8Q31wjKHqA95YgrqmwIroCLv54ckScLBH iKzGwfTEpVd7PDhD/pH0hrfoydhc+TbXtY74rp9+tCU9p5/Dcl631MUHLTITeVObudLl Y/uyP4ZCsLWsz+IRcupVxsSaEIyjLUKGQMCLc7827/NKCnV0Tq3Wsudt1ybVxPtB3obD dqgQ== X-Gm-Message-State: AOAM530KEPC3x7H+Ld78MpW3IpTzx3BC+Bdl4Xz10UOXNvquSVEpK6aN zifvjJuOCZ+63zK8cA9be/kH3ZcV6m75SA== 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_977489_25EEE03E X-CRM114-Status: GOOD ( 12.76 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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: 12203435 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 7817BC433ED for ; Wed, 14 Apr 2021 17:31:11 +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 E25AE61168 for ; Wed, 14 Apr 2021 17:31:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E25AE61168 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-mediatek-bounces+linux-mediatek=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=4LGsbJFruQyOyKfRSEwkguwsgxT4D8QbTlMwHShFuJQ=; b=CVgt1BxVydWfBfbBmOXsS4oUh wdDZdNa2mgq7FjQM8QpOvMvTVO+yP+5LgQmUJA6DDQzMnl1Y0TCaa2B2u0reVGAx7Wv1KAeMgdSVS MXjN3oYbo71MhSSLugwfaRLTvcxhz8H6+yaObJPT6a6G9ah3dSH374730W5i5ATX5V8TPsV9HEQQS 5r7E50C/J3zRh18POn/HSUm7J59+B1uF0HKjp1+219AVT1LKMWIqtJc3awuVpQBOVe0WGc6B+v6LI s2drFL93PF7sEitXk4u89oEt9FPqzNy72eTSCFz1iATvkZs40eyu5lx+uklhN7+DYvaiSc8iWSPbJ NZ4CbrQuA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjLt-00DGgd-Df; Wed, 14 Apr 2021 17:30:57 +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-00DGRb-E3 for linux-mediatek@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-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKY-007yc8-V1 for linux-mediatek@lists.infradead.org; Wed, 14 Apr 2021 17:29:36 +0000 Received: by mail-pl1-x62b.google.com with SMTP id e2so6215002plh.8 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=FIAig8WqKThx5l7kYUZFHRDIP5VuaaeQtyFZwYahh8QIj3NSsJE7t2scuh9So8DA/B fYRK2QgEHCEliQyYSq0eOW5bFycWRSi5yEcYbQdXBrbHvZeJLMI+kVTK/BeLKW+IVCJK ctZSxQzgi469p0BS/zftn6mmqM3waQNvRK5f+LoTDINoA2P/X+TWC/cy6X4Q9I/crjHw JCLbzLDDI4dtf7+9LI+ba9T0kSm2xqAn06OirIBn9Jbu7NWi7yehtvKGnogoaC9HaXIC GQGlG0lcLFSvLbN2Wt+Rry4NG/ZpNXjiMJO0E/GLLg8CajnM8K5dCoi4e/+gToen8cgb XegQ== X-Gm-Message-State: AOAM5305ZTuatdJkLgsSLZz2mPQK9ynQ6KCmc9dqxON5leekib8wvcsh pqni9suutc5KJ6Otss8oQtOuoQ== 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_014904_42784539 X-CRM114-Status: GOOD ( 12.27 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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: 12203437 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 AB792C43461 for ; Wed, 14 Apr 2021 17:31:33 +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 2DCF16113D for ; Wed, 14 Apr 2021 17:31:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DCF16113D 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-mediatek-bounces+linux-mediatek=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=NSDMOTOCQQriLAkWCOQ3LXTCGHJLfT/5Fwhp1WxRTOI=; b=IlextyeaLd3w/IfdYXl/UWIxr 3iXRcOEsu/w+rqC8gZTSz82qITMpfu3+gPZ6TaTg99orM8S0mA2aAtpt5XREtjKSC+F0pCu0s+1iW CXxbe9NT0ivkZSwg7mLrKremCuXd6YO/c/kmQMgGDU7yLJJQyE8a/Nd/MLgYbJ2oJfuDXCT+7Eiz9 zp6sDu8RE8fU10S8eDXFvYQ1tymTM2w7sCM+IEt3JN26KRjq8p32bR27oWwJHzdOWBoK9O7zgwIAt LhOojEvw5gS/icSycSUCWUfd+lfedyJ6z6aYm+EovXLkuQV/8/Dm2s2o9k4UDuodieVoFQ1wWVfuF zZzajDa+Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjMA-00DGmn-Gq; Wed, 14 Apr 2021 17:31:16 +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-00DGS5-LF for linux-mediatek@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-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKc-007ycw-3w for linux-mediatek@lists.infradead.org; Wed, 14 Apr 2021 17:29:39 +0000 Received: by mail-pj1-x102f.google.com with SMTP id q14-20020a17090a430eb02901503aaee02bso144324pjg.3 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=A89y9ceXXzKQymhajv53Qb5ESUK1fJ1uEsHqK5SMxIK2d8ApBU1KiM6PiYycYOCIyM Drs+2CslvvOWD8AvWi8FrDM7PFWj0UB7ChGu2c71qA+D0LOSTAoRcTXz2aE52pqPOehT aN/Z7abOmCv88nEXyGs6vWtdQoJ9KTxiHSOJ5NVntFcTy9XhBb1SECxqQrkcE79VqypO 0xEzYCznDr765IrM8lJgXkDAmN6QzRxnyZv68YM4qT6jwZuuq0f+Y/8YzqLlujCBrBJ7 UjCUElqpNDNj1wXolz5RdVRfyxUtmF4ZMioEhMdx7jAlC0Ny2RhE/DT+Q8CfqudhKATa FGZQ== X-Gm-Message-State: AOAM531eurmPmf1aOcFIuwWCn8vXUTAuM+Ogxe/KQYbcwUM8J0fJvjAT 8JYmLETwQ4jSJySkFaaLHskQNA== 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_189613_5D604829 X-CRM114-Status: GOOD ( 11.05 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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: 12203439 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 2D06AC433B4 for ; Wed, 14 Apr 2021 17:32:27 +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 A485161164 for ; Wed, 14 Apr 2021 17:32:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A485161164 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-mediatek-bounces+linux-mediatek=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=SVdYxIyAm7KxbbKqHtAKxLws7PM1b0ZhuDJlE+m642s=; b=LJkBc+f8dI4OxE8XPUHEbESA2 24V79fyPn8blanmH0mri4+TlxbLPU8SRhX4JuIrxXlK53t3CyPzFrHOUvhRLKyvrjdjp5diUN3I05 P3FLmi09cl0wWhvVmuksIW1wPX3Y6LZ/alLUQRqc/hKlnN8L6t//zPvnYKdYlCX96aUG7Ids0AbOX faavsLo4qE1BIl0wF1cDFysHGGE2Bcql5eDfcalAOx1lEO/e5OSOxcLKc7Gcm4X+Cec4RyhR2yoIe kSOZCCK9uN4GouG0nnA6qR7gOUxb/Yg1/Y9Ww03fcxIf785VQzKfPtra5CjKJQEY3LzZNOsXiQusI JdkB5XTuQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWjMy-00DH5x-D1; Wed, 14 Apr 2021 17:32:04 +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 1lWjKi-00DGSc-96 for linux-mediatek@desiato.infradead.org; Wed, 14 Apr 2021 17:29:49 +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-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWjKe-007ydm-Oh for linux-mediatek@lists.infradead.org; Wed, 14 Apr 2021 17:29:43 +0000 Received: by mail-pj1-x1036.google.com with SMTP id lt13so1776564pjb.1 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=e71etT5A9JoJaN3W2kKc4eStW8XO6auVsIAzQA6QVCRJOKe62EVyKDTLcOmxe8Pd7F 4YKK4hgSQ1S+l1V6x8W5PE5QfUaxpECVs/TO+wdxuqfbIZ4LRPnbssJHyL3xzDYMuE+e timjJ/ncx2DjF2sWThOmWmrk9nEMc57lzgncpBiMOKhRHHDiQOiW5XNsi6LSb1PBFdkj 86ZLAWbk2Xr9zD9DL2avGRrvAEOBlQQrr+2Vt6DQWyHrVIiLxH6bCHnW+jqFc4+7Uufw +mXh6lmR+kFNKtxHZ+xBmJ/3M6KHUd/d8lVKQfhdHZJgZ9rTcis3ZAvL5Fg0sZNdIfgn hykQ== X-Gm-Message-State: AOAM530S7o2tskl/kWKXTUjEd0gKhJrwL8B0RXUAaZPQZZ7Mh05w6+VF TzHS6vNJt61QXQv+/G6oG/QQ7A== 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_808664_05F0947A X-CRM114-Status: GOOD ( 13.35 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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: