From patchwork Tue Jul 30 19:27:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org> X-Patchwork-Id: 13747818 Date: Tue, 30 Jul 2024 20:27:07 +0100 From: Daniel Golle <daniel@makrotopia.org> To: Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Jens Axboe <axboe@kernel.dk>, Daniel Golle <daniel@makrotopia.org>, Christian Brauner <brauner@kernel.org>, Al Viro <viro@zeniv.linux.org.uk>, Li Lingfeng <lilingfeng3@huawei.com>, Ming Lei <ming.lei@redhat.com>, Christian Heusel <christian@heusel.eu>, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= <rafal@milecki.pl>, Felix Fietkau <nbd@nbd.name>, John Crispin <john@phrozen.org>, Chad Monroe <chad.monroe@adtran.com>, Yangyu Chen <cyy@cyyself.name>, Tianling Shen <cnsztl@immortalwrt.org>, Chuanhong Guo <gch981213@gmail.com>, Chen Minqiang <ptpt52@gmail.com>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH v5 4/4] block: add new genhd flag GENHD_FL_NVMEM Message-ID: <311ea569c23ce14e2896cd3b069dc494c58c49c2.1722365899.git.daniel@makrotopia.org> References: <cover.1722365899.git.daniel@makrotopia.org> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: <linux-block.vger.kernel.org> List-Subscribe: <mailto:linux-block+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-block+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <cover.1722365899.git.daniel@makrotopia.org> Add new flag to destinguish block devices which may act as an NVMEM provider. Signed-off-by: Daniel Golle <daniel@makrotopia.org> --- include/linux/blkdev.h | 2 ++ 1 file changed, 2 insertions(+) --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -80,11 +80,13 @@ struct partition_meta_info { * ``GENHD_FL_NO_PART``: partition support is disabled. The kernel will not * scan for partitions from add_disk, and users can't add partitions manually. * + * ``GENHD_FL_NVMEM``: the block device should be considered as NVMEM provider. */ enum { GENHD_FL_REMOVABLE = 1 << 0, GENHD_FL_HIDDEN = 1 << 1, GENHD_FL_NO_PART = 1 << 2, + GENHD_FL_NVMEM = 1 << 3, }; enum {