Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp354540pxj; Fri, 7 May 2021 10:04:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLBJV9tOpNzJYUloEWsTctJZuQ/Rc+HFIEum/RgVNpNHzPDWOSlAgu8+xTw3AnFTBNt8Tl X-Received: by 2002:a17:902:6bca:b029:ee:b72c:5585 with SMTP id m10-20020a1709026bcab02900eeb72c5585mr10598779plt.46.1620407075409; Fri, 07 May 2021 10:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620407075; cv=none; d=google.com; s=arc-20160816; b=1KDWUbs4qYZ+h88hrcnyhqdUXDl/5zfgXs2IDkv6D7u0spmYx/x6BtNEr2LBqYS1vu COK+Q/oqK3oeWzVoMBKGsHj+DK0hNakdwQKukwY8aPwXR2mmAUbok+nqkAUmGQI5QwR/ lNEtewgnAgBr/Uck2wozx4DJFKSxPkrHiwp9JMP7+Bkz6Ur3Rw8QfvXNGOXQ+lCCFsvW nMp2P/0aFmBHxXcPyi0BmLMKpGeqo22wrCYF/4UDOaN/QwKUP0BMlMJp/LvK5d8JO91e DHYdbEfBLbzRe+8za84TEzmudSAjBYBrsclAtOSpdfyLbDmw29ZwbpoOSiVc0dG9Y0rQ JywQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kikr9ZhoRbpRt9r742gt6H3+Tb3lJblPdN6YyE6SQsY=; b=L9QzQ9MFuUTPXlrAZW98dAkdyaKVC/PTJanmElx/7WDxrzI5jo3VR4miCSwZkjkLDl OuK+QfuD2xAUFDWBUqIEfY4u6V8qzT/WmUFDjo1l0qy1ZjN/DaZAbDprXD9MOlC7aY46 VF7kSIlbasm4Fzd87DI29Ya/WCgdAyMTY8f54NeuMAwVtwJTr30nhd3Gfs4PnC3ZHXXK Qs3c0WUTLgrcY+OdmyjUML299puyv2KFzzbnYJhLhD2dU27OUp0nm9DrKseWUX5ze+Nq tBJZV9B3GzIHhwyQryLovokfvSQQcS/Ce2CVCq40bi+7keV7iHPUgVyCzr1DDs6+pewM MEhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EAvHCPHy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r30si5263317pfl.322.2021.05.07.10.04.22; Fri, 07 May 2021 10:04:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EAvHCPHy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237184AbhEGNPd (ORCPT + 99 others); Fri, 7 May 2021 09:15:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237150AbhEGNPX (ORCPT ); Fri, 7 May 2021 09:15:23 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66908C06138D for ; Fri, 7 May 2021 06:14:20 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id t4so5115211plc.6 for ; Fri, 07 May 2021 06:14:20 -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=kikr9ZhoRbpRt9r742gt6H3+Tb3lJblPdN6YyE6SQsY=; b=EAvHCPHyHbXHiIiNsXn2M8do7dMCJUcobH25Fpf1g+s7gllEtWszn+qb/57yyeQQmp CBhSV5miPj08lzUv2duZT8QDmc5As69tht5584Xf6Nh8y2dwtdK8QJ2ot5p1Qz9zsFgs U8IzCzmwdrhPxHFILcqqaB0XfofyPavr0uwkw= 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=kikr9ZhoRbpRt9r742gt6H3+Tb3lJblPdN6YyE6SQsY=; b=PemoQfzGUUq0Bs71F8MjISgZgXwxbGMRznHtsjoMnoZHC50OYPniiWUAPxof1CZ4q+ LolZG221BvuoxUSQs1RGEv7k4PUeV/Fw4LptTi312BPrMaAOrmTcCGIOrvI2A1Lb5Pj4 5iJymLPHHiCtZWGNyLK4dPSXVUx61q6RnPOm+usngfTNKw2JKxE2h8iSU+H9kP3Eyrrp J5Q2zO9wu8jQyoBxUxSvLAZjPyXGagFbeTZjmMlR2dh8gTiNiw9r5TfBDJDsADg7Iwch 8ooIiOvyEDlTptQpmpQ6DUqYLgn314aM5FGmV1CYuD90lG/TRyrLNa8qEGgqIA0BGlqZ FDEw== X-Gm-Message-State: AOAM5336VGGfznwHqSRe9qupxNsvo2SXkBSpo8OkivlJmTDqF4lefTZ0 MMBWhgQOpuqVQusw13aMg8edNQ== X-Received: by 2002:a17:902:8682:b029:ef:d2:4311 with SMTP id g2-20020a1709028682b02900ef00d24311mr6293896plo.4.1620393259946; Fri, 07 May 2021 06:14:19 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:711f:8553:a124:a19]) by smtp.gmail.com with ESMTPSA id z29sm4656539pga.52.2021.05.07.06.14.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 May 2021 06:14:19 -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 Subject: [PATCH v21 3/5] i2c: mediatek: mt65xx: add optional vbus-supply Date: Fri, 7 May 2021 21:14:04 +0800 Message-Id: <20210507131406.2224177-4-hsinyi@chromium.org> X-Mailer: git-send-email 2.31.1.607.g51e8a6a459-goog In-Reply-To: <20210507131406.2224177-1-hsinyi@chromium.org> References: <20210507131406.2224177-1-hsinyi@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 5ddfa4e56ee2..22d1d14b5de5 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -1220,6 +1220,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) -- 2.31.1.607.g51e8a6a459-goog