Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1071764ybl; Fri, 6 Dec 2019 10:47:29 -0800 (PST) X-Google-Smtp-Source: APXvYqwuAekLB7LZLsOlMb7iuSXQA0K6qHMa/vjs/dr+vQySu2bjj7ytdawCQwpVH3bddtRlXHk5 X-Received: by 2002:a9d:774e:: with SMTP id t14mr11719774otl.358.1575658049510; Fri, 06 Dec 2019 10:47:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575658049; cv=none; d=google.com; s=arc-20160816; b=0MbBnJ24JqLXy8hdxMNzGXe5+YHQ4riE5FizkyCBweCD3DKyFsZVZd6ud3dpvh3YNq m0Xznnr7EYIjMOyGOpsZZ+QgCsOA0pjbdux8VUt/riFKBZ/tJGIx2LtBSK321WySm/4A SaraLrM7kn5zXrVWoJxlcacSw1JxPQZiFsfPbLiNLPp2oHOZoFAXVF1YD3m8wDBq+M3D 3tXxS3TdeZ+htmP2us/s2jprTryH8yMkh2FfNYC/yFIasx30TxqDT2zjKOwg3elvRZ8m OCnYmk3nGbxFaq8OkwTthdZWY2sCwNE3LHYto+Zu/D3wQ1jURP9QG8sz0vVvO4QFY2N9 ufdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=I11/1g/9q+frAVf8+DPvgghH4KQ81JT2S0kbypabsyc=; b=wBRONEJ2zFsQ2KpBvF4MBEgHdwOoqnvwRWVWTw+uDhdPqBBR7rTIXHgRzKq2yGPJry JppIAnwwTmD7FYZlSPQ+/y3tJdTOYaPi6SNK2RXExnbgk2IVa7h2CAGk3xhA3JJGWpJt zUd2BEB7I9mm/ZGXEygUNbRrfhwLi7mbV9YhfDIpV267nBIPcpB2v2UrLJSasFEYVrJz RX25Mep7t3eEAEyckWupyBRteGUFxkhgl+a2B+PWaDBt7jYsEYnMY6mzM1l8Skh2nIMC dkouneiWWW6io7eCnD+5Qy5ODQDKE5tDeqEaE0JwKTPn56aviyFa1q1dGEUMxl/5pRl4 9TlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VMnp87Kd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w197si7825043oif.150.2019.12.06.10.47.17; Fri, 06 Dec 2019 10:47:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VMnp87Kd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726506AbfLFSqf (ORCPT + 99 others); Fri, 6 Dec 2019 13:46:35 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:33453 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbfLFSqc (ORCPT ); Fri, 6 Dec 2019 13:46:32 -0500 Received: by mail-pf1-f194.google.com with SMTP id y206so3783929pfb.0; Fri, 06 Dec 2019 10:46:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=I11/1g/9q+frAVf8+DPvgghH4KQ81JT2S0kbypabsyc=; b=VMnp87KdtKaHKbIdIynQJjnh6Rwx73cgOqHapRh8B69i4jp/3sjISCsxhLktJIGkSy ZNe1M/lVfmzI6SIW2RwIZd/xu5yFsCzRRZOmM7mhk/UlM0bWSQrRNUBxQQnAmPprF42J sZVVochTM/CWvOunmhgF/FvGmCl+XtfvNxs2ZmvDeqHmpb2EX5Y08QJCJDs4qAD+fRjo Y5ojsHjT4xc3OK5ssN763cBtqpVYzc7Ec4VqydoM4Jlmha7xuedeCW5Fl0Hr23YdJxPt ChmAu38tXs01yOllIWYQTSVi32qxfNHAoT1Gj3Ikgiy6PR1RCo+9jbDRygLnTxTKky6a aHGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=I11/1g/9q+frAVf8+DPvgghH4KQ81JT2S0kbypabsyc=; b=miJw0UmpmA6pTGRznRI+y45+WjGg3X4JP/FiDJ3YPzAfzRzzqpVV7shuA+Ff8/KfBI w6HviFvchbPyFVZ0FXgxPrs4g6fiGVGimxakm1owR6zKXN7znxm3KOW8L3Dum+rEtnLY clFBbH7+GKDuP39B6FCYkdlDEBPUWuRL3siWeCuCzjZqUtAR01YrRj7bAuKdklryfjZj ci8+l3BMSvBiR5Y3biBeIdBSgIV2dPxFRlKR1Sa+342+aCQbEM5JTqaB2F8XCjaRJK+A DUcmo/onSgfTyreLt9Qxm9BF9MW5qHLEzDe7QvdweWLVOOwd8HmpTcIfgm6x0fxjKlLJ 9iWg== X-Gm-Message-State: APjAAAXwjbee2YbA+amSKXLVWKweCT19sjY0GAFuAPWOuTCZW1VN0hUu m0aRNGUT399nwoRW9rHdJl8= X-Received: by 2002:aa7:90c4:: with SMTP id k4mr15684240pfk.216.1575657991783; Fri, 06 Dec 2019 10:46:31 -0800 (PST) Received: from localhost.localdomain ([103.51.73.190]) by smtp.gmail.com with ESMTPSA id p4sm16777039pfb.157.2019.12.06.10.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2019 10:46:31 -0800 (PST) From: Anand Moon To: Rob Herring , Mark Rutland , Heiko Stuebner , Jagan Teki , Manivannan Sadhasivam , Robin Murphy , Daniel Schultz Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFCv1 4/8] mfd: rk808: use syscore for RK818 PMIC shutdown Date: Fri, 6 Dec 2019 18:45:32 +0000 Message-Id: <20191206184536.2507-5-linux.amoon@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191206184536.2507-1-linux.amoon@gmail.com> References: <20191206184536.2507-1-linux.amoon@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use common syscore_shutdown for RK818 PMIC to do clean I2C shutdown, drop the unused pm_pwroff_fn function pointers. Cc: Heiko Stuebner Signed-off-by: Anand Moon --- drivers/mfd/rk808.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c index 0a098fbdf112..4b3b90dad4f8 100644 --- a/drivers/mfd/rk808.c +++ b/drivers/mfd/rk808.c @@ -467,11 +467,6 @@ static void rk808_update_bits(unsigned int reg, unsigned int mask, "can't write to register 0x%x: %x!\n", reg, ret); } -static void rk818_device_shutdown(void) -{ - rk808_update_bits(RK818_DEVCTRL_REG, DEV_OFF, DEV_OFF); -} - static void rk8xx_syscore_shutdown(void) { struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client); @@ -494,6 +489,9 @@ static void rk8xx_syscore_shutdown(void) rk808_update_bits(RK817_SYS_CFG(3), RK817_SLPPIN_FUNC_MSK, SLPPIN_DN_FUN); break; + case RK818_ID: + rk808_update_bits(RK818_DEVCTRL_REG, DEV_OFF, DEV_OFF); + break; default: break; } @@ -583,7 +581,6 @@ static int rk808_probe(struct i2c_client *client, nr_pre_init_regs = ARRAY_SIZE(rk818_pre_init_reg); cells = rk818s; nr_cells = ARRAY_SIZE(rk818s); - rk808->pm_pwroff_fn = rk818_device_shutdown; break; case RK809_ID: case RK817_ID: -- 2.24.0