@@ -32,7 +32,14 @@ static struct cros_ec_platform pd_p = {
3232 .cmd_offset = EC_CMD_PASSTHRU_OFFSET (CROS_EC_DEV_PD_INDEX ),
3333};
3434
35- static irqreturn_t ec_irq_handler (int irq , void * data )
35+ /**
36+ * cros_ec_irq_handler() - top half part of the interrupt handler
37+ * @irq: IRQ id
38+ * @data: (ec_dev) Device with events to process.
39+ *
40+ * Return: Wakeup the bottom half
41+ */
42+ static irqreturn_t cros_ec_irq_handler (int irq , void * data )
3643{
3744 struct cros_ec_device * ec_dev = data ;
3845
@@ -51,7 +58,7 @@ static irqreturn_t ec_irq_handler(int irq, void *data)
5158 * Return: true if more events are still pending and this function should be
5259 * called again.
5360 */
54- bool cros_ec_handle_event (struct cros_ec_device * ec_dev )
61+ static bool cros_ec_handle_event (struct cros_ec_device * ec_dev )
5562{
5663 bool wake_event ;
5764 bool ec_has_more_events ;
@@ -73,9 +80,15 @@ bool cros_ec_handle_event(struct cros_ec_device *ec_dev)
7380
7481 return ec_has_more_events ;
7582}
76- EXPORT_SYMBOL (cros_ec_handle_event );
7783
78- static irqreturn_t ec_irq_thread (int irq , void * data )
84+ /**
85+ * cros_ec_irq_thread() - bottom half part of the interrupt handler
86+ * @irq: IRQ id
87+ * @data: (ec_dev) Device with events to process.
88+ *
89+ * Return: Interrupt handled.
90+ */
91+ irqreturn_t cros_ec_irq_thread (int irq , void * data )
7992{
8093 struct cros_ec_device * ec_dev = data ;
8194 bool ec_has_more_events ;
@@ -86,6 +99,7 @@ static irqreturn_t ec_irq_thread(int irq, void *data)
8699
87100 return IRQ_HANDLED ;
88101}
102+ EXPORT_SYMBOL (cros_ec_irq_thread );
89103
90104static int cros_ec_sleep_event (struct cros_ec_device * ec_dev , u8 sleep_event )
91105{
@@ -194,8 +208,8 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
194208
195209 if (ec_dev -> irq > 0 ) {
196210 err = devm_request_threaded_irq (dev , ec_dev -> irq ,
197- ec_irq_handler ,
198- ec_irq_thread ,
211+ cros_ec_irq_handler ,
212+ cros_ec_irq_thread ,
199213 IRQF_TRIGGER_LOW | IRQF_ONESHOT ,
200214 "chromeos-ec" , ec_dev );
201215 if (err ) {
0 commit comments