Lines Matching refs:_cname
258 #define __ITEM_NAME(_type, _cname, _iname) \ argument
259 mlxsw_##_type##_##_cname##_##_iname##_item
266 #define MLXSW_ITEM8(_type, _cname, _iname, _offset, _shift, _sizebits) \ argument
267 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
271 .name = #_type "_" #_cname "_" #_iname, \
273 static inline u8 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
275 return __mlxsw_item_get8(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
277 static inline void mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u8 val)\
279 __mlxsw_item_set8(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
282 #define MLXSW_ITEM8_INDEXED(_type, _cname, _iname, _offset, _shift, _sizebits, \ argument
284 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
291 .name = #_type "_" #_cname "_" #_iname, \
294 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf, unsigned short index)\
296 return __mlxsw_item_get8(buf, &__ITEM_NAME(_type, _cname, _iname), \
300 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
303 __mlxsw_item_set8(buf, &__ITEM_NAME(_type, _cname, _iname), \
307 #define MLXSW_ITEM16(_type, _cname, _iname, _offset, _shift, _sizebits) \ argument
308 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
312 .name = #_type "_" #_cname "_" #_iname, \
314 static inline u16 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
316 return __mlxsw_item_get16(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
318 static inline void mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u16 val)\
320 __mlxsw_item_set16(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
323 #define MLXSW_ITEM16_INDEXED(_type, _cname, _iname, _offset, _shift, _sizebits, \ argument
325 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
332 .name = #_type "_" #_cname "_" #_iname, \
335 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf, unsigned short index)\
337 return __mlxsw_item_get16(buf, &__ITEM_NAME(_type, _cname, _iname), \
341 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
344 __mlxsw_item_set16(buf, &__ITEM_NAME(_type, _cname, _iname), \
348 #define MLXSW_ITEM32(_type, _cname, _iname, _offset, _shift, _sizebits) \ argument
349 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
353 .name = #_type "_" #_cname "_" #_iname, \
355 static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
357 return __mlxsw_item_get32(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
359 static inline void mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u32 val)\
361 __mlxsw_item_set32(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
364 #define MLXSW_ITEM32_INDEXED(_type, _cname, _iname, _offset, _shift, _sizebits, \ argument
366 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
373 .name = #_type "_" #_cname "_" #_iname, \
376 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf, unsigned short index)\
378 return __mlxsw_item_get32(buf, &__ITEM_NAME(_type, _cname, _iname), \
382 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
385 __mlxsw_item_set32(buf, &__ITEM_NAME(_type, _cname, _iname), \
389 #define MLXSW_ITEM64(_type, _cname, _iname, _offset, _shift, _sizebits) \ argument
390 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
394 .name = #_type "_" #_cname "_" #_iname, \
396 static inline u64 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
398 return __mlxsw_item_get64(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
400 static inline void mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u64 val)\
402 __mlxsw_item_set64(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
405 #define MLXSW_ITEM64_INDEXED(_type, _cname, _iname, _offset, _shift, \ argument
407 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
414 .name = #_type "_" #_cname "_" #_iname, \
417 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf, unsigned short index)\
419 return __mlxsw_item_get64(buf, &__ITEM_NAME(_type, _cname, _iname), \
423 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
426 __mlxsw_item_set64(buf, &__ITEM_NAME(_type, _cname, _iname), \
430 #define MLXSW_ITEM_BUF(_type, _cname, _iname, _offset, _sizebytes) \ argument
431 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
434 .name = #_type "_" #_cname "_" #_iname, \
437 mlxsw_##_type##_##_cname##_##_iname##_memcpy_from(const char *buf, char *dst) \
440 &__ITEM_NAME(_type, _cname, _iname), 0); \
443 mlxsw_##_type##_##_cname##_##_iname##_memcpy_to(char *buf, const char *src) \
446 &__ITEM_NAME(_type, _cname, _iname), 0); \
449 mlxsw_##_type##_##_cname##_##_iname##_data(char *buf) \
451 return __mlxsw_item_data(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
454 #define MLXSW_ITEM_BUF_INDEXED(_type, _cname, _iname, _offset, _sizebytes, \ argument
456 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
461 .name = #_type "_" #_cname "_" #_iname, \
464 mlxsw_##_type##_##_cname##_##_iname##_memcpy_from(const char *buf, \
469 &__ITEM_NAME(_type, _cname, _iname), index); \
472 mlxsw_##_type##_##_cname##_##_iname##_memcpy_to(char *buf, \
477 &__ITEM_NAME(_type, _cname, _iname), index); \
480 mlxsw_##_type##_##_cname##_##_iname##_data(char *buf, unsigned short index) \
483 &__ITEM_NAME(_type, _cname, _iname), index); \
486 #define MLXSW_ITEM_BIT_ARRAY(_type, _cname, _iname, _offset, _sizebytes, \ argument
488 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
492 .name = #_type "_" #_cname "_" #_iname, \
495 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf, u16 index) \
498 &__ITEM_NAME(_type, _cname, _iname), \
502 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u16 index, u8 val) \
505 &__ITEM_NAME(_type, _cname, _iname), \