Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp818512pxj; Thu, 20 May 2021 23:13:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKdAeYO4u3dEaJkLJZWlL95alRh9WYk45t3FRPiZZnvxQ2Pm0e3VBxZEGoJ9KKCh1ACwik X-Received: by 2002:aa7:cb84:: with SMTP id r4mr9275811edt.187.1621577623272; Thu, 20 May 2021 23:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621577623; cv=none; d=google.com; s=arc-20160816; b=tpxjPtTJqP5KJc6gkXINxtGIddYW4HypiOa5A3g/mmYAI6CD6PR9eTWRlYK+LVnPIb 73BTRgDrHF+dldECYFEyResURKlu3QLOrmyuDH5evsJzj8Sf4IIR7TfXtHOFOo2NbEnz nnXa6PUQAn0ZxnROPPKaPdrn9916NV/VEQJb1Iu1A3dox/sFcOUxaS1JE0uMROQIV36Y +Lq/qfn8RTLEcLcVFrqpvuafpd0zYahvjhBXNa66MM1e9/WIeqPbFVt09weNL6KkNflI 7sPoakDYrWOFjb/wHEhQ9ca58GWrUgxVZx4H9kry2Uha6TzJe+IUpukKM7gO9va0gABu 6FtA== 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=oMLJWICOr1vU7e/tL3zhEjEozu06hjLJr825CZwdaJ8=; b=mpGo/iUA/aRvlfxwCxrXqixWNsgmcYI0W56JcnPqKSqRvLkxMq7XmHCCR7bGhnrujQ fhUNil6hQxV1UVjJC3n3mH35syVfSNxCkDLEUid48B6QLs/Iz58RzrSiDKIcYoPa/Zgu Svuw57+1Yx4t6LsYV5f/jn8L2mdpcHQyJST84rmPoWmWk0KOqUtQFFZm3OtXDe+keAyB KugOpOsxIMmkPtn5mGVhJ9fQK6EkxZt5adWkTWLgtIMysFqaPYKGkuob6KBRQs3fGqhB j6rnQIV1KdJUuK/fMgKjA6TzBOy9lNNdBG0aPzoOQ5UkBF8cphRcPbkqlE3gsyqZHBwO T1/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=g3Ph7HVi; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c16si5279721edw.162.2021.05.20.23.13.19; Thu, 20 May 2021 23:13:43 -0700 (PDT) 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=@walle.cc header.s=mail2016061301 header.b=g3Ph7HVi; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233216AbhETQAi (ORCPT + 99 others); Thu, 20 May 2021 12:00:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232978AbhETQAZ (ORCPT ); Thu, 20 May 2021 12:00:25 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2309C061574 for ; Thu, 20 May 2021 08:59:03 -0700 (PDT) Received: from mwalle01.fritz.box (ip4d17858c.dynamic.kabel-deutschland.de [77.23.133.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 7611622256; Thu, 20 May 2021 17:59:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1621526342; 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=oMLJWICOr1vU7e/tL3zhEjEozu06hjLJr825CZwdaJ8=; b=g3Ph7HVi06ML5O/t2WNcyqQqisxNq1JyyTcggGbh84nPwErkNajFN+mRpfxdq6485yoxQc ILRbGkq6ztASnAuhNnd5/i7U9eWyM+uPx+IokFms3g2sgX7La6us1DyoCcXKalj4r2efTr p4RwTSkhJvuinmSQiS5YwwCB3yYwYZg= From: Michael Walle To: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Tudor Ambarus , Michael Walle , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Subject: [PATCH v3 2/3] mtd: spi-nor: otp: use more consistent wording Date: Thu, 20 May 2021 17:58:53 +0200 Message-Id: <20210520155854.16547-3-michael@walle.cc> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210520155854.16547-1-michael@walle.cc> References: <20210520155854.16547-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the wording as used in the datasheet to describe the access methods of the security registers (aka OTP storage). This will also match the function names. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/otp.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/spi-nor/otp.c b/drivers/mtd/spi-nor/otp.c index 91a4c510ed51..ec0c1b33f7cc 100644 --- a/drivers/mtd/spi-nor/otp.c +++ b/drivers/mtd/spi-nor/otp.c @@ -15,14 +15,16 @@ #define spi_nor_otp_n_regions(nor) ((nor)->params->otp.org->n_regions) /** - * spi_nor_otp_read_secr() - read OTP data + * spi_nor_otp_read_secr() - read security register * @nor: pointer to 'struct spi_nor' * @addr: offset to read from * @len: number of bytes to read * @buf: pointer to dst buffer * - * Read OTP data from one region by using the SPINOR_OP_RSECR commands. This - * method is used on GigaDevice and Winbond flashes. + * Read a security register by using the SPINOR_OP_RSECR commands. This method + * is used on GigaDevice and Winbond flashes to access OTP data. + * + * Please note, the read must not span multiple registers. * * Return: number of bytes read successfully, -errno otherwise */ @@ -56,16 +58,16 @@ int spi_nor_otp_read_secr(struct spi_nor *nor, loff_t addr, size_t len, u8 *buf) } /** - * spi_nor_otp_write_secr() - write OTP data + * spi_nor_otp_write_secr() - write security register * @nor: pointer to 'struct spi_nor' * @addr: offset to write to * @len: number of bytes to write * @buf: pointer to src buffer * - * Write OTP data to one region by using the SPINOR_OP_PSECR commands. This - * method is used on GigaDevice and Winbond flashes. + * Write a security register by using the SPINOR_OP_PSECR commands. This method + * is used on GigaDevice and Winbond flashes to access OTP data. * - * Please note, the write must not span multiple OTP regions. + * Please note, the write must not span multiple registers. * * Return: number of bytes written successfully, -errno otherwise */ @@ -88,7 +90,7 @@ int spi_nor_otp_write_secr(struct spi_nor *nor, loff_t addr, size_t len, /* * We only support a write to one single page. For now all winbond - * flashes only have one page per OTP region. + * flashes only have one page per security register. */ ret = spi_nor_write_enable(nor); if (ret) -- 2.20.1