Home | History | Annotate | Line # | Download | only in core
      1 /*	$NetBSD: enum.h,v 1.3 2021/12/18 23:45:33 riastradh Exp $	*/
      2 
      3 /* SPDX-License-Identifier: MIT */
      4 #ifndef __NVKM_ENUM_H__
      5 #define __NVKM_ENUM_H__
      6 #include <core/os.h>
      7 
      8 struct nvkm_enum {
      9 	u32 value;
     10 	const char *name;
     11 	const void *data;
     12 	u32 data2;
     13 };
     14 
     15 const struct nvkm_enum *nvkm_enum_find(const struct nvkm_enum *, u32 value);
     16 
     17 struct nvkm_bitfield {
     18 	u32 mask;
     19 	const char *name;
     20 };
     21 
     22 void nvkm_snprintbf(char *, int, const struct nvkm_bitfield *, u32 value);
     23 #endif
     24