/*
 * ./kernel_modules/pse/pse-class.h
 *
 *
 * Author: Cradlepoint Technology, Inc.  <source@cradlepoint.com>
 *		Kyle Swenson <kswenson@cradlepoint.com>
 *
 * Copyright 2017 Cradlepoint Technology, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef __PSE_CLASS_H__
#define __PSE_CLASS_H__

#define PSE_CLASS_NAME_STR "pse"
#define PSE_MAX_PORTS	64
#define PSE_VERSION_STR		"PSE Class Version v1.0.1 [01 Aug 2019]"
struct pse_data {
	struct class cls;
	struct workqueue_struct *wq;
	struct work_struct offload;
	int power_used;
	int power_budget;
	uint8_t port_priorities[PSE_MAX_PORTS]; /* This is to store priorities for when ports don't exist yet */
	uint8_t enabled;
	struct mutex pse_lock;
};


#define get_pse_data(c) container_of(c, struct pse_data, cls)

struct device *get_lowest_priority_device(struct class *class);
struct device *relink_priority_list(struct class *class);
struct device *get_highest_priority_device(struct class *class);
int match_port_priority(struct device *dev, const void *data);
int match_port_id(struct device *dev, const void *data);
int compare_port_priority(struct pse_port_device *p1, struct pse_port_device *p2);
struct device *get_lowest_priority_device(struct class *class);
struct device *get_highest_priority_device(struct class *class);
struct device *get_next_lowest_priority_device(struct class *class, struct device *dev);
void disconnect_port(struct device *dev);

int calc_power_used(struct class *class, struct device *start);
int allocate_power(struct pse_port_device *port);
void pse_event(struct device *dev);
void redistribute_power(struct class *class);

#endif
