From patchwork Tue Mar 7 16:53:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 65734 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2544075wrd; Tue, 7 Mar 2023 09:03:58 -0800 (PST) X-Google-Smtp-Source: AK7set8KikvEC+7w5FXFEiohXqqkygE5KIsiaf/+30wb02TbHGNeuqfvAVwnGUnRGfRMCAwwHkSu X-Received: by 2002:a17:907:a602:b0:8f1:939b:9701 with SMTP id vt2-20020a170907a60200b008f1939b9701mr15951233ejc.66.1678208638557; Tue, 07 Mar 2023 09:03:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678208638; cv=none; d=google.com; s=arc-20160816; b=05SthrgDeZO5GRefdINGWbfE/E+FBnWSsm//z9NGXMmax/qKhDvBPk+ELyzLuGwxaJ 1QdrhrCiQPCG+mt8Lb1ZOTuB9YjkF2hgvb14ndSh9blbT6wW0mit1Ys8kO/o50LWaJLb uxz/fr9iAcch7ndkri44ji0rSWNkyUfXMbtnaVzMk0gN9Al4WfCFfjQ8Cy2Fv2aZl2jK Vpw5QrXNWcfHLxslEZ9brTZhna+UexvDymsDkZFOHam8ICsYUEfV2a1CPVbDMT77NRJL M2z2V/8uB4vKMq0Yty24XMj4xl0X8KY83wqhU7DQYGl9Xfne1yKI6Feb3T1pS372drTQ Cs+g== 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=DwN8++5oxOIgSYePzy5PVeFCPn/l7NHxvR0eNwHxoIY=; b=G0AJT5/E8WZsElHM2FcQe2m8BH7g296Kp0/dQYkfpcpo9P8xfJC6TrdgPM6YMMUwke Qpnwr/OcgipJNxoPhdCk8WAWiqwV3+qTzoUWxyiNr3nmw1yr/hPLlfOmPEwxKDaX3fLB BCDtHGy4AI0M8D//eqD3rcbVgC8zB9yAWBSzo8ULomjkpfaDRZkIFx146mHVHB59/xyh MnBZ+QRrvmmv0OJm5rmPujog3ZuFv504dvDivrgk2qXcL/KG6qcDS287p7lvwsGj3jaX a2srKkQLssLSVsUa+GhecAEVIvBObJP51Aw+mCMapG0hYX+XRT+bL3VqSvFD9Qwgsb+i O7dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=AJ2Yizgd; 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 rs17-20020a170907037100b008dcebb5a109si10306350ejb.563.2023.03.07.09.03.33; Tue, 07 Mar 2023 09:03:58 -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=AJ2Yizgd; 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 S231393AbjCGQ75 (ORCPT + 99 others); Tue, 7 Mar 2023 11:59:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230482AbjCGQ6M (ORCPT ); Tue, 7 Mar 2023 11:58:12 -0500 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 551E89009A; Tue, 7 Mar 2023 08:54:59 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 8EB8FC0007; Tue, 7 Mar 2023 16:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1678208097; 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=DwN8++5oxOIgSYePzy5PVeFCPn/l7NHxvR0eNwHxoIY=; b=AJ2YizgdA7smSYMK0mDqF39mE19zmeIEJ0v3fdjJG7WZJYpCKYZdEXUNUUVTY61WQqWLKX SkKeYZtx2bIgdv8/eiR+l9oIIr9huk3BEdkYQbmlqQY1kucxiqHh/Br0TWU2iJbFykXQk3 NuGTK45+jel8ZsbCm1vV9fXAiF9/Y3Aq/ecHSsUamlDw+2zYMrgaVWhaSZEDuojV7vl29C ECOOkIDlOJ8seAaevB3xXCYb0FGjzvCfgwP+LqjLwfZhgVhxuPoY9Zoh4/+bLD72BoGOko TN3Es7PhgYoA79GLaQeDTc7VM3VriNCosLrQLnPKBCB54pRAqmejC1v+5ORqKQ== 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 v2 16/21] nvmem: cell: drop global cell_post_process Date: Tue, 7 Mar 2023 17:53:54 +0100 Message-Id: <20230307165359.225361-17-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307165359.225361-1-miquel.raynal@bootlin.com> References: <20230307165359.225361-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?1759729301353093892?= X-GMAIL-MSGID: =?utf-8?q?1759729301353093892?= 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 82e11b9576ad..31d1d10c0e1c 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;