linux/drivers/thermal/thermal_netlink.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2020 Linaro Limited
 *
 * Author: Daniel Lezcano <[email protected]>
 *
 * Generic netlink for thermal management framework
 */
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/kernel.h>
#include <net/genetlink.h>
#include <uapi/linux/thermal.h>

#include "thermal_core.h"

static const struct genl_multicast_group thermal_genl_mcgrps[] =;

static const struct nla_policy thermal_genl_policy[THERMAL_GENL_ATTR_MAX + 1] =;

struct param {};

cb_t;

static struct genl_family thermal_genl_family;
static BLOCKING_NOTIFIER_HEAD(thermal_genl_chain);

static int thermal_group_has_listeners(enum thermal_genl_multicast_groups group)
{}

/************************** Sampling encoding *******************************/

int thermal_genl_sampling_temp(int id, int temp)
{}

/**************************** Event encoding *********************************/

static int thermal_genl_event_tz_create(struct param *p)
{}

static int thermal_genl_event_tz(struct param *p)
{}

static int thermal_genl_event_tz_trip_up(struct param *p)
{}

static int thermal_genl_event_tz_trip_change(struct param *p)
{}

static int thermal_genl_event_cdev_add(struct param *p)
{}

static int thermal_genl_event_cdev_delete(struct param *p)
{}

static int thermal_genl_event_cdev_state_update(struct param *p)
{}

static int thermal_genl_event_gov_change(struct param *p)
{}

static int thermal_genl_event_cpu_capability_change(struct param *p)
{}

int thermal_genl_event_tz_delete(struct param *p)
	__attribute__((alias("thermal_genl_event_tz")));

int thermal_genl_event_tz_enable(struct param *p)
	__attribute__((alias("thermal_genl_event_tz")));

int thermal_genl_event_tz_disable(struct param *p)
	__attribute__((alias("thermal_genl_event_tz")));

int thermal_genl_event_tz_trip_down(struct param *p)
	__attribute__((alias("thermal_genl_event_tz_trip_up")));

static cb_t event_cb[] =;

/*
 * Generic netlink event encoding
 */
static int thermal_genl_send_event(enum thermal_genl_event event,
				   struct param *p)
{}

int thermal_notify_tz_create(const struct thermal_zone_device *tz)
{}

int thermal_notify_tz_delete(const struct thermal_zone_device *tz)
{}

int thermal_notify_tz_enable(const struct thermal_zone_device *tz)
{}

int thermal_notify_tz_disable(const struct thermal_zone_device *tz)
{}

int thermal_notify_tz_trip_down(const struct thermal_zone_device *tz,
				const struct thermal_trip *trip)
{}

int thermal_notify_tz_trip_up(const struct thermal_zone_device *tz,
			      const struct thermal_trip *trip)
{}

int thermal_notify_tz_trip_change(const struct thermal_zone_device *tz,
				  const struct thermal_trip *trip)
{}

int thermal_notify_cdev_state_update(const struct thermal_cooling_device *cdev,
				     int state)
{}

int thermal_notify_cdev_add(const struct thermal_cooling_device *cdev)
{}

int thermal_notify_cdev_delete(const struct thermal_cooling_device *cdev)
{}

int thermal_notify_tz_gov_change(const struct thermal_zone_device *tz,
				 const char *name)
{}

int thermal_genl_cpu_capability_event(int count,
				      struct thermal_genl_cpu_caps *caps)
{}
EXPORT_SYMBOL_GPL();

/*************************** Command encoding ********************************/

static int __thermal_genl_cmd_tz_get_id(struct thermal_zone_device *tz,
					void *data)
{}

static int thermal_genl_cmd_tz_get_id(struct param *p)
{}

static int thermal_genl_cmd_tz_get_trip(struct param *p)
{}

static int thermal_genl_cmd_tz_get_temp(struct param *p)
{}

static int thermal_genl_cmd_tz_get_gov(struct param *p)
{}

static int __thermal_genl_cmd_cdev_get(struct thermal_cooling_device *cdev,
				       void *data)
{}

static int thermal_genl_cmd_cdev_get(struct param *p)
{}

static cb_t cmd_cb[] =;

static int thermal_genl_cmd_dumpit(struct sk_buff *skb,
				   struct netlink_callback *cb)
{}

static int thermal_genl_cmd_doit(struct sk_buff *skb,
				 struct genl_info *info)
{}

static int thermal_genl_bind(int mcgrp)
{}

static void thermal_genl_unbind(int mcgrp)
{}

static const struct genl_small_ops thermal_genl_ops[] =;

static struct genl_family thermal_genl_family __ro_after_init =;

int thermal_genl_register_notifier(struct notifier_block *nb)
{}

int thermal_genl_unregister_notifier(struct notifier_block *nb)
{}

int __init thermal_netlink_init(void)
{}

void __init thermal_netlink_exit(void)
{}