From patchwork Tue Dec 6 20:07:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 30499 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3027313wrr; Tue, 6 Dec 2022 12:10:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf6NDkffqju9JHlg1Eetg5BgvXvV64PmdXcgRQNjvnRYqgaAaVAg1yKgAWL1phk0KKnLBe+4 X-Received: by 2002:a17:903:40c6:b0:189:ba64:3b4c with SMTP id t6-20020a17090340c600b00189ba643b4cmr22416662pld.20.1670357405717; Tue, 06 Dec 2022 12:10:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670357405; cv=none; d=google.com; s=arc-20160816; b=uX+5TMtIzOO+0o6gaVoOH6hNfuSnKai0BfZIpI4EpC5MGvE3z5ghRSLChu6Xz6H0Io IRdm3MDalTJDaTLwxQqGW/ChVT4pozqi9mCKKa+HsMjpI65gGzpLxQCjpkYDZ4RTVy+f avUN/erNxHORIiIjKKGsBMkDjtHPVxXD1X4N3Cp1RBm/N73z0jwLodc0E6mSkpF5DiTH jWynocSMiI/i/hYr+rcrGwpJHI1YekzW7Y1iogiDvvf5PGlOFurChFJtVHFij4Vae2qa 1388JQFTFav2DnT8EwG+eerIj47vSJFn7jVjnKOLWvElw1KaXXJPf5GoQZiuUfwRfMYp +aLg== 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=8h4ZyOcVwYdZNg2eiJM/qO+E46ETwPkWasGJvgepyEc=; b=TNfT8LqZ/VfSh/XfJrc1F9dz+3jJNvlUpwwMoEGAUItd9PdyRX0t3/aPWqEIwoUbUG NtRpVAEm3QUx2xeTN8nJIZMX8PXzGkPC2TdP/c/o9j+FCbgutqkiOcJcJwNeLmTIuh0b EeWuADB4J0ZOfs6CC0k5EJUhF9cJiDu6g4uOuBf0BFPEcbfzTUeb3Yyv69Feyh/GDv0o J7iD8/VtMB53oPcuk7QU2S6hoh59cR9reboYgw9cJWaZ2L9GGg3g3aNMpKhth40kqCUv 3/wrqpSMaTdacVBXIkfXr1KOpBnet8Ra7Ryte4e6Lja+Z+g1D0vNFKRx7CSLMXtWV/TL NZLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=mfdeM4Su; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a632c01000000b0046eecbac47esi18801999pgs.28.2022.12.06.12.09.52; Tue, 06 Dec 2022 12:10:05 -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=@walle.cc header.s=mail2022082101 header.b=mfdeM4Su; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229923AbiLFUIs (ORCPT + 99 others); Tue, 6 Dec 2022 15:08:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbiLFUHz (ORCPT ); Tue, 6 Dec 2022 15:07:55 -0500 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4B872EF36; Tue, 6 Dec 2022 12:07:54 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 2125D3BB0; Tue, 6 Dec 2022 21:07:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1670357273; 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=8h4ZyOcVwYdZNg2eiJM/qO+E46ETwPkWasGJvgepyEc=; b=mfdeM4SuMUwucfWvwVn8tBMXqyAhuU0sutQ5MQdFjz84mbRUuItWVe+zSW5R+dSswmv3wW TnrtY2iyhlWzvpnv3Yn5Oq2l71WpTFFF0CqWA706Quy8sa+KZPwip//2Glg2x/qQhhkZFH WKHiw1hPjRTz52NQx2FHWU2IkMwhoHWOeVKlX8VqSN5rNdkCdyXCWjFI8w8n8AqoAGo/ZK sMaB6QBoC2ZkGbJCwzJgQS0hBIqtHsHOPSxSu7mzZrn9mpyNsQtEEwS5GyXK62IEbjOm2V EFoNkmznskQYBMSbsTeaFtM/J7KwOGhr/WZaaABZHGhPIW2z9ZjTPRkKfhjI4A== From: Michael Walle To: Jonathan Corbet , Srinivas Kandagatla , Miquel Raynal , Rob Herring , Frank Rowand , Sascha Hauer Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Michael Walle , Dan Carpenter Subject: [PATCH v5 16/21] nvmem: cell: drop global cell_post_process Date: Tue, 6 Dec 2022 21:07:35 +0100 Message-Id: <20221206200740.3567551-17-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221206200740.3567551-1-michael@walle.cc> References: <20221206200740.3567551-1-michael@walle.cc> MIME-Version: 1.0 X-Spam: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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?1751496687113105182?= X-GMAIL-MSGID: =?utf-8?q?1751496687113105182?= 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 --- changes since v4: - none changes since v3: - none changes since v2: - none changes since v1: - new patch 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 2706fc5ed494..dc329daaa350 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -38,7 +38,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; @@ -892,7 +891,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) @@ -1562,13 +1560,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 bfaba5227ac9..12833fe4eb4d 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. @@ -120,7 +119,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;