xref: /linux/kernel/power/em_netlink_autogen.c (revision 7fc2cd2e4b398c57c9cf961cfea05eadbf34c05c)
1 // SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2 /* Do not edit directly, auto-generated from: */
3 /*	Documentation/netlink/specs/em.yaml */
4 /* YNL-GEN kernel source */
5 
6 #include <net/netlink.h>
7 #include <net/genetlink.h>
8 
9 #include "em_netlink_autogen.h"
10 
11 #include <uapi/linux/energy_model.h>
12 
13 /* EM_CMD_GET_PD_TABLE - do */
14 static const struct nla_policy em_get_pd_table_nl_policy[EM_A_PD_TABLE_PD_ID + 1] = {
15 	[EM_A_PD_TABLE_PD_ID] = { .type = NLA_U32, },
16 };
17 
18 /* Ops table for em */
19 static const struct genl_split_ops em_nl_ops[] = {
20 	{
21 		.cmd	= EM_CMD_GET_PDS,
22 		.doit	= em_nl_get_pds_doit,
23 		.flags	= GENL_CMD_CAP_DO,
24 	},
25 	{
26 		.cmd		= EM_CMD_GET_PD_TABLE,
27 		.doit		= em_nl_get_pd_table_doit,
28 		.policy		= em_get_pd_table_nl_policy,
29 		.maxattr	= EM_A_PD_TABLE_PD_ID,
30 		.flags		= GENL_CMD_CAP_DO,
31 	},
32 };
33 
34 static const struct genl_multicast_group em_nl_mcgrps[] = {
35 	[EM_NLGRP_EVENT] = { "event", },
36 };
37 
38 struct genl_family em_nl_family __ro_after_init = {
39 	.name		= EM_FAMILY_NAME,
40 	.version	= EM_FAMILY_VERSION,
41 	.netnsok	= true,
42 	.parallel_ops	= true,
43 	.module		= THIS_MODULE,
44 	.split_ops	= em_nl_ops,
45 	.n_split_ops	= ARRAY_SIZE(em_nl_ops),
46 	.mcgrps		= em_nl_mcgrps,
47 	.n_mcgrps	= ARRAY_SIZE(em_nl_mcgrps),
48 };
49