Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29585099rwd; Wed, 5 Jul 2023 14:16:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlFDT8GV0rMXT53P/nsg5Xlx/gxCZKwuHpbwk/pcA8u5uUsNu5+QxxtI6nxVrx4Eh6w5Ja/t X-Received: by 2002:a17:903:41c6:b0:1b8:8670:541 with SMTP id u6-20020a17090341c600b001b886700541mr144088ple.25.1688591773757; Wed, 05 Jul 2023 14:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688591773; cv=none; d=google.com; s=arc-20160816; b=ZQg+2sB7ZbK9G/sa0wzK+eQEOz2mZ3Qte6b7T8zkd/s/sW93p9AJXLxRkpcmU0TnYL cs5cyC8TLk2uS/hZdjmKbQ3ONLjyyOQAZ1ThsiPicdrmNIDoxfJZsjR8qzI+apsIcJ1n SdWfHA+l9ALulgRvL/W9l4JPOH+EcV13IXwHSIgfX9VyEGG5xGXyYM4Zt5phwiVz/uzf 6JjJnprd16lEmIQJIcbnkZ1Sb5Cn9AEC2Xn5D6QQ1UDLCGzck9FpI42Y0EjxEEh5Yr2u qiABeoKvQTFMECeNPaSgKaxMdwojq3NV+nlbV4+OxC3zD83klFkCBARn3nxcWgEqPiwN agkw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=wyXkGZNGA5ysK2ltkve4RVlCutN+wjP1W2giIyjMZxk=; fh=V+KYmEBOndujvdXrW/IU5+FtQ+FAlzXEUrqZiQOy8Hg=; b=PbpuO2jEG+roSS8Olrjr/eyq/RsO1PCz6FDWaY4OgZ44l2YjUyYLzizfMMu1T0uWdq XPC8diVVqmLly1Q2rjDqEvHZlKE++cf1BSbuRT9Yig+n+TchCcjRZMowejHDe5TPqtuu y2Y7xaGThxlCfvjlVOl7lC3ZiEo3Q7vKbPZdDWtkt6f6ZhWAxLnXosHUFe5gfTUenbC2 65QCtrlO5LxpdJR8cci9lkqyw20N75B2vVHxfNLImSXrv+25Y5xnoaUy7AXJu1diArQB XcQqxIZ2sOCCoMYnGKMxCzXGD1W9l8AkaQ75DgJiwZLj4ETQeck1KRTazYkTP6pjbdx4 zr0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=nScC7Am7; 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=crapouillou.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x14-20020a170902a38e00b001b8b114a2fesi2072954pla.92.2023.07.05.14.15.58; Wed, 05 Jul 2023 14:16:13 -0700 (PDT) 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=@crapouillou.net header.s=mail header.b=nScC7Am7; 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=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233787AbjGEUnf (ORCPT + 99 others); Wed, 5 Jul 2023 16:43:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233758AbjGEUnb (ORCPT ); Wed, 5 Jul 2023 16:43:31 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4BED19B; Wed, 5 Jul 2023 13:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1688589809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=wyXkGZNGA5ysK2ltkve4RVlCutN+wjP1W2giIyjMZxk=; b=nScC7Am7eHbPkqLsb+E2gznpiUpMVyfzuF8FL3UiEEkgxgDebdCyG0lG4/LsIyuatJlX4p bLgSjmITOHNmgrkD8zSZN2pAMtILouf7m0vVi2R75j9CXCT1jpDBwzoRZP8oDzs/SSuMLd FF8hRZbcRQMFlzMf9jstb8q8Hg0pEdM= From: Paul Cercueil To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil , Elie Morisse , Shyam Sundar S K , Ray Jui , Scott Branden , Kamal Dasu , Broadcom internal kernel review list , Florian Fainelli , Bartosz Golaszewski , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jan Dabros , Jean Delvare , Qii Wang , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Peter Korsgaard , Andrew Lunn , Vladimir Zapolskiy , Andy Gross , Bjorn Andersson , Konrad Dybcio , Wolfram Sang , Krzysztof Kozlowski , Alim Akhtar , Conghui Chen , Viresh Kumar , Peter Rosin , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [PATCH 00/23] i2c: Use new PM macros Date: Wed, 5 Jul 2023 22:42:51 +0200 Message-Id: <20230705204314.89800-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Hi Wolfram, This patchset converts the I2C subsystem to use the PM macros that were introduced in v5.17, which allow the dev_pm_ops and related callbacks to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. The point of this, is that all this code is now compiled independently of any Kconfig option, which makes bugs and regressions easier to catch. This continues the work that has been started in other subsystems (DRM, IIO, watchdog). As an added bonus, the diff is 71+/192-, that means less code you will have to maintain ;) The patches generally don't change the behaviour, with a few exceptions, that are documented in the corresponding patches. I would like to draw the attention to a few patches in particular: - [01/23] the driver most likely does something that it shouldn't do (use the same callbacks for runtime PM and system PM). The patch does not change this behaviour but I have questions. - [11/23] uses platform_driver.{suspend,resume} instead of the regular .driver.pm. I have no idea why it does that and I believe it doesn't really have to. - [18/23] I feel like the qup_i2c_suspend / qup_i2c_resume don't really need to exist, and the pm_runtime_force_suspend() / pm_runtime_force_resume() helpers should be used instead, using the DEFINE_RUNTIME_DEV_PM_OPS() macro. Cheers, -Paul Paul Cercueil (23): i2c: amd-mp2: Remove #ifdef guards for PM related functions i2c: au1550: Remove #ifdef guards for PM related functions i2c: iproc: Remove #ifdef guards for PM related functions i2c: brcmstb: Remove #ifdef guards for PM related functions i2c: davinci: Remove #ifdef guards for PM related functions i2c: designware: Remove #ifdef guards for PM related functions i2c: exynos5: Remove #ifdef guards for PM related functions i2c: hix5hd2: Remove #ifdef guards for PM related functions i2c: i801: Remove #ifdef guards for PM related functions i2c: img-scb: Remove #ifdef guards for PM related functions i2c: kempld: Remove #ifdef guards for PM related functions i2c: lpc2k: Remove #ifdef guards for PM related functions i2c: mt65xx: Remove #ifdef guards for PM related functions i2c: nomadik: Remove #ifdef guards for PM related functions i2c: ocores: Remove #ifdef guards for PM related functions i2c: pnx: Remove #ifdef guards for PM related functions i2c: pxa: Remove #ifdef guards for PM related functions i2c: qup: Remove #ifdef guards for PM related functions i2c: rcar: Remove #ifdef guards for PM related functions i2c: s3c2410: Remove #ifdef guards for PM related functions i2c: sh-mobile: Remove #ifdef guards for PM related functions i2c: virtio: Remove #ifdef guards for PM related functions i2c: mux: pca954x: Remove #ifdef guards for PM related functions drivers/i2c/busses/i2c-amd-mp2-pci.c | 14 +++++-------- drivers/i2c/busses/i2c-amd-mp2-plat.c | 8 ++------ drivers/i2c/busses/i2c-amd-mp2.h | 2 -- drivers/i2c/busses/i2c-au1550.c | 15 +++----------- drivers/i2c/busses/i2c-bcm-iproc.c | 10 +--------- drivers/i2c/busses/i2c-brcmstb.c | 8 +++----- drivers/i2c/busses/i2c-davinci.c | 12 +++-------- drivers/i2c/busses/i2c-designware-platdrv.c | 22 ++++++--------------- drivers/i2c/busses/i2c-exynos5.c | 8 +++----- drivers/i2c/busses/i2c-hix5hd2.c | 10 ++++------ drivers/i2c/busses/i2c-i801.c | 6 ++---- drivers/i2c/busses/i2c-img-scb.c | 13 ++++-------- drivers/i2c/busses/i2c-kempld.c | 9 ++------- drivers/i2c/busses/i2c-lpc2k.c | 8 +------- drivers/i2c/busses/i2c-mt65xx.c | 8 +++----- drivers/i2c/busses/i2c-nomadik.c | 14 +++++-------- drivers/i2c/busses/i2c-ocores.c | 10 +++------- drivers/i2c/busses/i2c-pnx.c | 12 ++++------- drivers/i2c/busses/i2c-pxa.c | 8 +------- drivers/i2c/busses/i2c-qup.c | 16 ++++----------- drivers/i2c/busses/i2c-rcar.c | 10 ++-------- drivers/i2c/busses/i2c-s3c2410.c | 14 +++---------- drivers/i2c/busses/i2c-sh_mobile.c | 12 +++-------- drivers/i2c/busses/i2c-virtio.c | 8 ++------ drivers/i2c/muxes/i2c-mux-pca954x.c | 6 ++---- 25 files changed, 71 insertions(+), 192 deletions(-) -- 2.40.1