Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\clockevents.c Create Date:2022-07-28 10:49:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__clockevents_switch_state

Proto:static int __clockevents_switch_state(struct clock_event_device *dev, enum clock_event_state state)

Type:int

Parameter:

TypeParameterName
struct clock_event_device *dev
enum clock_event_statestate
94  If features & CLOCK_EVT_FEAT_DUMMY Then Return 0
99  Case state == CLOCK_EVT_STATE_DETACHED
102  Case state == CLOCK_EVT_STATE_SHUTDOWN
103  If set_state_shutdown Then Return set_state_shutdown(dev)
105  Return 0
107  Case state == CLOCK_EVT_STATE_PERIODIC
109  If Not (features & CLOCK_EVT_FEAT_PERIODIC) Then Return -ENOSYS
111  If set_state_periodic Then Return set_state_periodic(dev)
113  Return 0
115  Case state == CLOCK_EVT_STATE_ONESHOT
117  If Not (features & CLOCK_EVT_FEAT_ONESHOT) Then Return -ENOSYS
119  If set_state_oneshot Then Return set_state_oneshot(dev)
121  Return 0
123  Case state == CLOCK_EVT_STATE_ONESHOT_STOPPED
125  If WARN_ONCE(!clockevent_state_oneshot(dev), "Current state: %d\n", clockevent_get_state(dev)) Then Return -EINVAL
130  If set_state_oneshot_stopped Then Return set_state_oneshot_stopped(dev)
132  Else Return -ENOSYS
135  Default
136  Return -ENOSYS
Caller
NameDescribe
clockevents_switch_statelockevents_switch_state - set the operating state of a clock event device*@dev: device to modify*@state: new state* Must be called with interrupts disabled !
__clockevents_update_freq