From patchwork Mon Mar 8 04:36:05 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: 12121413 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=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 61FF4C433E0 for ; Mon, 8 Mar 2021 04:38:30 +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 E7E346514A for ; Mon, 8 Mar 2021 04:38:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7E346514A 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: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:In-Reply-To:References:List-Owner; bh=SmhDe4pyvS8IlcYLpZsMWEk4wDXqcXq2kdUEsUo4fkA=; b=dNQuUXp35Ja+7/ZBrQ/H/061Lw bFqCtuqgw6OXHUGHTtik5oKj6o/9bAOI6t61HziXFZCjaT+/I1eCTz0OBIs7LW0P0JhMmPNLyCgAl wSKD0ATJjYnjK8EQZLJsEgT0tZEvX8oLON+MkdEKJwMWHn0OMPoYyfAsXK6kXxLDt8gQnCClyRRbx /zi2EifOpTtCifV3RWMDirES986BbK58T9Ux+MF2511w2tuPoLCnajB3TLFvd2Mh41f5p69EwJdZO WYFGozLTv+STGo+FlKCxHl9OK81VXdPgFzANiT7WU40LdR4ckkTECf9Ojveu74e+EdWWMpRxJBaLl 7wO8JxfA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJ7dI-00F7MG-82; Mon, 08 Mar 2021 04:36:40 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJ7cz-00F7Dp-2d for linux-arm-kernel@lists.infradead.org; Mon, 08 Mar 2021 04:36:24 +0000 Received: by mail-pj1-x102e.google.com with SMTP id j14-20020a17090a588eb02900cefe2daa2cso907377pji.0 for ; Sun, 07 Mar 2021 20:36:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=frFr0rEwZ1mvFx0ODNHz2Mn0uGUh3IUayStZXkwe3Y4=; b=oS/pZFhfYsLgWpBMD4U3ondO/K8Dlcn5ex9y+wNgTIJbS6v2IOE/SRXl2p6TL8OFGv HUJ1yNbIbYQxJthZQA0Cm41Dx593QLs7qhSoqDrKX9xkwfgHh4TxVYaqB8iyI/q18WOX Kj1yLcZRMuMVX0nYsESD3NORPOnyM9AtN9Gic= 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:mime-version :content-transfer-encoding; bh=frFr0rEwZ1mvFx0ODNHz2Mn0uGUh3IUayStZXkwe3Y4=; b=geFyvGO88XxZdGCn88kPS9o765nTrO+2zCBzsLWpWR/GnlnnSgA0bKVd6VKdrvqvfm uu+5PtmiGs7MtffzwCU8sW9MLsAO6WUBMT0mtX3O/6VLd0OO5HBUuoBZa1jlbyQrQPd4 /6bDhNIVKUci3Cl/KtmLmgRXqW58HydtYG5R9HO2+8Jkh/mjZ9b00sc7mfu5b3/40Ttx h2bdvBilkfi8Gkewsrxv7Cf9RnMtvxx7jISRdRCSxm7h8gXv6D08T8T9VDX001maH6gk gNv5Hh4GN8gppDaBs/K6R14WoZBNy74pr7IwzTSJtvvrprPt7x/5FH04frpBrgqdeMgS BEwA== X-Gm-Message-State: AOAM53220dDmTb62P52/Ku/6ZUUhSKHCsSDJaPrlnZXYIK5PvcSZS1EK izkj3nNlsONmZcnURHkY4InI0w== X-Google-Smtp-Source: ABdhPJzjTHgZfblSCwgJ8vilflebyR1Y+UKGgoiG73tGWtfd+EgXsnrLI5gUCZ/UqbMJyjDyZQpraw== X-Received: by 2002:a17:90a:1049:: with SMTP id y9mr22687217pjd.173.1615178174280; Sun, 07 Mar 2021 20:36:14 -0800 (PST) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:5da1:da1b:5bcf:2d46]) by smtp.gmail.com with ESMTPSA id q2sm8191562pfu.215.2021.03.07.20.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Mar 2021 20:36:13 -0800 (PST) From: Hsin-Yi Wang To: Wolfram Sang , Bartosz Golaszewski , linux-i2c@vger.kernel.org Cc: Matthias Brugger , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Bibby Hsieh , Marek Szyprowski Subject: [PATCH v16 0/2] add power control in i2c Date: Mon, 8 Mar 2021 12:36:05 +0800 Message-Id: <20210308043607.957156-1-hsinyi@chromium.org> X-Mailer: git-send-email 2.30.1.766.gb4fecdf3b7-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210308_043621_300577_DE0318E9 X-CRM114-Status: GOOD ( 10.93 ) 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 Although in the most platforms, the power of eeprom and i2c are alway on, some platforms disable the eeprom and i2c power in order to meet low power request. This patch add the pm_runtime ops to control power to support all platforms. Changes since v15: - Squash the fix[1] for v15. [1] https://patchwork.ozlabs.org/project/linux-i2c/patch/20200522101327.13456-1-m.szyprowski@samsung.com/ Changes since v14: - change the return value in normal condition - access the variable after NULL pointer checking - add ack tag Changes since v13: - fixup some logic error Changes since v12: - rebase onto v5.7-rc1 - change the property description in binding Changes since v11: - use suspend_late/resume_early instead of suspend/resume - rebase onto v5.6-rc1 Changes since v10: - fixup some worng codes Changes since v9: - fixup build error - remove redundant code Changes since v8: - fixup some wrong code - remove redundant message [... snip ...] Bibby Hsieh (2): dt-binding: i2c: add bus-supply property i2c: core: support bus regulator controlling in adapter Documentation/devicetree/bindings/i2c/i2c.txt | 3 + drivers/i2c/i2c-core-base.c | 93 +++++++++++++++++++ include/linux/i2c.h | 2 + 3 files changed, 98 insertions(+)