From patchwork Wed Mar 8 15:31:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 66302 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp404717wrd; Wed, 8 Mar 2023 07:36:59 -0800 (PST) X-Google-Smtp-Source: AK7set92XLSUF5cZJOtHgCEoW5LVj5N6AXaOar5CgDDybY/m7jQ6q9RWvdl3Zro7Jd+hf2nppqs3 X-Received: by 2002:aa7:9489:0:b0:5a9:d619:e5e4 with SMTP id z9-20020aa79489000000b005a9d619e5e4mr15940993pfk.0.1678289819388; Wed, 08 Mar 2023 07:36:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678289819; cv=none; d=google.com; s=arc-20160816; b=JMoIpg4cRwiRnr1/nGJVA8EPgj2DX/T5v5+x9FJXXFgVV5sPS0SzgCqt0TFtxU6Mn+ kUVIHHsrhX5eIDjuFXpRCT0AGesQ4r6HI0s0QUqbxaSqGoQS99uIGqAOB0sr8Dj8nBJ6 X6Lhij1PIT20HYhLqzjBUfp8CkHh9Z2TYrwq6bZwEIdKU/FEkYO0l4rZs8sp1ZMxacWi WxuBQbtaPlZfoladv4QxxMZm6sZTBh9nxMgYO7f9LV/89mLskYOtqxTEnNbWcmXllh9V L2eTy/OAxYhPJSGVyHYsVR/66x4aMiOf/yEmAyP2ahFF96Bg+bTEmyJfmxUCoJ74Maqa sWJA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=A/ImksdSBrmaV0urK8R+sWRAcEcl9MKuKFJL/MM1X44=; b=tZdtHCrltnmmWwcXC6OiLezn9lZcS+M2JoB/eu987d/BlqgpARsgSqEsozs9uk6nMc yUemkZ7NMXtnQVcSjJUzUakarj6e9J53vseLGy0k0X/tBzxc8M2nhKCdxnU/scy6ObH3 1eUKnaZRA/Pb+CWOXuzbztWgRVNAniX/6/8Yh6Vx0vSEJUDmRumJd5oooc3af4CJMiIZ JQPgNBDTMZu/UUEvnfN2X2Utq4RszmGtx9OdHMIqA8vUYy3yUPDAj9AbpR+RlNl7Z0W8 sgybP65Zj6k5MRRs1Vy4PSG98/jkrRkvjUayd15Mu/KJhbVHGXwVkw66z70UV3sAkC/u dvrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UdT+678g; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a24-20020aa79718000000b005a8c0f03340si15023368pfg.375.2023.03.08.07.36.43; Wed, 08 Mar 2023 07:36:59 -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=@bootlin.com header.s=gm1 header.b=UdT+678g; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232290AbjCHPdn (ORCPT + 99 others); Wed, 8 Mar 2023 10:33:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231836AbjCHPc6 (ORCPT ); Wed, 8 Mar 2023 10:32:58 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 216725D259; Wed, 8 Mar 2023 07:32:30 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 71657FF817; Wed, 8 Mar 2023 15:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1678289549; 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: in-reply-to:in-reply-to:references:references; bh=A/ImksdSBrmaV0urK8R+sWRAcEcl9MKuKFJL/MM1X44=; b=UdT+678g6P+qOlbMDH0Z1fjEu1gOEcMJgU8+4g1tZ8k33FtN0HFlb9D/L3WV3domz6fOV+ VN3ujGIXt9jepInYoazwxUCsYww837N663VJajS8aVaF2RriflzrzIvgGW/ZmEIhKfGv+x WqdWco6FuZ9Hhb1u8eEzlVKjkCnbNSQBL7i8ANSnE750zjeuNwyLInPX1QzAoM2p5/YWH+ VcnjNc78M0CMyFJKJ0ScxyJ9gn1fe+UJ2fqCesxZ7sdc6O2TczLamDg/NIzsb5fQq74M5x EORFsmezHZ7kREEENV6hyYbRsiG0m8We37exUA994hHtATr/Mn/6alwAaSEAmQ== From: Miquel Raynal To: Srinivas Kandagatla , Cc: Greg Kroah-Hartman , Michael Walle , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Robert Marko , Luka Perkov , Thomas Petazzoni , Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Miquel Raynal Subject: [PATCH v3 15/20] nvmem: cell: drop global cell_post_process Date: Wed, 8 Mar 2023 16:31:55 +0100 Message-Id: <20230308153200.682248-16-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230308153200.682248-1-miquel.raynal@bootlin.com> References: <20230308153200.682248-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759814425607845989?= X-GMAIL-MSGID: =?utf-8?q?1759814425607845989?= From: Michael Walle There are no users anymore for the global cell_post_process callback anymore. New users should use proper nvmem layouts. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal --- drivers/nvmem/core.c | 9 --------- include/linux/nvmem-provider.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index f43025ad315b..fccb2728193a 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -39,7 +39,6 @@ struct nvmem_device { unsigned int nkeepout; nvmem_reg_read_t reg_read; nvmem_reg_write_t reg_write; - nvmem_cell_post_process_t cell_post_process; struct gpio_desc *wp_gpio; struct nvmem_layout *layout; void *priv; @@ -903,7 +902,6 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config) nvmem->type = config->type; nvmem->reg_read = config->reg_read; nvmem->reg_write = config->reg_write; - nvmem->cell_post_process = config->cell_post_process; nvmem->keepout = config->keepout; nvmem->nkeepout = config->nkeepout; if (config->of_node) @@ -1576,13 +1574,6 @@ static int __nvmem_cell_read(struct nvmem_device *nvmem, return rc; } - if (nvmem->cell_post_process) { - rc = nvmem->cell_post_process(nvmem->priv, id, index, - cell->offset, buf, cell->bytes); - if (rc) - return rc; - } - if (len) *len = cell->bytes; diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h index be81cc88eabc..d3d7af86a283 100644 --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -85,7 +85,6 @@ struct nvmem_cell_info { * @no_of_node: Device should not use the parent's of_node even if it's !NULL. * @reg_read: Callback to read data. * @reg_write: Callback to write data. - * @cell_post_process: Callback for vendor specific post processing of cell data * @size: Device size. * @word_size: Minimum read/write access granularity. * @stride: Minimum read/write access stride. @@ -118,7 +117,6 @@ struct nvmem_config { bool no_of_node; nvmem_reg_read_t reg_read; nvmem_reg_write_t reg_write; - nvmem_cell_post_process_t cell_post_process; int size; int word_size; int stride;