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, \
274 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
276 return __mlxsw_item_get8(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
279 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u8 val) \
281 __mlxsw_item_set8(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
284 #define MLXSW_ITEM8_INDEXED(_type, _cname, _iname, _offset, _shift, _sizebits, \ argument
286 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
293 .name = #_type "_" #_cname "_" #_iname, \
296 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf, unsigned short index)\
298 return __mlxsw_item_get8(buf, &__ITEM_NAME(_type, _cname, _iname), \
302 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
305 __mlxsw_item_set8(buf, &__ITEM_NAME(_type, _cname, _iname), \
309 #define MLXSW_ITEM16(_type, _cname, _iname, _offset, _shift, _sizebits) \ argument
310 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
314 .name = #_type "_" #_cname "_" #_iname, \
317 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
319 return __mlxsw_item_get16(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
322 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u16 val) \
324 __mlxsw_item_set16(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
327 #define MLXSW_ITEM16_INDEXED(_type, _cname, _iname, _offset, _shift, _sizebits, \ argument
329 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
336 .name = #_type "_" #_cname "_" #_iname, \
339 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf, unsigned short index)\
341 return __mlxsw_item_get16(buf, &__ITEM_NAME(_type, _cname, _iname), \
345 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
348 __mlxsw_item_set16(buf, &__ITEM_NAME(_type, _cname, _iname), \
352 #define MLXSW_ITEM32(_type, _cname, _iname, _offset, _shift, _sizebits) \ argument
353 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
357 .name = #_type "_" #_cname "_" #_iname, \
360 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
362 return __mlxsw_item_get32(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
365 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u32 val) \
367 __mlxsw_item_set32(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
373 #define MLXSW_ITEM32_LP(_type, _cname, _offset1, _shift1, _offset2, _shift2) \ argument
374 static struct mlxsw_item __ITEM_NAME(_type, _cname, local_port) = { \
378 .name = #_type "_" #_cname "_local_port", \
380 static struct mlxsw_item __ITEM_NAME(_type, _cname, lp_msb) = { \
384 .name = #_type "_" #_cname "_lp_msb", \
387 mlxsw_##_type##_##_cname##_local_port_get(const char *buf) \
391 local_port = __mlxsw_item_get32(buf, &__ITEM_NAME(_type, _cname, \
393 lp_msb = __mlxsw_item_get32(buf, &__ITEM_NAME(_type, _cname, lp_msb), \
398 mlxsw_##_type##_##_cname##_local_port_set(char *buf, u32 val) \
400 __mlxsw_item_set32(buf, &__ITEM_NAME(_type, _cname, local_port), 0, \
402 __mlxsw_item_set32(buf, &__ITEM_NAME(_type, _cname, lp_msb), 0, \
406 #define MLXSW_ITEM32_INDEXED(_type, _cname, _iname, _offset, _shift, _sizebits, \ argument
408 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
415 .name = #_type "_" #_cname "_" #_iname, \
418 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf, unsigned short index)\
420 return __mlxsw_item_get32(buf, &__ITEM_NAME(_type, _cname, _iname), \
424 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
427 __mlxsw_item_set32(buf, &__ITEM_NAME(_type, _cname, _iname), \
431 #define MLXSW_ITEM64(_type, _cname, _iname, _offset, _shift, _sizebits) \ argument
432 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
436 .name = #_type "_" #_cname "_" #_iname, \
439 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf) \
441 return __mlxsw_item_get64(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
444 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u64 val) \
446 __mlxsw_item_set64(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
449 #define MLXSW_ITEM64_INDEXED(_type, _cname, _iname, _offset, _shift, \ argument
451 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
458 .name = #_type "_" #_cname "_" #_iname, \
461 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf, unsigned short index)\
463 return __mlxsw_item_get64(buf, &__ITEM_NAME(_type, _cname, _iname), \
467 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
470 __mlxsw_item_set64(buf, &__ITEM_NAME(_type, _cname, _iname), \
474 #define MLXSW_ITEM_BUF(_type, _cname, _iname, _offset, _sizebytes) \ argument
475 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
478 .name = #_type "_" #_cname "_" #_iname, \
481 mlxsw_##_type##_##_cname##_##_iname##_memcpy_from(const char *buf, char *dst) \
484 &__ITEM_NAME(_type, _cname, _iname), 0); \
487 mlxsw_##_type##_##_cname##_##_iname##_memcpy_to(char *buf, const char *src) \
490 &__ITEM_NAME(_type, _cname, _iname), 0); \
493 mlxsw_##_type##_##_cname##_##_iname##_data(char *buf) \
495 return __mlxsw_item_data(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
498 #define MLXSW_ITEM_BUF_INDEXED(_type, _cname, _iname, _offset, _sizebytes, \ argument
500 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
505 .name = #_type "_" #_cname "_" #_iname, \
508 mlxsw_##_type##_##_cname##_##_iname##_memcpy_from(const char *buf, \
513 &__ITEM_NAME(_type, _cname, _iname), index); \
516 mlxsw_##_type##_##_cname##_##_iname##_memcpy_to(char *buf, \
521 &__ITEM_NAME(_type, _cname, _iname), index); \
524 mlxsw_##_type##_##_cname##_##_iname##_data(char *buf, unsigned short index) \
527 &__ITEM_NAME(_type, _cname, _iname), index); \
530 #define MLXSW_ITEM_BIT_ARRAY(_type, _cname, _iname, _offset, _sizebytes, \ argument
532 static struct mlxsw_item __ITEM_NAME(_type, _cname, _iname) = { \
536 .name = #_type "_" #_cname "_" #_iname, \
539 mlxsw_##_type##_##_cname##_##_iname##_get(const char *buf, u16 index) \
542 &__ITEM_NAME(_type, _cname, _iname), \
546 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u16 index, u8 val) \
549 &__ITEM_NAME(_type, _cname, _iname), \