Message ID | 20221109-i2c-waive-v2-0-07550bf2dacc@chromium.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp392919wru; Wed, 9 Nov 2022 07:18:44 -0800 (PST) X-Google-Smtp-Source: AMsMyM7UC1JWpXeLUnWGw6pnkufqhxd95haluL4Q/kWe9gNzRObC7/Wgt+9+hwAf09qjd/vQ1Cws X-Received: by 2002:a17:907:1def:b0:7ad:9673:8668 with SMTP id og47-20020a1709071def00b007ad96738668mr55991020ejc.698.1668007123949; Wed, 09 Nov 2022 07:18:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668007123; cv=none; d=google.com; s=arc-20160816; b=QFK44TzPhBg0yZCR2xyoS4eGUeZhrubQUJqGIUmssbnEAXJdP4vCKeQJzAJOJpFiw+ s+hDfcApMA8GuJjbDVLl/BRuqPDhZFo3cJJ5nuwOLRfvAYxJCRY2Za+0LEUJlWN/bmSJ l+dPbxtgfRlGu9lINJm+GDDFiMGOQxBBGi8q0wkl4seWzNZICv8pAaTRz1nyzmlvoPRS SyMtJq/WfglxhH3cHFoBFpyeyp15ri5wYuGOZCk+hK+xtiROzf70PNbv2xI2DpAP314G SCVTD7/C21due1gVilEmjVi6vnMy7thjPKSb4UqmJH924NOYe5MQHxCfuLXtO1O9Y+8v +6Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:date:from :content-transfer-encoding:mime-version:subject:dkim-signature; bh=zmk97Y1kdEfRXSICOIciCIHq7hoxuKuixGqwic5cTfk=; b=EvToIIyz4q1YMB3ODSYb6JS3diusDFG/nx5S9pso8T0vq4jj3yuW0OdroXbkCPL4z9 RGRq36SJ7N3qe1rrLVgeiGD9OQKx3RwwgI+xzrJv691bXvZucli3GQhvBgUSXKTQ2oE8 Sssz0vYh0E/ANBUaOsK6a3zpqg8oOC10BG5X7l/1aQQU2PE+NhyQidlEuf7EyccF0UGp MKuSCVP/3QJAbAooMzmPvEmRkSWvZfU1a2BCtxJJharTOKNm9Oi3XmSLGxW5ZtSN8yTD K0YDgQ3mtcMUyYRX2T+S3a5WvmEfFcsPyHfCl04tyr8Ryi0aDiIX87XgxMhfZVMjTnPG m1zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=G5u5ThYO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn17-20020a17090794d100b007ae814af68dsi4789744ejc.355.2022.11.09.07.18.19; Wed, 09 Nov 2022 07:18:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=G5u5ThYO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231949AbiKIPRU (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Wed, 9 Nov 2022 10:17:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbiKIPRS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 9 Nov 2022 10:17:18 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 123341CB24 for <linux-kernel@vger.kernel.org>; Wed, 9 Nov 2022 07:17:17 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id 21so27751109edv.3 for <linux-kernel@vger.kernel.org>; Wed, 09 Nov 2022 07:17:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:message-id:date:from:content-transfer-encoding:mime-version :subject:from:to:cc:subject:date:message-id:reply-to; bh=zmk97Y1kdEfRXSICOIciCIHq7hoxuKuixGqwic5cTfk=; b=G5u5ThYOa6f4LBfVwmSz0Xdx6p1KPsHYVzfgSk+1l86gw9PMHcvYa95FrHg9JLQZvb rMeiTBNObWYfkWNf3YkBx5xo2f4K7gbvG6vE/mbQU04HXMNWtUdiZ9/ZbvI4dAYSK/D4 MilAR7oPTPVwtifeJeHy4icRa8fIF1oGMt8x8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:message-id:date:from:content-transfer-encoding:mime-version :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zmk97Y1kdEfRXSICOIciCIHq7hoxuKuixGqwic5cTfk=; b=VufodK6MvpNqDUUKa9zvYpuP0gQOIKbbUht217hLZu1XsrWt/xm5ca8qguV1c3ym+I jgIrKBtw/whJUcbkFLxSLU72awefuJhfsh0xZ4fEGP3NoFDTspxVhOdHGUkmBUPo3zIy t6htVAVcIKl+z/XaZywWvh1PUnL55it11eunb5CS8QEAVmyAy7e8hB8vc22lsaRWTyp8 0+MYZWz4Kdhs59ttOw571oIj8Irax5Yn/RmHw4WQwjAfc74JcyK12HWOMH+gqpiTqSTR 2K+ZFDX4YEvztrc2j5TbqcCygMK+Ebo8SiI0woIs/LbJR50dcggNE+K/BVpC776Si5Wo Hj1Q== X-Gm-Message-State: ACrzQf0M/tGk4jlFX/h6MKLAP6i4o2Plfmn+hRGwiEYACIJ0gs2THU42 SgeyMTa62DAnyBrEQG2Y91k4qQ== X-Received: by 2002:a05:6402:5159:b0:462:3e9f:a0a4 with SMTP id n25-20020a056402515900b004623e9fa0a4mr58897624edd.313.1668007035636; Wed, 09 Nov 2022 07:17:15 -0800 (PST) Received: from alco.roam.corp.google.com ([2620:0:1059:10:7487:46db:8e12:c768]) by smtp.gmail.com with ESMTPSA id v19-20020aa7dbd3000000b00463c5c32c6esm7052320edt.89.2022.11.09.07.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 07:17:15 -0800 (PST) Subject: [PATCH v2 0/1] i2c: Restore power status of device if probe fail or device is removed MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-b4-tracking: H4sIAHHEa2MC/22MwQrDIBBEfyXsuVtUKMGe+h+lh9Vs4kKioI2hBP+90nNPwxtm3gmFs3CB+3BC5i pFUuxgLgP4QHFhlKkzGGWM1sqiGI8HSWUktuPMpGftbtD3jgqjyxR96I+4r2svg5R3yp+fv+oez3+q qlEhT6Mia521anr4kNMm+3ZNeYFXa+0LfQr6zaoAAAA= From: Ricardo Ribalda <ribalda@chromium.org> Date: Wed, 09 Nov 2022 16:17:05 +0100 Message-Id: <20221109-i2c-waive-v2-0-07550bf2dacc@chromium.org> To: Tomasz Figa <tfiga@chromium.org>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, Wolfram Sang <wsa@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com> Cc: linux-kernel@vger.kernel.org, Hidenori Kobayashi <hidenorik@google.com>, linux-i2c@vger.kernel.org, Ricardo Ribalda <ribalda@chromium.org> X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1143; i=ribalda@chromium.org; h=from:subject:message-id; bh=RCoBAuMZW6/BLIikAeMUt8nhyD2JRoUp6FKyTIqVRCU=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBja8RznD661Rd7HbrTWcJXxIJZgpI6o1QaSLYeFN7C 1L0SqvyJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCY2vEcwAKCRDRN9E+zzrEiJqlD/ 4ki+JPH9bMz8acI0THadDEURL4tP5dToSmi0oS41v5I9+i9x4y5qJSKx2QUGtpwzh23DtpNuJF3TQS F3pUJm8Aw8BP3mBBPls71shgcBCxP9t38czPzUgi9Q803yTqoONn5wdexcKm+MpovKvLGozMqP1YN5 L5ejDI6qwq7ALNbre7kU2ZqOM4bTEDV623tWeqDQxgDy5+HX9b8YSgYgMLjbqPCHYdTvxb8YujzH8i mSVnOXWKDVF3A4R/3myHLDNo12U/gEUkhtHNtY2AB6IVw/anNxKaNNzPN8C8KZP21zlqvkVuYMC5At GuWLTp+w6mezdt8zi/7v0iK1ypcRPQNCswbaYF87MXZpgh8VbAP9xgxsT3fnZg8yI9mogLgOI40Dn3 SR64JcGanNhyC1aIlJHXNew3vr1+WwmO/+0sE0d41ga0UpSDtQ1CQ2XMSUKC9xPQ8GY064qL+jfu26 LzBSwB8OEXZwRml2Wuc9wyM2fQcsrii3fPtSem0WUs/APgKP4tL0L468LveCbh71NcP+BF+HmHZ2B5 u4S9wT1tz6NH5buSpWg4VIRptHWkNzy/ujE8DORi7OLnRb0t78cytGcLjTYZZ6Gxr9+PekFILnJPOT USGbwN1rpeBv0VCtUFmdIavVaz7uO5dxW4XOl4FD4exRKm7u7s9gIxQftFPQ== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749032237923933174?= X-GMAIL-MSGID: =?utf-8?q?1749032237923933174?= |
Series |
i2c: Restore power status of device if probe fail or device is removed
|
|
Message
Ricardo Ribalda
Nov. 9, 2022, 3:17 p.m. UTC
We have discovered that some power lines were always on even if the devices
on that power line was not used.
This happens because we failed to probe a device on the i2c bus, and the
ACPI Power Resource were never turned off.
This patch tries to fix this issue.
To: Wolfram Sang <wsa@kernel.org>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Tomasz Figa <tfiga@chromium.org>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Hidenori Kobayashi <hidenorik@google.com>
Cc: linux-i2c@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Changes in v2:
- Cover also device remove
- Link to v1: https://lore.kernel.org/r/20221109-i2c-waive-v1-0-ed70a99b990d@chromium.org
---
Ricardo Ribalda (1):
i2c: Restore initial power state when we are done.
drivers/i2c/i2c-core-base.c | 7 ++++---
include/linux/i2c.h | 3 +++
2 files changed, 7 insertions(+), 3 deletions(-)
---
base-commit: f141df371335645ce29a87d9683a3f79fba7fd67
change-id: 20221109-i2c-waive-ae97fea1f1b5
Best regards,