Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp808446rwb; Wed, 9 Nov 2022 08:52:36 -0800 (PST) X-Google-Smtp-Source: AMsMyM7jml/0OB3jhd/8wsnldkM5S2GGpwHTYTbiqJWaKSDz67t3umj9j7bvTVTmASS1N1hQyHxr X-Received: by 2002:a17:906:9494:b0:7ae:ed2:5367 with SMTP id t20-20020a170906949400b007ae0ed25367mr1190875ejx.521.1668012755887; Wed, 09 Nov 2022 08:52:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668012755; cv=none; d=google.com; s=arc-20160816; b=u5/V9P0ek3X98D/K3dME5Iq6NIpEl6vyLRNB5x8Chfn8A+C7Maey+OxlTflVs8Cz93 Y2MASoSu3LZ3bBiduYV8XtVjfWg9QtX39Kni9EtzDNeo2zh5GX6e5O8l6I9EXN+L3Clo 2ntptsg6JfHXEbZy2aWeR/Bj4hhUIf4CukOVheQMWoNDCjAzdyi/x2Ud/7qFCp27HLJZ Bq9koe8zrPKSOhGwWDQ3d/PxpgVs0epucij+Ga8a1krp3qWyI6ud/yKqHvtTaZKfGYvr 7rK/BhxuCQMorZxj0HHghiOyqq3OdbyB4P6rkZqzku04ls2kxgTL77RV4naVEU/a1ZpB rFYw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz5-20020a1709072ce500b0078c9dd279b6si14742657ejc.345.2022.11.09.08.52.11; Wed, 09 Nov 2022 08:52:35 -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 + 92 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 ); 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 ; Wed, 9 Nov 2022 07:17:17 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id 21so27751109edv.3 for ; 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 Date: Wed, 09 Nov 2022 16:17:05 +0100 Message-Id: <20221109-i2c-waive-v2-0-07550bf2dacc@chromium.org> To: Tomasz Figa , "Rafael J. Wysocki" , Wolfram Sang , Sakari Ailus Cc: linux-kernel@vger.kernel.org, Hidenori Kobayashi , linux-i2c@vger.kernel.org, Ricardo Ribalda 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 To: Sakari Ailus To: Tomasz Figa To: "Rafael J. Wysocki" Cc: Hidenori Kobayashi Cc: linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ricardo Ribalda --- 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, -- Ricardo Ribalda