From patchwork Wed Jan 3 20:00:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10142931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7BC5F601A1 for ; Wed, 3 Jan 2018 20:02:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E0C929279 for ; Wed, 3 Jan 2018 20:02:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C8AA292CE; Wed, 3 Jan 2018 20:02:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D6FED292E8 for ; Wed, 3 Jan 2018 20:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Ipd4Pv+G8cpb7C+oyLdXLw66+5YSN2IfHh51sqq16cQ=; b=LfU3Pq0VboZQKo2SDx/9WaCTWJ M/rqGcXAGEsmKSfOQc3iCYhe9ocgauJDEu795HTWcRUwIdRKyM9HTQBjOhLgAlaSkJ9OKAr3ffdvk FdWkv4Tsd42/N2mtAZbVvmi6ZfW2HyjrcgZqQVkrG1bLVmv9kJc1K1uCcB0j0ZF7trz/sgEJCT7DI aEHrn6gO1M6DDNsP+F21EL7F4Kw7BHXt+m2/PZIoUvdlIX/y4dBzjSIh7MfW8DzjmS/7RDiXEW1Ra 49SxUvhp9/o+t8h5s72ypcWtysqJXYlNoImfkZ9rWwcQh9TdZIgpHPCf97jYW7O19wDrP4VdiprUP mY6HE2hw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eWpFC-0005Bz-KA; Wed, 03 Jan 2018 20:02:34 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eWpEA-0004Yr-VI; Wed, 03 Jan 2018 20:01:37 +0000 Received: by mail-pf0-x242.google.com with SMTP id u19so1163712pfa.12; Wed, 03 Jan 2018 12:01:20 -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; bh=/3aj99nasBJQ0fdrOugnKGegy+ex2sMFg8wPbbA/jZg=; b=nUluCu3T2ahuGY8q3/UEgT63SYiLxNoNiVznyHQcD0FmHKkCH953CuqgKh5PUAVSgm vqpsruQqg7k7Z0dh4yUiF3V/JjEXPCv7pvOekfLPT4DTJeIkwC6myeFlaCw8pK0S7uo1 tJGDf2wO5NUw4h69i5oB9ry5AySrd/QNvSFnsmKvGtrjqylQDbwgLMNS3ky48kWdWqnc vb169xFvERBBOf3gC0Wu1ALeayrLEohfQZ1JXbywh5eT20J6wmCPkylGHd90d/Lh5BRE jiomIxZURAGXwxqsgHy8lxCnogITV51HrdaiIB8IpsxBPprrwqu4kvnYX9Q74h9YXxch TCTQ== 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; bh=/3aj99nasBJQ0fdrOugnKGegy+ex2sMFg8wPbbA/jZg=; b=LpWz6vow32n6x+AWxchTJVJXyR5Wg15fI7sGdPuth8ZPi/Ajqc+4lsTN17u2bnzxlD Lj6Sc+IV23tJapZxuw+h7wvTcQCs+y8uL1d4J9nXC5OIvmO34rjnfw436BmKnyvpWd9+ B/eqq1TL1zwWjGKXjO6rF5zloanhYxTJCVF7c/nZWeM4syuYOxpzK+Cp6T3HxDI+hSez +ux5NqLC0wchlrxPezIKO8lAfmIGi61Z1CRdhE/iBH2kttWiaFpJbWxnifOcuKfD40zc oAriKLHRwsZHVh/R6Or+wpBqbtGpTl7GG2TovZQkHNLTa0+5J9MpXg+D4v87TD5AUqy5 jlxw== X-Gm-Message-State: AKGB3mLOS3jafF2Sj3f/Ui/fF71baXKeGVkpAnB/Wfuq4QKRNv+lQ8K/ UvPuqtyY/CeyeoKExv7vOc4= X-Google-Smtp-Source: ACJfBovwEQzHiaEaxV37xrReMs0WuBbw16IxmktG1+MqALBNGk4FOltlaCxlWawgdc/HkbBP6bKuog== X-Received: by 10.99.66.197 with SMTP id p188mr2061892pga.371.1515009680176; Wed, 03 Jan 2018 12:01:20 -0800 (PST) Received: from squirtle.westlake.spaceflightindustries.com ([173.226.206.194]) by smtp.gmail.com with ESMTPSA id b9sm4542209pfl.108.2018.01.03.12.01.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Jan 2018 12:01:19 -0800 (PST) From: Andrey Smirnov To: Srinivas Kandagatla Subject: [PATCH v3 01/22] nvmem: Document struct nvmem_config Date: Wed, 3 Jan 2018 12:00:53 -0800 Message-Id: <20180103200114.23922-2-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180103200114.23922-1-andrew.smirnov@gmail.com> References: <20180103200114.23922-1-andrew.smirnov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180103_120131_148598_95BC0313 X-CRM114-Status: UNSURE ( 8.84 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-rockchip@lists.infradead.org, Andrey Smirnov , Kevin Hilman , linux-kernel@vger.kernel.org, Masahiro Yamada , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , linux-amlogic@lists.infradead.org, Carlo Caione , cphealy@gmail.com MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add a simple description of struct nvmem_config and its fields. Cc: Srinivas Kandagatla Cc: Heiko Stuebner Cc: Masahiro Yamada Cc: Carlo Caione Cc: Kevin Hilman Cc: Matthias Brugger Cc: cphealy@gmail.com Cc: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov --- include/linux/nvmem-provider.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h index 497706f5adca..27e599222ec1 100644 --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -22,6 +22,28 @@ typedef int (*nvmem_reg_read_t)(void *priv, unsigned int offset, typedef int (*nvmem_reg_write_t)(void *priv, unsigned int offset, void *val, size_t bytes); +/** + * struct nvmem_config - NVMEM device configuration + * + * @dev: Parent device. + * @name: Optional name. + * @id: Optional device ID used in full name. Ignored if name is NULL. + * @owner: Pointer to exporter module. Used for refcounting. + * @cells: Optional array of pre-defined NVMEM cells. + * @ncells: Number of elements in cells. + * @read_only: Device is read-only. + * @root_only: Device is accessibly to root only. + * @reg_read: Callback to read data. + * @reg_write: Callback to write data. + * @size: Device size. + * @word_size: Minimum read/write access granularity. + * @stride: Minimum read/write access stide. + * @priv: User context passed to read/write callbacks. + * + * Note: A default "nvmem" name will be assigned to the device if + * no name is specified in its configuration. In such case "" is + * generated with ida_simple_get() and provided id field is ignored. + */ struct nvmem_config { struct device *dev; const char *name;