From patchwork Fri Mar 9 14:46:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 131137 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp1083537lja; Fri, 9 Mar 2018 06:56:49 -0800 (PST) X-Google-Smtp-Source: AG47ELsJY2RREU6bM5b6tvmMs52LgGtXCvXIIOH9gGquggmPMcdvxwAFlcQrBDE4GdSBZTEE9rV+ X-Received: by 2002:a17:902:9897:: with SMTP id s23-v6mr16156814plp.105.1520607409281; Fri, 09 Mar 2018 06:56:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520607409; cv=none; d=google.com; s=arc-20160816; b=d66OfWwjT/Gr6AZpNOTUw/YiwxjeLnlZgYFxb+aqyV3ME3kATkLZs77MQ5XbIyICf0 XCXljdClx2Jjpeu2kXKpRGj/CqpAUAHsYN1Wq1l/NWT0qWiIoEuEZnhEKbla4wPlRsBL 3SvOT5NzdWiAWjWA2EdBJWSHrXyLmIptSmIqEqkfffAf/vl0eKKVVmBCNpDSoaHtmnXn 1bEpgtkCdiI7Ck50stOyUOmGhl6xi+FGolm+Y0XdR3FEFpVnWsqlS3GCErwAqIporV38 nN88WOWvJEqrPke7lF+0FU2EibBYcwGy1ih6LDVNUHnIGkmsyBkqJ2ZNVjIRRYnU2aJy 1mqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=vQR5gljnwr4aCOvufpueUZU1itTLbeOEfIMn7X2e+lg=; b=UO8iVZI10m+gqf37PTwWJm0uY01P6FPJab/vvp+9psHIc3WMUlI+lIPn2BsjpX1WEp xx/6PfnLUIN7e/TmkqbO5bEI3yrZrh0eBVMX4E3WlTepfsSAn0baow0ClU+PmS4Gl8cL UwFsm/ukWJu7VWnPkW2nuLacbZmeazzCxD1duzanuJosvu+WlpcNlkR9IEq+Ks/Akrf9 oSVmh0EjnZ0/m3KaqgUmWq9F9GAsFK01uDNAffjbCyRF0AfEfY2D+sRUhhl7Q8VjUO6C /vAw+7qSSeGMY0i4tOErZLHifZkNABNlDM8RSaNnsM3D5ZxrGrchg2olVQPOl/9ROqTn BEnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XZDZVI/N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11-v6si979935plj.701.2018.03.09.06.56.49; Fri, 09 Mar 2018 06:56:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XZDZVI/N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932303AbeCIO4q (ORCPT + 28 others); Fri, 9 Mar 2018 09:56:46 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:41487 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932067AbeCIOu2 (ORCPT ); Fri, 9 Mar 2018 09:50:28 -0500 Received: by mail-wr0-f193.google.com with SMTP id f14so9266500wre.8 for ; Fri, 09 Mar 2018 06:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vQR5gljnwr4aCOvufpueUZU1itTLbeOEfIMn7X2e+lg=; b=XZDZVI/NFoB1gR6GHdIcZXY2a/njgclvMAs1wjbVOhW9H4RRQELFmHLNYAGKmdzo/d rxRb9G4SoxJyfQQ/a/ZMBTGXfwons+/QYiyNrP4jIpCfxDoTIZCSmmMfY2X55bIEaJni avSn1UiSE9jy8Kvs+i3yeZn1OReQg+tnGYnU4= 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=vQR5gljnwr4aCOvufpueUZU1itTLbeOEfIMn7X2e+lg=; b=m5M3x4NtL8DM5P4zRldDx1SuTX+Wi48VGtfTFUEKHdXhWWngExLFJwje2VnjYfyPpV XYgff/FGGnkKY1EFnW0JGLmDPeU9ra3rhRPGKypDnm+4qN+yiBOHNhEke33vbNH4Nx2U 9cbU5ZGJxais21AEZaO+6eyRs/nDZGapV32J/Wc6WlYcSCGUuFAl089VTPYDrCDwgy51 gTekML8jaAXiOXbxXtsTdhYTGG4n3h+L3Ky85YtkmBfyoQ0WawkD2tqvFmhSoScGIMgz 2mTdiRWKsDknUz11V9FkYq8VdIQMcbuzYyUsc85DHHx7YcE/QqbaW9EWorVFGldhBSC/ nq+A== X-Gm-Message-State: APf1xPCjO1nKii9weIZAeRh5VoqxpbSUGVOFYov5M4zmpW1wPJtaNoXP AWDGR4Vo33LVeFCyYEg1NhUuGA== X-Received: by 10.223.209.197 with SMTP id m5mr26276124wri.121.1520607026992; Fri, 09 Mar 2018 06:50:26 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id u48sm1191901wrb.85.2018.03.09.06.50.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Mar 2018 06:50:26 -0800 (PST) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, srinivas.kandagatla@linaro.org, Andrey Smirnov , Heiko Stuebner , Masahiro Yamada , Carlo Caione , Kevin Hilman , Matthias Brugger , cphealy@gmail.com, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 01/25] nvmem: Document struct nvmem_config Date: Fri, 9 Mar 2018 14:46:55 +0000 Message-Id: <20180309144719.29904-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180309144719.29904-1-srinivas.kandagatla@linaro.org> References: <20180309144719.29904-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrey Smirnov 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 Signed-off-by: Srinivas Kandagatla --- include/linux/nvmem-provider.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -- 2.15.1 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;