/** * struct scmi_revision_info - version information structure * * @major_ver: Major ABI version. Change here implies risk of backward * compatibility break. * @minor_ver: Minor ABI version. Change here implies new feature addition, * or compatible change in ABI. * @num_protocols: Number of protocols that are implemented, excluding the * base protocol. * @num_agents: Number of agents in the system. * @impl_ver: A vendor-specific implementation version. * @vendor_id: A vendor identifier(Null terminated ASCII string) * @sub_vendor_id: A sub-vendor identifier(Null terminated ASCII string)
*/ struct scmi_revision_info {
u16 major_ver;
u16 minor_ver;
u8 num_protocols;
u8 num_agents;
u32 impl_ver; char vendor_id[SCMI_SHORT_NAME_MAX_SIZE]; char sub_vendor_id[SCMI_SHORT_NAME_MAX_SIZE];
};
/** * struct scmi_clk_proto_ops - represents the various operations provided * by SCMI Clock Protocol * * @count_get: get the count of clocks provided by SCMI * @info_get: get the information of the specified clock * @rate_get: request the current clock rate of a clock * @rate_set: set the clock rate of a clock * @enable: enables the specified clock * @disable: disables the specified clock * @state_get: get the status of the specified clock * @config_oem_get: get the value of an OEM specific clock config * @config_oem_set: set the value of an OEM specific clock config * @parent_get: get the parent id of a clk * @parent_set: set the parent of a clock
*/ struct scmi_clk_proto_ops { int (*count_get)(conststruct scmi_protocol_handle *ph);
/** * struct scmi_perf_proto_ops - represents the various operations provided * by SCMI Performance Protocol * * @num_domains_get: gets the number of supported performance domains * @info_get: get the information of a performance domain * @limits_set: sets limits on the performance level of a domain * @limits_get: gets limits on the performance level of a domain * @level_set: sets the performance level of a domain * @level_get: gets the performance level of a domain * @transition_latency_get: gets the DVFS transition latency for a given device * @rate_limit_get: gets the minimum time (us) required between successive * requests * @device_opps_add: adds all the OPPs for a given device * @freq_set: sets the frequency for a given device using sustained frequency * to sustained performance level mapping * @freq_get: gets the frequency for a given device using sustained frequency * to sustained performance level mapping * @est_power_get: gets the estimated power cost for a given performance domain * at a given frequency * @fast_switch_possible: indicates if fast DVFS switching is possible or not * for a given device * @fast_switch_rate_limit: gets the minimum time (us) required between * successive fast_switching requests * @power_scale_mw_get: indicates if the power values provided are in milliWatts * or in some other (abstract) scale
*/ struct scmi_perf_proto_ops { int (*num_domains_get)(conststruct scmi_protocol_handle *ph); conststruct scmi_perf_domain_info __must_check *(*info_get)
(conststruct scmi_protocol_handle *ph, u32 domain); int (*limits_set)(conststruct scmi_protocol_handle *ph, u32 domain,
u32 max_perf, u32 min_perf); int (*limits_get)(conststruct scmi_protocol_handle *ph, u32 domain,
u32 *max_perf, u32 *min_perf); int (*level_set)(conststruct scmi_protocol_handle *ph, u32 domain,
u32 level, bool poll); int (*level_get)(conststruct scmi_protocol_handle *ph, u32 domain,
u32 *level, bool poll); int (*transition_latency_get)(conststruct scmi_protocol_handle *ph,
u32 domain); int (*rate_limit_get)(conststruct scmi_protocol_handle *ph,
u32 domain, u32 *rate_limit); int (*device_opps_add)(conststruct scmi_protocol_handle *ph, struct device *dev, u32 domain); int (*freq_set)(conststruct scmi_protocol_handle *ph, u32 domain, unsignedlong rate, bool poll); int (*freq_get)(conststruct scmi_protocol_handle *ph, u32 domain, unsignedlong *rate, bool poll); int (*est_power_get)(conststruct scmi_protocol_handle *ph, u32 domain, unsignedlong *rate, unsignedlong *power); bool (*fast_switch_possible)(conststruct scmi_protocol_handle *ph,
u32 domain); int (*fast_switch_rate_limit)(conststruct scmi_protocol_handle *ph,
u32 domain, u32 *rate_limit); enum scmi_power_scale (*power_scale_get)(conststruct scmi_protocol_handle *ph);
};
/** * struct scmi_power_proto_ops - represents the various operations provided * by SCMI Power Protocol * * @num_domains_get: get the count of power domains provided by SCMI * @name_get: gets the name of a power domain * @state_set: sets the power state of a power domain * @state_get: gets the power state of a power domain
*/ struct scmi_power_proto_ops { int (*num_domains_get)(conststruct scmi_protocol_handle *ph); constchar *(*name_get)(conststruct scmi_protocol_handle *ph,
u32 domain); #define SCMI_POWER_STATE_TYPE_SHIFT 30 #define SCMI_POWER_STATE_ID_MASK (BIT(28) - 1) #define SCMI_POWER_STATE_PARAM(type, id) \
((((type) & BIT(0)) << SCMI_POWER_STATE_TYPE_SHIFT) | \
((id) & SCMI_POWER_STATE_ID_MASK)) #define SCMI_POWER_STATE_GENERIC_ON SCMI_POWER_STATE_PARAM(0, 0) #define SCMI_POWER_STATE_GENERIC_OFF SCMI_POWER_STATE_PARAM(1, 0) int (*state_set)(conststruct scmi_protocol_handle *ph, u32 domain,
u32 state); int (*state_get)(conststruct scmi_protocol_handle *ph, u32 domain,
u32 *state);
};
/** * struct scmi_sensor_reading - represent a timestamped read * * Used by @reading_get_timestamped method. * * @value: The signed value sensor read. * @timestamp: An unsigned timestamp for the sensor read, as provided by * SCMI platform. Set to zero when not available.
*/ struct scmi_sensor_reading { longlong value; unsignedlonglong timestamp;
};
/** * struct scmi_range_attrs - specifies a sensor or axis values' range * @min_range: The minimum value which can be represented by the sensor/axis. * @max_range: The maximum value which can be represented by the sensor/axis.
*/ struct scmi_range_attrs { longlong min_range; longlong max_range;
};
/** * struct scmi_sensor_axis_info - describes one sensor axes * @id: The axes ID. * @type: Axes type. Chosen amongst one of @enum scmi_sensor_class. * @scale: Power-of-10 multiplier applied to the axis unit. * @name: NULL-terminated string representing axes name as advertised by * SCMI platform. * @extended_attrs: Flag to indicate the presence of additional extended * attributes for this axes. * @resolution: Extended attribute representing the resolution of the axes. * Set to 0 if not reported by this axes. * @exponent: Extended attribute representing the power-of-10 multiplier that * is applied to the resolution field. Set to 0 if not reported by * this axes. * @attrs: Extended attributes representing minimum and maximum values * measurable by this axes. Set to 0 if not reported by this sensor.
*/ struct scmi_sensor_axis_info { unsignedint id; unsignedint type; int scale; char name[SCMI_MAX_STR_SIZE]; bool extended_attrs; unsignedint resolution; int exponent; struct scmi_range_attrs attrs;
};
/** * struct scmi_sensor_intervals_info - describes number and type of available * update intervals * @segmented: Flag for segmented intervals' representation. When True there * will be exactly 3 intervals in @desc, with each entry * representing a member of a segment in this order: * {lowest update interval, highest update interval, step size} * @count: Number of intervals described in @desc. * @desc: Array of @count interval descriptor bitmask represented as detailed in * the SCMI specification: it can be accessed using the accompanying * macros. * @prealloc_pool: A minimal preallocated pool of desc entries used to avoid * lesser-than-64-bytes dynamic allocation for small @count * values.
*/ struct scmi_sensor_intervals_info { bool segmented; unsignedint count; #define SCMI_SENS_INTVL_SEGMENT_LOW 0 #define SCMI_SENS_INTVL_SEGMENT_HIGH 1 #define SCMI_SENS_INTVL_SEGMENT_STEP 2 unsignedint *desc; #define SCMI_SENS_INTVL_GET_SECS(x) FIELD_GET(GENMASK(20, 5), (x)) #define SCMI_SENS_INTVL_GET_EXP(x) \
({ \ int __signed_exp = FIELD_GET(GENMASK(4, 0), (x)); \
\ if (__signed_exp & BIT(4)) \
__signed_exp |= GENMASK(31, 5); \
__signed_exp; \
}) #define SCMI_MAX_PREALLOC_POOL 16 unsignedint prealloc_pool[SCMI_MAX_PREALLOC_POOL];
};
/** * struct scmi_sensor_info - represents information related to one of the * available sensors. * @id: Sensor ID. * @type: Sensor type. Chosen amongst one of @enum scmi_sensor_class. * @scale: Power-of-10 multiplier applied to the sensor unit. * @num_trip_points: Number of maximum configurable trip points. * @async: Flag for asynchronous read support. * @update: Flag for continuouos update notification support. * @timestamped: Flag for timestamped read support. * @tstamp_scale: Power-of-10 multiplier applied to the sensor timestamps to * represent it in seconds. * @num_axis: Number of supported axis if any. Reported as 0 for scalar sensors. * @axis: Pointer to an array of @num_axis descriptors. * @intervals: Descriptor of available update intervals. * @sensor_config: A bitmask reporting the current sensor configuration as * detailed in the SCMI specification: it can accessed and * modified through the accompanying macros. * @name: NULL-terminated string representing sensor name as advertised by * SCMI platform. * @extended_scalar_attrs: Flag to indicate the presence of additional extended * attributes for this sensor. * @sensor_power: Extended attribute representing the average power * consumed by the sensor in microwatts (uW) when it is active. * Reported here only for scalar sensors. * Set to 0 if not reported by this sensor. * @resolution: Extended attribute representing the resolution of the sensor. * Reported here only for scalar sensors. * Set to 0 if not reported by this sensor. * @exponent: Extended attribute representing the power-of-10 multiplier that is * applied to the resolution field. * Reported here only for scalar sensors. * Set to 0 if not reported by this sensor. * @scalar_attrs: Extended attributes representing minimum and maximum * measurable values by this sensor. * Reported here only for scalar sensors. * Set to 0 if not reported by this sensor.
*/ struct scmi_sensor_info { unsignedint id; unsignedint type; int scale; unsignedint num_trip_points; bool async; bool update; bool timestamped; int tstamp_scale; unsignedint num_axis; struct scmi_sensor_axis_info *axis; struct scmi_sensor_intervals_info intervals; unsignedint sensor_config; #define SCMI_SENS_CFG_UPDATE_SECS_MASK GENMASK(31, 16) #define SCMI_SENS_CFG_GET_UPDATE_SECS(x) \
FIELD_GET(SCMI_SENS_CFG_UPDATE_SECS_MASK, (x))
/** * struct scmi_sensor_proto_ops - represents the various operations provided * by SCMI Sensor Protocol * * @count_get: get the count of sensors provided by SCMI * @info_get: get the information of the specified sensor * @trip_point_config: selects and configures a trip-point of interest * @reading_get: gets the current value of the sensor * @reading_get_timestamped: gets the current value and timestamp, when * available, of the sensor. (as of v3.0 spec) * Supports multi-axis sensors for sensors which * supports it and if the @reading array size of * @count entry equals the sensor num_axis * @config_get: Get sensor current configuration * @config_set: Set sensor current configuration
*/ struct scmi_sensor_proto_ops { int (*count_get)(conststruct scmi_protocol_handle *ph); conststruct scmi_sensor_info __must_check *(*info_get)
(conststruct scmi_protocol_handle *ph, u32 sensor_id); int (*trip_point_config)(conststruct scmi_protocol_handle *ph,
u32 sensor_id, u8 trip_id, u64 trip_value); int (*reading_get)(conststruct scmi_protocol_handle *ph, u32 sensor_id,
u64 *value); int (*reading_get_timestamped)(conststruct scmi_protocol_handle *ph,
u32 sensor_id, u8 count, struct scmi_sensor_reading *readings); int (*config_get)(conststruct scmi_protocol_handle *ph,
u32 sensor_id, u32 *sensor_config); int (*config_set)(conststruct scmi_protocol_handle *ph,
u32 sensor_id, u32 sensor_config);
};
/** * struct scmi_reset_proto_ops - represents the various operations provided * by SCMI Reset Protocol * * @num_domains_get: get the count of reset domains provided by SCMI * @name_get: gets the name of a reset domain * @latency_get: gets the reset latency for the specified reset domain * @reset: resets the specified reset domain * @assert: explicitly assert reset signal of the specified reset domain * @deassert: explicitly deassert reset signal of the specified reset domain
*/ struct scmi_reset_proto_ops { int (*num_domains_get)(conststruct scmi_protocol_handle *ph); constchar *(*name_get)(conststruct scmi_protocol_handle *ph,
u32 domain); int (*latency_get)(conststruct scmi_protocol_handle *ph, u32 domain); int (*reset)(conststruct scmi_protocol_handle *ph, u32 domain); int (*assert)(conststruct scmi_protocol_handle *ph, u32 domain); int (*deassert)(conststruct scmi_protocol_handle *ph, u32 domain);
};
/** * struct scmi_voltage_info - describe one available SCMI Voltage Domain * * @id: the domain ID as advertised by the platform * @segmented: defines the layout of the entries of array @levels_uv. * - when True the entries are to be interpreted as triplets, * each defining a segment representing a range of equally * space voltages: <lowest_volts>, <highest_volt>, <step_uV> * - when False the entries simply represent a single discrete * supported voltage level * @negative_volts_allowed: True if any of the entries of @levels_uv represent * a negative voltage. * @async_level_set: True when the voltage domain supports asynchronous level * set commands. * @name: name assigned to the Voltage Domain by platform * @num_levels: number of total entries in @levels_uv. * @levels_uv: array of entries describing the available voltage levels for * this domain.
*/ struct scmi_voltage_info { unsignedint id; bool segmented; bool negative_volts_allowed; bool async_level_set; char name[SCMI_MAX_STR_SIZE]; unsignedint num_levels; #define SCMI_VOLTAGE_SEGMENT_LOW 0 #define SCMI_VOLTAGE_SEGMENT_HIGH 1 #define SCMI_VOLTAGE_SEGMENT_STEP 2 int *levels_uv;
};
/** * struct scmi_voltage_proto_ops - represents the various operations provided * by SCMI Voltage Protocol * * @num_domains_get: get the count of voltage domains provided by SCMI * @info_get: get the information of the specified domain * @config_set: set the config for the specified domain * @config_get: get the config of the specified domain * @level_set: set the voltage level for the specified domain * @level_get: get the voltage level of the specified domain
*/ struct scmi_voltage_proto_ops { int (*num_domains_get)(conststruct scmi_protocol_handle *ph); conststruct scmi_voltage_info __must_check *(*info_get)
(conststruct scmi_protocol_handle *ph, u32 domain_id); int (*config_set)(conststruct scmi_protocol_handle *ph, u32 domain_id,
u32 config); #define SCMI_VOLTAGE_ARCH_STATE_OFF 0x0 #define SCMI_VOLTAGE_ARCH_STATE_ON 0x7 int (*config_get)(conststruct scmi_protocol_handle *ph, u32 domain_id,
u32 *config); int (*level_set)(conststruct scmi_protocol_handle *ph, u32 domain_id, enum scmi_voltage_level_mode mode, s32 volt_uV); int (*level_get)(conststruct scmi_protocol_handle *ph, u32 domain_id,
s32 *volt_uV);
};
/** * struct scmi_powercap_info - Describe one available Powercap domain * * @id: Domain ID as advertised by the platform. * @notify_powercap_cap_change: CAP change notification support. * @notify_powercap_measurement_change: MEASUREMENTS change notifications * support. * @async_powercap_cap_set: Asynchronous CAP set support. * @powercap_cap_config: CAP configuration support. * @powercap_monitoring: Monitoring (measurements) support. * @powercap_pai_config: PAI configuration support. * @powercap_scale_mw: Domain reports power data in milliwatt units. * @powercap_scale_uw: Domain reports power data in microwatt units. * Note that, when both @powercap_scale_mw and * @powercap_scale_uw are set to false, the domain * reports power data on an abstract linear scale. * @name: name assigned to the Powercap Domain by platform. * @min_pai: Minimum configurable PAI. * @max_pai: Maximum configurable PAI. * @pai_step: Step size between two consecutive PAI values. * @min_power_cap: Minimum configurable CAP. * @max_power_cap: Maximum configurable CAP. * @power_cap_step: Step size between two consecutive CAP values. * @sustainable_power: Maximum sustainable power consumption for this domain * under normal conditions. * @accuracy: The accuracy with which the power is measured and reported in * integral multiples of 0.001 percent. * @parent_id: Identifier of the containing parent power capping domain, or the * value 0xFFFFFFFF if this powercap domain is a root domain not * contained in any other domain.
*/ struct scmi_powercap_info { unsignedint id; bool notify_powercap_cap_change; bool notify_powercap_measurement_change; bool async_powercap_cap_set; bool powercap_cap_config; bool powercap_monitoring; bool powercap_pai_config; bool powercap_scale_mw; bool powercap_scale_uw; bool fastchannels; char name[SCMI_MAX_STR_SIZE]; unsignedint min_pai; unsignedint max_pai; unsignedint pai_step; unsignedint min_power_cap; unsignedint max_power_cap; unsignedint power_cap_step; unsignedint sustainable_power; unsignedint accuracy; #define SCMI_POWERCAP_ROOT_ZONE_ID 0xFFFFFFFFUL unsignedint parent_id; struct scmi_fc_info *fc_info;
};
/** * struct scmi_powercap_proto_ops - represents the various operations provided * by SCMI Powercap Protocol * * @num_domains_get: get the count of powercap domains provided by SCMI. * @info_get: get the information for the specified domain. * @cap_get: get the current CAP value for the specified domain. * On SCMI platforms supporting powercap zone disabling, this could * report a zero value for a zone where powercapping is disabled. * @cap_set: set the CAP value for the specified domain to the provided value; * if the domain supports setting the CAP with an asynchronous command * this request will finally trigger an asynchronous transfer, but, if * @ignore_dresp here is set to true, this call will anyway return * immediately without waiting for the related delayed response. * Note that the powercap requested value must NOT be zero, even if * the platform supports disabling a powercap by setting its cap to * zero (since SCMI v3.2): there are dedicated operations that should * be used for that. (@cap_enable_set/get) * @cap_enable_set: enable or disable the powercapping on the specified domain, * if supported by the SCMI platform implementation. * Note that, by the SCMI specification, the platform can * silently ignore our disable request and decide to enforce * anyway some other powercap value requested by another agent * on the system: for this reason @cap_get and @cap_enable_get * will always report the final platform view of the powercaps. * @cap_enable_get: get the current CAP enable status for the specified domain. * @pai_get: get the current PAI value for the specified domain. * @pai_set: set the PAI value for the specified domain to the provided value. * @measurements_get: retrieve the current average power measurements for the * specified domain and the related PAI upon which is * calculated. * @measurements_threshold_set: set the desired low and high power thresholds * to be used when registering for notification * of type POWERCAP_MEASUREMENTS_NOTIFY with this * powercap domain. * Note that this must be called at least once * before registering any callback with the usual * @scmi_notify_ops; moreover, in case this method * is called with measurement notifications already * enabled it will also trigger, transparently, a * proper update of the power thresholds configured * in the SCMI backend server. * @measurements_threshold_get: get the currently configured low and high power * thresholds used when registering callbacks for * notification POWERCAP_MEASUREMENTS_NOTIFY.
*/ struct scmi_powercap_proto_ops { int (*num_domains_get)(conststruct scmi_protocol_handle *ph); conststruct scmi_powercap_info __must_check *(*info_get)
(conststruct scmi_protocol_handle *ph, u32 domain_id); int (*cap_get)(conststruct scmi_protocol_handle *ph, u32 domain_id,
u32 *power_cap); int (*cap_set)(conststruct scmi_protocol_handle *ph, u32 domain_id,
u32 power_cap, bool ignore_dresp); int (*cap_enable_set)(conststruct scmi_protocol_handle *ph,
u32 domain_id, bool enable); int (*cap_enable_get)(conststruct scmi_protocol_handle *ph,
u32 domain_id, bool *enable); int (*pai_get)(conststruct scmi_protocol_handle *ph, u32 domain_id,
u32 *pai); int (*pai_set)(conststruct scmi_protocol_handle *ph, u32 domain_id,
u32 pai); int (*measurements_get)(conststruct scmi_protocol_handle *ph,
u32 domain_id, u32 *average_power, u32 *pai); int (*measurements_threshold_set)(conststruct scmi_protocol_handle *ph,
u32 domain_id, u32 power_thresh_low,
u32 power_thresh_high); int (*measurements_threshold_get)(conststruct scmi_protocol_handle *ph,
u32 domain_id, u32 *power_thresh_low,
u32 *power_thresh_high);
};
/** * struct scmi_pinctrl_proto_ops - represents the various operations provided * by SCMI Pinctrl Protocol * * @count_get: returns count of the registered elements in given type * @name_get: returns name by index of given type * @group_pins_get: returns the set of pins, assigned to the specified group * @function_groups_get: returns the set of groups, assigned to the specified * function * @mux_set: set muxing function for groups of pins * @settings_get_one: returns one configuration parameter for pin or group * specified by config_type * @settings_get_all: returns all configuration parameters for pin or group * @settings_conf: sets the configuration parameter for pin or group * @pin_request: aquire pin before selecting mux setting * @pin_free: frees pin, acquired by request_pin call
*/ struct scmi_pinctrl_proto_ops { int (*count_get)(conststruct scmi_protocol_handle *ph, enum scmi_pinctrl_selector_type type); int (*name_get)(conststruct scmi_protocol_handle *ph, u32 selector, enum scmi_pinctrl_selector_type type, constchar **name); int (*group_pins_get)(conststruct scmi_protocol_handle *ph,
u32 selector, constunsignedint **pins, unsignedint *nr_pins); int (*function_groups_get)(conststruct scmi_protocol_handle *ph,
u32 selector, unsignedint *nr_groups, constunsignedint **groups); int (*mux_set)(conststruct scmi_protocol_handle *ph, u32 selector,
u32 group); int (*settings_get_one)(conststruct scmi_protocol_handle *ph,
u32 selector, enum scmi_pinctrl_selector_type type, enum scmi_pinctrl_conf_type config_type,
u32 *config_value); int (*settings_get_all)(conststruct scmi_protocol_handle *ph,
u32 selector, enum scmi_pinctrl_selector_type type, unsignedint *nr_configs, enum scmi_pinctrl_conf_type *config_types,
u32 *config_values); int (*settings_conf)(conststruct scmi_protocol_handle *ph,
u32 selector, enum scmi_pinctrl_selector_type type, unsignedint nr_configs, enum scmi_pinctrl_conf_type *config_type,
u32 *config_value); int (*pin_request)(conststruct scmi_protocol_handle *ph, u32 pin); int (*pin_free)(conststruct scmi_protocol_handle *ph, u32 pin);
};
/** * struct scmi_notify_ops - represents notifications' operations provided by * SCMI core * @devm_event_notifier_register: Managed registration of a notifier_block for * the requested event * @devm_event_notifier_unregister: Managed unregistration of a notifier_block * for the requested event * @event_notifier_register: Register a notifier_block for the requested event * @event_notifier_unregister: Unregister a notifier_block for the requested * event * * A user can register/unregister its own notifier_block against the wanted * platform instance regarding the desired event identified by the * tuple: (proto_id, evt_id, src_id) using the provided register/unregister * interface where: * * @sdev: The scmi_device to use when calling the devres managed ops devm_ * @handle: The handle identifying the platform instance to use, when not * calling the managed ops devm_ * @proto_id: The protocol ID as in SCMI Specification * @evt_id: The message ID of the desired event as in SCMI Specification * @src_id: A pointer to the desired source ID if different sources are * possible for the protocol (like domain_id, sensor_id...etc) * * @src_id can be provided as NULL if it simply does NOT make sense for * the protocol at hand, OR if the user is explicitly interested in * receiving notifications from ANY existent source associated to the * specified proto_id / evt_id. * * Received notifications are finally delivered to the registered users, * invoking the callback provided with the notifier_block *nb as follows: * * int user_cb(nb, evt_id, report) * * with: * * @nb: The notifier block provided by the user * @evt_id: The message ID of the delivered event * @report: A custom struct describing the specific event delivered
*/ struct scmi_notify_ops { int (*devm_event_notifier_register)(struct scmi_device *sdev,
u8 proto_id, u8 evt_id, const u32 *src_id, struct notifier_block *nb); int (*devm_event_notifier_unregister)(struct scmi_device *sdev, struct notifier_block *nb); int (*event_notifier_register)(conststruct scmi_handle *handle,
u8 proto_id, u8 evt_id, const u32 *src_id, struct notifier_block *nb); int (*event_notifier_unregister)(conststruct scmi_handle *handle,
u8 proto_id, u8 evt_id, const u32 *src_id, struct notifier_block *nb);
};
/** * struct scmi_handle - Handle returned to ARM SCMI clients for usage. * * @dev: pointer to the SCMI device * @version: pointer to the structure containing SCMI version information * @devm_protocol_acquire: devres managed method to get hold of a protocol, * causing its initialization and related resource * accounting * @devm_protocol_get: devres managed method to acquire a protocol and get specific * operations and a dedicated protocol handler * @devm_protocol_put: devres managed method to release a protocol * @is_transport_atomic: method to check if the underlying transport for this * instance handle is configured to support atomic * transactions for commands. * Some users of the SCMI stack in the upper layers could * be interested to know if they can assume SCMI * command transactions associated to this handle will * never sleep and act accordingly. * An optional atomic threshold value could be returned * where configured. * @notify_ops: pointer to set of notifications related operations
*/ struct scmi_handle { struct device *dev; struct scmi_revision_info *version;
/** * module_scmi_driver() - Helper macro for registering a scmi driver * @__scmi_driver: scmi_driver structure * * Helper macro for scmi drivers to set up proper module init / exit * functions. Replaces module_init() and module_exit() and keeps people from * printing pointless things to the kernel log when their driver is loaded.
*/ #define module_scmi_driver(__scmi_driver) \
module_driver(__scmi_driver, scmi_register, scmi_unregister)
/** * module_scmi_protocol() - Helper macro for registering a scmi protocol * @__scmi_protocol: scmi_protocol structure * * Helper macro for scmi drivers to set up proper module init / exit * functions. Replaces module_init() and module_exit() and keeps people from * printing pointless things to the kernel log when their driver is loaded.
*/ #define module_scmi_protocol(__scmi_protocol) \
module_driver(__scmi_protocol, \
scmi_protocol_register, scmi_protocol_unregister)
struct scmi_protocol; int scmi_protocol_register(conststruct scmi_protocol *proto); void scmi_protocol_unregister(conststruct scmi_protocol *proto);
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.