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: 10268769 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 B1CC0602BD for ; Thu, 8 Mar 2018 19:14:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0C0529AB7 for ; Thu, 8 Mar 2018 19:14:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9504529AC2; Thu, 8 Mar 2018 19:14:24 +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 1F3B929AB7 for ; Thu, 8 Mar 2018 19:14:24 +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=TPXhU5LuBTNNZdcIqg364SnFKGfMGZP2R/Uuq5BGwf8=; b=BHyLPVQAAnaREJm+1D48Z3pwDm CisQ1xNtnZT8MhLSHxbQlM1Anvy2ScnWRRYzsmheH9FMKKJfv1Y0VUhe803+YOsa+qOj413mgM0aU OZX8YL5ngjCJSc9jm/3R+/4Q0kj49EEtdkw2dBCvwnn0HGasvOf/tlVts086JHiYbNkmb6Le8vshk OOgvq0ERBRW7Gsae2eIBfR7uqHjgov49p/1xPkVaEzSx4quNSnC/4B3+aNSy/cMWC/nH5UuHJYtiG zY6sAVjtftNIJvhVLEXS1rfDIF9ZeamrjXfo9/8VUVWCXpRoxCmnOk9cpxCfd/9z6dSf2kKlCAUkt T318dILw==; 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 1eu0zb-0002sm-TW; Thu, 08 Mar 2018 19:14:19 +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-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..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;