Lines Matching refs:heartbeat_data
32 struct heartbeat_trig_data *heartbeat_data = led_cdev->trigger_data; in led_heartbeat_function() local
37 switch (heartbeat_data->phase) { in led_heartbeat_function()
45 heartbeat_data->period = 300 + in led_heartbeat_function()
47 heartbeat_data->period = in led_heartbeat_function()
48 msecs_to_jiffies(heartbeat_data->period); in led_heartbeat_function()
50 heartbeat_data->phase++; in led_heartbeat_function()
54 delay = heartbeat_data->period / 4 - msecs_to_jiffies(70); in led_heartbeat_function()
55 heartbeat_data->phase++; in led_heartbeat_function()
59 heartbeat_data->phase++; in led_heartbeat_function()
63 delay = heartbeat_data->period - heartbeat_data->period / 4 - in led_heartbeat_function()
65 heartbeat_data->phase = 0; in led_heartbeat_function()
70 mod_timer(&heartbeat_data->timer, jiffies + delay); in led_heartbeat_function()
75 struct heartbeat_trig_data *heartbeat_data; in heartbeat_trig_activate() local
77 heartbeat_data = kzalloc(sizeof(*heartbeat_data), GFP_KERNEL); in heartbeat_trig_activate()
78 if (!heartbeat_data) in heartbeat_trig_activate()
81 led_cdev->trigger_data = heartbeat_data; in heartbeat_trig_activate()
82 setup_timer(&heartbeat_data->timer, in heartbeat_trig_activate()
84 heartbeat_data->phase = 0; in heartbeat_trig_activate()
85 led_heartbeat_function(heartbeat_data->timer.data); in heartbeat_trig_activate()
90 struct heartbeat_trig_data *heartbeat_data = led_cdev->trigger_data; in heartbeat_trig_deactivate() local
92 if (heartbeat_data) { in heartbeat_trig_deactivate()
93 del_timer_sync(&heartbeat_data->timer); in heartbeat_trig_deactivate()
94 kfree(heartbeat_data); in heartbeat_trig_deactivate()