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: 10247703 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 B2A7960362 for ; Wed, 28 Feb 2018 14:44:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1095201A4 for ; Wed, 28 Feb 2018 14:44:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94D47285A8; Wed, 28 Feb 2018 14:44:13 +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 2CEBB201A4 for ; Wed, 28 Feb 2018 14:44:13 +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=G8FjWuhQCukXzWjP5zeEl/DIh3 +hcXHfA+ZceZhREopCYz+olTwVOXwcSsD0i13mMJh/HOwk9GJbiWU1ETKQx38H7sI+A1pUpF094BS TTFyFZ09K4KiuCQRi2qvePdLt+9cBPkp+7SJml1SJJlD05R3esfyYS66OLPuKRyP7J1wtiADF70ET 2+wbqAVRBDUD5hPi1YvUOhqoGg/bnS1sulgCHkOEOLh5m/c1Ws+j+Ne+3HpE59XlrnfFMvKb3ty0Y 5+ITqDq7OHG531cg4eqm1ufgWQzTKVizLCaF+y3zC+QjGAusWx2bFZlbBUF+Dn0RJAItwQ9q8tEYV 8MK/2NwA==; 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 1er2xf-0001w4-4G; Wed, 28 Feb 2018 14:44:03 +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-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;