From patchwork Thu Mar 8 19:11: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: 10268847 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 2DD296037E for ; Thu, 8 Mar 2018 19:18:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D6D829AC3 for ; Thu, 8 Mar 2018 19:18:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 11F2529AC6; Thu, 8 Mar 2018 19:18:46 +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 968A729AC3 for ; Thu, 8 Mar 2018 19:18:45 +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=27fiaS4xH8YrGuSVYLR7kBfi2l7IezE/Z78nUQ+pIx8=; b=FuphllyLOG85Q3ow1KnIgApIRC 37AT3vtYP+OOGfTDKsrnwVs7pRzxrbbmOx2DK8R8pCKmfpC05xarTpeCqDbY1KVysmz4c5rIW1Wvc r1WI5/OvCzHpsT4H7ENy2iddcvtwgFzeuO4GcnKY1KSESPyATC3wMXMLJ+PACcvKJvhXwIxVXIKeF j0aKlhik12sbQoqbOss4enKJtmnItb+oE2D2lFEsrFKdzfO+V1TWI4WbjH45cqFi19PqVdliPbCII d2D+YSX0QrQ17G2VtuPWohmwBmlIVpSBmq4NoKDspXNs2vNyhNtMuKfCSwJdttbRXHKtTWCAmaCiC 57XcyZeg==; 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 1eu13j-0006Qc-Ss; Thu, 08 Mar 2018 19:18:35 +0000 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eu0xr-0001ss-Mb; Thu, 08 Mar 2018 19:12:34 +0000 Received: by mail-pl0-x242.google.com with SMTP id d9-v6so3839854plo.8; Thu, 08 Mar 2018 11:12:21 -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=OKeJV4YSqHEu3ECJvzSgi4P5RbE7U6t9/+V2R2iLbHs=; b=ZOqFXqpTVz6MKHFeVK4pykD6SewiVUdEgyLkjyYkrUnygPWgZ1FPPcu5Wa6dTu78GN VW/YDdF9Y0BQnnZP3KMc73DtP0kl+ByR1ZShQIAPuyky0SNGdgHGLebztGlqko1qCxYp ezWEINgcfj/T3wPHbtvDKcBxRSeatuW6ZTD4AB8oSrJAGoagt0sxedApsZ1ztAXf4Ua9 FXzlSJ2uyYBgesYm3KFxGEgLx22bmbdgrLUdsgsp9QfkbwqFJbToRH5LReRJ/nUEXOb8 if6RMppgfbI70+fF7r55QcoDAnMB/o1WZI48VqDh1XQULBf70w1D92UMwFCJ8Kf54+qo 0i1Q== 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=OKeJV4YSqHEu3ECJvzSgi4P5RbE7U6t9/+V2R2iLbHs=; b=RTGnWsO0BUEgfNEwL+Jlft9lGZOYcQahH2iai6DCnAB3qlbORQgyHeCpRKIvL+li9N lqnCCZ6M41NRHJGdkkBLmugwA5jYSi0PUxsuCLKQubebYu19i8jmPEt/PO6a+S/bonIp vdMPaRGEfaIgi0qCFxag7CQLd9hI4admyHXc3mMYvmNbiDqGCajC7G7vQULrmnUCT3hb 9qHisLIFu7qBeDrZIhWO9mN5w/SBKkM4psCgMH0kPNBT0rWZNVN6//wju0FLN8ebKQQy r03UPh+aSJGfuHYknYW48aqI2fJeGA5wIlgVhPCD9zD4BXj3bgxW8JpIq2sxW06V/TD8 DkUw== X-Gm-Message-State: APf1xPBOpeaqtxZaqzFyKlGTOL62KwwFPuqjm/ulRXGRKfTgfLRtnSE5 VvuKFN3f67hmZvI+lQl3APQ= X-Google-Smtp-Source: AG47ELu5yo783sNAi4FT2IW3wP92zw8DLvPMVDoz6xKcK3fCjVRm4Wo7rqaUCF52D2n8Nio/oZXqww== X-Received: by 2002:a17:902:367:: with SMTP id 94-v6mr25247180pld.140.1520536340781; Thu, 08 Mar 2018 11:12:20 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id j64sm47201768pfe.68.2018.03.08.11.12.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Mar 2018 11:12:20 -0800 (PST) From: Andrey Smirnov To: Srinivas Kandagatla Subject: [PATCH v5 01/21] nvmem: Document struct nvmem_config Date: Thu, 8 Mar 2018 11:11:45 -0800 Message-Id: <20180308191205.26943-2-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180308191205.26943-1-andrew.smirnov@gmail.com> References: <20180308191205.26943-1-andrew.smirnov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180308_111231_747175_6F6BC526 X-CRM114-Status: GOOD ( 12.09 ) 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..a39f76ff2ccd 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 stride. + * @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;