Lines Matching refs:heartbeat_data

35 	struct heartbeat_trig_data *heartbeat_data =  in led_heartbeat_function()  local
36 from_timer(heartbeat_data, t, timer); in led_heartbeat_function()
41 led_cdev = heartbeat_data->led_cdev; in led_heartbeat_function()
52 switch (heartbeat_data->phase) { in led_heartbeat_function()
60 heartbeat_data->period = 300 + in led_heartbeat_function()
62 heartbeat_data->period = in led_heartbeat_function()
63 msecs_to_jiffies(heartbeat_data->period); in led_heartbeat_function()
65 heartbeat_data->phase++; in led_heartbeat_function()
66 if (!heartbeat_data->invert) in led_heartbeat_function()
70 delay = heartbeat_data->period / 4 - msecs_to_jiffies(70); in led_heartbeat_function()
71 heartbeat_data->phase++; in led_heartbeat_function()
72 if (heartbeat_data->invert) in led_heartbeat_function()
77 heartbeat_data->phase++; in led_heartbeat_function()
78 if (!heartbeat_data->invert) in led_heartbeat_function()
82 delay = heartbeat_data->period - heartbeat_data->period / 4 - in led_heartbeat_function()
84 heartbeat_data->phase = 0; in led_heartbeat_function()
85 if (heartbeat_data->invert) in led_heartbeat_function()
91 mod_timer(&heartbeat_data->timer, jiffies + delay); in led_heartbeat_function()
97 struct heartbeat_trig_data *heartbeat_data = in led_invert_show() local
100 return sprintf(buf, "%u\n", heartbeat_data->invert); in led_invert_show()
106 struct heartbeat_trig_data *heartbeat_data = in led_invert_store() local
115 heartbeat_data->invert = !!state; in led_invert_store()
130 struct heartbeat_trig_data *heartbeat_data; in heartbeat_trig_activate() local
132 heartbeat_data = kzalloc(sizeof(*heartbeat_data), GFP_KERNEL); in heartbeat_trig_activate()
133 if (!heartbeat_data) in heartbeat_trig_activate()
136 led_set_trigger_data(led_cdev, heartbeat_data); in heartbeat_trig_activate()
137 heartbeat_data->led_cdev = led_cdev; in heartbeat_trig_activate()
139 timer_setup(&heartbeat_data->timer, led_heartbeat_function, 0); in heartbeat_trig_activate()
140 heartbeat_data->phase = 0; in heartbeat_trig_activate()
143 led_heartbeat_function(&heartbeat_data->timer); in heartbeat_trig_activate()
151 struct heartbeat_trig_data *heartbeat_data = in heartbeat_trig_deactivate() local
154 timer_shutdown_sync(&heartbeat_data->timer); in heartbeat_trig_deactivate()
155 kfree(heartbeat_data); in heartbeat_trig_deactivate()