GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.kernel.org — Power Sequencing API — The Linux Kernel documentation Power Sequencing API¶
Introduction¶This framework is designed to abstract complex power-up sequences that are shared between multiple logical devices in the Linux kernel. The intention is to allow consumers to obtain a power sequencing handle exposed by the power sequence provider and delegate the actual requesting and control of the underlying resources as well as to allow the provider to mitigate any potential conflicts between multiple users behind the scenes. Glossary¶The power sequencing API uses a number of terms specific to the subsystem: Unit
Target
Descriptor
Consumer interface¶The consumer API is aimed to be as simple as possible. The driver interested in
getting a descriptor from the power sequencer should call Provider interface¶The provider API is admittedly not nearly as straightforward as the one for consumers but it makes up for it in flexibility. Each provider can logically split the power-up sequence into discrete chunks (units) and define their dependencies. They can then expose named targets that consumers may use as the final point in the sequence that they wish to reach. To that end the providers fill out a set of configuration structures and
register with the pwrseq subsystem by calling Dynamic consumer matching¶The main difference between pwrseq and other Linux kernel providers is the
mechanism for dynamic matching of consumers and providers. Every power sequence
provider driver must implement the When a client requests a sequencer handle, the core will call this callback for every registered provider and let it flexibly figure out whether the proposed client device is indeed its consumer. For example: if the provider binds to the device-tree node representing a power management unit of a chipset and the consumer driver controls one of its modules, the provider driver may parse the relevant regulator supply properties in device tree and see if they lead from the PMU to the consumer. API reference¶
Definition: struct pwrseq_unit_data {
const char *name;
const struct pwrseq_unit_data **deps;
pwrseq_power_state_func enable;
pwrseq_power_state_func disable;
};
Members
Definition: struct pwrseq_target_data {
const char *name;
const struct pwrseq_unit_data *unit;
pwrseq_power_state_func post_enable;
pwrseq_is_controllable_func is_controllable;
};
Members
Definition: struct pwrseq_config {
struct device *parent;
struct module *owner;
void *drvdata;
pwrseq_match_func match;
const struct pwrseq_target_data **targets;
};
Members
Parameters
Description The config structure is only used during the call and can be freed after
the function returns. The config structure must have the parent device
as well as the Return Returns the address of the new pwrseq device or
Parameters
Parameters
Return Returns the address of the new pwrseq device or
Parameters
Return Address of the private driver data.
Parameters
Return New power sequencer descriptor for use by the consumer driver or
Parameters
Parameters
Return New power sequencer descriptor for use by the consumer driver or
Parameters
Description This function tells the power sequencer that the consumer wants to be powered-up. The sequencer may already have powered-up the device in which case the function returns 0. If the power-up sequence is already in progress, the function will block until it’s done and return 0. If this is the first request, the device will be powered up. Return 0 on success, negative error number on failure.
Parameters
Description This undoes the effects of Return 0 on success, negative error number on failure.
Parameters
Description Return the ‘dev’ pointer of the power sequencer device associated with desc. Consumer drivers can use this to query the pwrseq provider’s device tree node, for example to check for the existence of specific properties. Since Return Pointer to the pwrseq
Parameters
Description Some power sequencing targets provide no host-controllable enable for their
function on a given board, for instance when the enable line is not wired up
and is instead hardwired to an always-on level. For such targets a call to
Return True if the target provides a host-controllable power actuator, false otherwise. Also returns false if desc is NULL. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |