Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3628257pxb; Mon, 24 Jan 2022 13:54:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxG+t9aSZx1fTqJzHRgmYYbAofSbZa03iaxf9ytJOL3tTVOCEGF0WLYxtdtsQVhoWmD85zB X-Received: by 2002:a17:902:9693:b0:149:1ce6:c284 with SMTP id n19-20020a170902969300b001491ce6c284mr16085559plp.119.1643061241531; Mon, 24 Jan 2022 13:54:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061241; cv=none; d=google.com; s=arc-20160816; b=ESWrZzHtxu9lPRmQgZji9ALQMyqhSapKTYDFCRoG5D+3REWxN2s9HkPHQ29nSRwgmt 51SrPG7w9E5TRVKISskajSMO4MZzlCvwN8XDR7+jODRInYtvQpdBXWpWTGa0TdF/H/aQ nkjnrRYQ4VVme6tolHibk+5nU0/zYkM9MPuq2m1WMWGK/5gsFnKj8Q0y0UNGs+ddlhjp FctUKJUSMuvPdH2FkJSlQEk4pq8bDokRSEBHgTX8b0r7dctDFgWjtqCc4D/2xwNYmI08 7bpBHCBhkRrYQpUmg9N582sk6GRVBs/ftY78y2JDT333fZoEj9YgMRD8CYranQzF895V OBhw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TjVa3kDjjCL2u2zoTt8t/Is923wTHR8Ka2FwYa2dNz8=; b=eRbDYmyfEjbMg20am7R+KSVdsjGrV58AYv2H7taYO0yi8c1QmzXA9OepaDhdBXoHmH nJL1MSErSoB8EYSJH/pNzAFliXu8+r7MKxkYBjbXs+wg2ngw3VGvylC5jiVqnyYCca0c fckuO55NRptBtis2kwLQ/xvdK8dRAisOEuh0kXaQj2Ij85wWvLw19KylpB0381O+A3qI xUOZYLPfmzpyTTLyD6Nc6JXIOtWTqHuCSiMaC5srW24H3LsppIA24tp+EKj4YMC9rIKS pWtHGG5cDH8exRiz2aTla1EsvhWohqrwQMh9Y2Ka1RoNJUSabKZZVRawynd9kX8qahQL Japw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AvPh9Dgt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id il6si451612pjb.62.2022.01.24.13.53.49; Mon, 24 Jan 2022 13:54:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AvPh9Dgt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1456066AbiAXVhl (ORCPT + 99 others); Mon, 24 Jan 2022 16:37:41 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:55712 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444931AbiAXVBq (ORCPT ); Mon, 24 Jan 2022 16:01:46 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EF926B8121C; Mon, 24 Jan 2022 21:01:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E786C340E8; Mon, 24 Jan 2022 21:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058103; bh=2oPRCzvY5dsRKRC7+16mS3DHzsCSSWf7cRER46nZmQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AvPh9DgtWvYpuh7FWaILLyvGmXYTK+zC1LGZdT+y4hRWmyEbUpC/DqjQnfzgD9Rtg Lyuq+JnbR91jB6mS3xfMkYcDCegTwsljlVfk07XPV1m411aPVqVMD/yYfoonG2mywx FSMs0TrhWhI+vndxaDDzMy0M/4fhYvFK1MJY8nvQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Claudiu Beznea , Codrin Ciubotariu , Nicolas Ferre , Lee Jones , Sasha Levin Subject: [PATCH 5.16 0182/1039] mfd: atmel-flexcom: Use .resume_noirq Date: Mon, 24 Jan 2022 19:32:51 +0100 Message-Id: <20220124184131.397925606@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Claudiu Beznea [ Upstream commit 5d051cf94fd5834a1513aa77e542c49fd973988a ] Flexcom IP embeds 3 other IPs: usart, i2c, spi and selects the operation mode (usart, i2c, spi) via mode register (FLEX_MR). On i2c bus there might be connected critical devices (like PMIC) which on suspend/resume should be suspended/resumed at the end/beginning. i2c uses .suspend_noirq/.resume_noirq for this kind of purposes. Align flexcom to use .resume_noirq as it should be resumed before the embedded IPs. Otherwise the embedded devices might behave badly. Fixes: 7fdec11015c3 ("atmel_flexcom: Support resuming after a chip reset") Signed-off-by: Claudiu Beznea Tested-by: Codrin Ciubotariu Acked-by: Nicolas Ferre Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20211028135138.3481166-3-claudiu.beznea@microchip.com Signed-off-by: Sasha Levin --- drivers/mfd/atmel-flexcom.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/atmel-flexcom.c b/drivers/mfd/atmel-flexcom.c index 962f66dc8813e..559eb4d352b68 100644 --- a/drivers/mfd/atmel-flexcom.c +++ b/drivers/mfd/atmel-flexcom.c @@ -87,7 +87,7 @@ static const struct of_device_id atmel_flexcom_of_match[] = { }; MODULE_DEVICE_TABLE(of, atmel_flexcom_of_match); -static int __maybe_unused atmel_flexcom_resume(struct device *dev) +static int __maybe_unused atmel_flexcom_resume_noirq(struct device *dev) { struct atmel_flexcom *ddata = dev_get_drvdata(dev); int err; @@ -105,8 +105,9 @@ static int __maybe_unused atmel_flexcom_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(atmel_flexcom_pm_ops, NULL, - atmel_flexcom_resume); +static const struct dev_pm_ops atmel_flexcom_pm_ops = { + .resume_noirq = atmel_flexcom_resume_noirq, +}; static struct platform_driver atmel_flexcom_driver = { .probe = atmel_flexcom_probe, -- 2.34.1