From patchwork Wed Feb 28 14:40:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10247695 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 7D0BA60362 for ; Wed, 28 Feb 2018 14:43:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D76F201A4 for ; Wed, 28 Feb 2018 14:43:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61B79285A8; Wed, 28 Feb 2018 14:43:53 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 B96C9201A4 for ; Wed, 28 Feb 2018 14:43:52 +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=SjH4RskUaSwO5Dh0/npxWXhRxM M98/kwX5fWJF2Hm+7LQM8HbV9wwWx/RBZ2Y6C8onlp4hfkWbtF6ngkdDZWHAg7jHf627tgShTjdys jeGIKYvW7NgvsrzS/2bv4AvUDhiCgXwealS/3KzwmGnLKmKqsf9tx9eoWJJyH1Ki5tfyHeKz4VYza Hg58qyT0GDAlxXvhJmPexpir80z68IM7dpiK0rFP5zuXTBH5s1fvy6OwwJ9+Mcjqa3orOzaF33oOP TIMZsm3KCw7mQJ1EegjsHFFOgI1AiGaoecgTxGR8qOqjzXKiYu5rTYwQkCZ4U5S3p3lQrsdk+3G5A 4XN7rnYA==; 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 1er2xQ-0001nP-LK; Wed, 28 Feb 2018 14:43:48 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1er2vK-0008OJ-Ck; Wed, 28 Feb 2018 14:41:43 +0000 Received: by mail-pf0-x241.google.com with SMTP id h11so671045pfn.4; Wed, 28 Feb 2018 06:41:28 -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=ES1fiDuIINgE7/kUDWBiE+iPEssO2X8HrLz2nxebgb4zaBftA8+97TwjkelUqEVyEQ ka0O2vs4c6CbPDbq4vETuOzkPrRsx2wnuF40ZGmvFSs255Y8MtMChLdYENNSDKXr8ZTc ALvvO2pKNKrIhbD5DNkhBgseKhV/cnl5tYD3bD45BN25jHuK7ZfL1VHcYenoyW68WXAp PY1ZuSW1JMjsV1keG4W6KxzOhj6mOyKesSAVzvM2/yMPZPCfuavm2PWT9iRNaSsE7Jpk PN3uwCePE3zMI5t3AfRCW3tH1/JvBvEXrm6pdzdzLNd80dRTM3AQPI1kKEZJxagrbdHX KrPA== 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=UKtCDqfPK41BnGejwk0sOvaNF9N0fMd8fCf4pAhiS9MbJJwbGJCKTcMuaZzAj95dOe nUqWZMA+fCYGJIAj9OcyMaadQ2PXQArYYpkrdZPlOpx50fMY8JCVbqI8O3X80S/sgfgQ ocnb3I2G9h47bagec0heQSrlibTcGdKZKI1YV4Syjte3Zm1kZZ1hT2pPb0ybJxWHsCBv 3GJ5Em16vnN/RgE5SMvFOFNR0SZHVkoX9rgE83pCF8kZKKiSFgEr/Qddvuxixq7RPyMO Pih1R3UIsqWQg9Yyzo6dMUsSDGJfIh6L8w4qaIAlBlxzG7ql192koG0b/eqTvxadhSu5 jabw== X-Gm-Message-State: APf1xPAitMrwse2XnTN35zalDXqM+sMdVzi/coBTKM4oE9Zg2l8zPP0l TuBB2IHVjaDbOoa+zaJB5Q8= X-Google-Smtp-Source: AG47ELtHqXszQ3J8DL2DzF84cB5fyd6M8AS6ZgyI8wJK0ACkLZcJam0F8x4J1SUDu+3iHuJbGy8TVA== X-Received: by 10.99.164.81 with SMTP id c17mr10519897pgp.114.1519828887292; Wed, 28 Feb 2018 06:41:27 -0800 (PST) Received: from squirtle.westlake.spaceflightindustries.com ([173.226.206.194]) by smtp.gmail.com with ESMTPSA id h9sm3674312pgr.78.2018.02.28.06.41.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2018 06:41:26 -0800 (PST) From: Andrey Smirnov To: Srinivas Kandagatla Subject: [PATCH v4 01/22] nvmem: Document struct nvmem_config Date: Wed, 28 Feb 2018 06:40:45 -0800 Message-Id: <20180228144106.16363-2-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180228144106.16363-1-andrew.smirnov@gmail.com> References: <20180228144106.16363-1-andrew.smirnov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180228_064138_607629_B42535BF X-CRM114-Status: GOOD ( 12.26 ) 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;