From patchwork Mon Feb 12 16:28:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 20255 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp27686dyb; Mon, 12 Feb 2024 08:30:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW01lNh3eLWmxq64S+5PQLjn7v+9bY8dfJU0UA0Eibz+95ojqVIC/rTp3Gj6UYp7krmvcpJ+qu65+WdjZH5Try6wqbmLQ== X-Google-Smtp-Source: AGHT+IEREsG2dkPNgjP2jxjGNJ+u0s4UYM7Eo1z7pXoQghEnWA7cIzubyghgj8nUXQc3WkJcgeg5 X-Received: by 2002:a05:6a20:e68f:b0:19f:2df0:13fd with SMTP id mz15-20020a056a20e68f00b0019f2df013fdmr2975286pzb.29.1707755400179; Mon, 12 Feb 2024 08:30:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707755400; cv=pass; d=google.com; s=arc-20160816; b=UOGTuKLV5OoLiZrZtfFCaV/Ej4uYXDMyvNmQW6oX3ygPJMZLnUb+6U8sBqEvFWBGJ0 jxzS3uSmC8g2JmxhodP9QC2T17ZpYGatUYlShJGz57WdI0iZxWuLg8vJvbrD42Kq08bk qG6kYlYyyNDR8A1ABPQMGQ5S+xxnyhex1mYo55SEHxJWor6v7k5mtvv/jUL7/8+7u5uE 8k9lxAVks5/49ugddjf/yUnwX0ahZmS9S0VGXnXopJCAGXelRcy0Sz9T3Air4eb4rtSu bXwEihFNpevRysDCOri3FrKk6ATMT885v0+rD6uAdDQXeEeLuOC3dsYFR5Y2qW/uDif/ joRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=zXYO7lK1k6ZbLMjJ3atq6vexiEb/Ht/2UM7FiDOlEBw=; fh=PqlBF49fTU5oui4CaLTxqex3r/4dKfzxPKkm26oIpnE=; b=RB1Bxrof8dY1bt00lvCHeXNP3GWQN3ucw2AMqlCS6U+sdS6PhSWtboY7dMzRq8JRLG NlVwwL9mx1vkqif2/NTyHQbMzq5U/I33TtMJ1nJP3dosX8ysHfFha26U61olwmnjw6IB daO04v0mHTM997N9YYbbzSD9zBlx9ppGvfCdidnnPJGI3C2gHujU0jhoTQ5CAU3tLP9i ZNhh8BVZ4xpvLvZ1OPOiwFX+h8iw82AHQBuD1WJCVDZ1OoeVx5EiJEr76OxjN4d/RMAM OM/2kDSXhwxL43cYCFCguXEgcyHUyaQBzMqT/S5jhQMQUIgtA3Powgun5jqtmnaNNZ9b pEBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gkharXyj; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-61957-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61957-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com X-Forwarded-Encrypted: i=2; AJvYcCWBSzPrEMWNZWXLrVVlpoeppMMYOGwumMrE0VR2AmYM7qrlZsJU1IiXniZPuJby4he+V+TX9g/TwwB5+jbAk7ths4i1RQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g18-20020a633752000000b005d8e283c1ebsi431535pgn.840.2024.02.12.08.30.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 08:30:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61957-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gkharXyj; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-61957-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61957-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 64551280C80 for ; Mon, 12 Feb 2024 16:29:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 37E8B3F8D0; Mon, 12 Feb 2024 16:28:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="gkharXyj" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46BD63D0DD; Mon, 12 Feb 2024 16:28:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707755327; cv=none; b=S7r5ljifXVPow4nsFuD7vChH+4+vCa/dDTWhVXcahB5xzZt/Y33iCJENMB/l2h+GQMNjJSzy08JPLvGsllllS2lXCluYrutVh0b/n7D64JvFmlpkFEsW38l1f2aZeehoBJ3AOb886uFP3VZWaRKJNveUvfdXK1oMnAeOKmEeX9c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707755327; c=relaxed/simple; bh=I2MpepqswomHCVb5FtmVYpczlffOVMKkP0FDjf0skWM=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=HHWjW8iXJOvTt5P6wou6b3aIBIRt8iqnn/HBQu40kRL6PCFhimnTCq0Lgv10MnvYYHxaX6SjewRKN3pDU4dZU9qrgmdOLglq8LFlFzSBXBzoY5NdkXNDPu0c4foF/iA9WOPAjEipq7LKda0jjs0OJ0e+qyz+Rpfmouo6sd5K7Uw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=gkharXyj; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 41CGSXeS045183; Mon, 12 Feb 2024 10:28:33 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707755313; bh=zXYO7lK1k6ZbLMjJ3atq6vexiEb/Ht/2UM7FiDOlEBw=; h=From:To:CC:Subject:Date; b=gkharXyjdkRePbJdX8y5/s7In1GP+q0Lak59nwSfxcScDtvZML9ASF2/tkje/wPRv Vo0rNqc2ec9rbBW2HLX35FNsXb7b22AJcBP0edi4pIwbTTR59Eu5jw0qya/4mXHlMk nVUIZ4GNiULWS7hItIoG5lC8qAX7uPeAIfcg4SX8= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 41CGSXwG008638 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 12 Feb 2024 10:28:33 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 12 Feb 2024 10:28:33 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 12 Feb 2024 10:28:33 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 41CGSWQu090688; Mon, 12 Feb 2024 10:28:32 -0600 From: Andrew Davis To: Sebastian Reichel , Manivannan Sadhasivam , Cristian Ciocaltea , Florian Fainelli , Ray Jui , Scott Branden , Bjorn Andersson , Konrad Dybcio , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno CC: , , , , , , Andrew Davis Subject: [PATCH v4 00/19] Remove pm_power_off use in drivers/power/reset Date: Mon, 12 Feb 2024 10:28:12 -0600 Message-ID: <20240212162831.67838-1-afd@ti.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790711326090766909 X-GMAIL-MSGID: 1790711326090766909 Hello all, Use of pm_power_off is considered legacy and should be replaced with register_sys_off*(). Same for register_restart_handler(). Do this for the drivers/power/reset subsystem for all trivial cases. Thanks, Andrew Changes for v4: - Fix sparse warning in [12/19] and [13/19] - Move data allocate from [19/19] to [18/19] - Add review tags in patches [7/19] and [11/19] - Rebase on v6.8-rc4 Changes for v3: - Use dev_err_probe() in patch [11/19] - Add review tags in patches [18/19] and [19/19] Changes for v2: - Fix sparse warning in 7/19 and 10/19 - Add new patch fixing an already existing sparse warning (3/19) - Rebase on v6.8-rc3 Andrew Davis (19): power: reset: atc260x-poweroff: Use devm_register_sys_off_handler(RESTART) power: reset: atc260x-poweroff: Use devm_register_sys_off_handler(POWER_OFF) power: reset: xgene-reboot: Use devm_platform_ioremap_resource() helper power: reset: xgene-reboot: Use devm_register_sys_off_handler(RESTART) power: reset: tps65086-restart: Use devm_register_sys_off_handler(RESTART) power: reset: tps65086-restart: Remove unneeded device data struct power: reset: brcm-kona-reset: Use devm_register_sys_off_handler(RESTART) power: reset: axxia-reset: Use devm_register_sys_off_handler(RESTART) power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helper power: reset: rmobile-reset: Use devm_register_sys_off_handler(RESTART) power: reset: mt6323-poweroff: Use devm_register_sys_off_handler(POWER_OFF) power: reset: msm-poweroff: Use devm_register_sys_off_handler(POWER_OFF) power: reset: msm-poweroff: Use devm_register_sys_off_handler(RESTART) power: reset: regulator-poweroff: Use devm_register_sys_off_handler(POWER_OFF) power: reset: as3722-poweroff: Use devm_register_sys_off_handler(POWER_OFF) power: reset: gemini-poweroff: Use devm_register_sys_off_handler(POWER_OFF) power: reset: restart-poweroff: Use devm_register_sys_off_handler(POWER_OFF) power: reset: syscon-poweroff: Move device data into a struct power: reset: syscon-poweroff: Use devm_register_sys_off_handler(POWER_OFF) drivers/power/reset/as3722-poweroff.c | 30 ++++------- drivers/power/reset/atc260x-poweroff.c | 55 ++++++++------------ drivers/power/reset/axxia-reset.c | 16 +++--- drivers/power/reset/brcm-kona-reset.c | 11 ++-- drivers/power/reset/gemini-poweroff.c | 16 +++--- drivers/power/reset/msm-poweroff.c | 21 +++----- drivers/power/reset/mt6323-poweroff.c | 26 +++++----- drivers/power/reset/regulator-poweroff.c | 36 +++++-------- drivers/power/reset/restart-poweroff.c | 25 +++------ drivers/power/reset/rmobile-reset.c | 35 ++++--------- drivers/power/reset/syscon-poweroff.c | 66 ++++++++++++------------ drivers/power/reset/tps65086-restart.c | 58 ++++----------------- drivers/power/reset/xgene-reboot.c | 21 +++----- 13 files changed, 150 insertions(+), 266 deletions(-)