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: 10142937 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 66211601A1 for ; Wed, 3 Jan 2018 20:03:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 589F229200 for ; Wed, 3 Jan 2018 20:03:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D41D29279; Wed, 3 Jan 2018 20:03:16 +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 CFF5B29200 for ; Wed, 3 Jan 2018 20:03:15 +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=+FRWoZsc0X4so6H/hT/dW6tvWYIJNIa4IEYeCJaP4aQ=; b=CM0BeZ3F/tfr7u3b1aRXEuU3JP I2B9yQclk/+CyK5p5PPth6eJk1cCcF7H/LqAom1A1uYg5FFV9yCVF2jkylKBglLW3vyGybu8upQOd gE7xBPMxdefzbY5Ao48ZsPGHM0NCnoK+l4YqSJrZW9X//ATq3LwEqlJRuBSj57fSYSFDy6psZUi3T wGjQh7cpriQ3l35gJMs4bragvdZhOQuWvJxObQ1dS5VqUrbEp93yJgLMpOYY8pc0y+q0ZGWVTG9lr 1SG/XYdA0RY0JGzTwFwB2BJ571Gl15F0TUyZY6O8bFp+rZFA9tweYekFLl83iCW9+VNMvdAnZS1cg s0dEt//A==; 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 1eWpFn-0005Xo-R6; Wed, 03 Jan 2018 20:03:11 +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-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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;