/* SPDX-License-Identifier: GPL-2.0-only */ /* * devfreq-event: a framework to provide raw data and events of devfreq devices * * Copyright (C) 2014 Samsung Electronics * Author: Chanwoo Choi <cw00.choi@samsung.com>
*/
/** * struct devfreq_event_dev - the devfreq-event device * * @node : Contain the devfreq-event device that have been registered. * @dev : the device registered by devfreq-event class. dev.parent is * the device using devfreq-event. * @lock : a mutex to protect accessing devfreq-event. * @enable_count: the number of enable function have been called. * @desc : the description for devfreq-event device. * * This structure contains devfreq-event device information.
*/ struct devfreq_event_dev { struct list_head node;
/** * struct devfreq_event_data - the devfreq-event data * * @load_count : load count of devfreq-event device for the given period. * @total_count : total count of devfreq-event device for the given period. * each count may represent a clock cycle, a time unit * (ns/us/...), or anything the device driver wants. * Generally, utilization is load_count / total_count. * * This structure contains the data of devfreq-event device for polling period.
*/ struct devfreq_event_data { unsignedlong load_count; unsignedlong total_count;
};
/** * struct devfreq_event_ops - the operations of devfreq-event device * * @enable : Enable the devfreq-event device. * @disable : Disable the devfreq-event device. * @reset : Reset all setting of the devfreq-event device. * @set_event : Set the specific event type for the devfreq-event device. * @get_event : Get the result of the devfreq-event devie with specific * event type. * * This structure contains devfreq-event device operations which can be * implemented by devfreq-event device drivers.
*/ struct devfreq_event_ops { /* Optional functions */ int (*enable)(struct devfreq_event_dev *edev); int (*disable)(struct devfreq_event_dev *edev); int (*reset)(struct devfreq_event_dev *edev);
/* Mandatory functions */ int (*set_event)(struct devfreq_event_dev *edev); int (*get_event)(struct devfreq_event_dev *edev, struct devfreq_event_data *edata);
};
/** * struct devfreq_event_desc - the descriptor of devfreq-event device * * @name : the name of devfreq-event device. * @event_type : the type of the event determined and used by driver * @driver_data : the private data for devfreq-event driver. * @ops : the operation to control devfreq-event device. * * Each devfreq-event device is described with a this structure. * This structure contains the various data for devfreq-event device. * The event_type describes what is going to be counted in the register. * It might choose to count e.g. read requests, write data in bytes, etc. * The full supported list of types is present in specyfic header in: * include/dt-bindings/pmu/.
*/ struct devfreq_event_desc { constchar *name;
u32 event_type; void *driver_data;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.