Re: [PATCH 1/2] platform: cros_ec: Call interrupt bottom half in ISH or RPMSG mode

From: Randy Dunlap
Date: Thu Dec 10 2020 - 18:23:19 EST


Hi--

Please use correct kernel-doc notation. See below:


On 12/10/20 2:58 PM, Gwendal Grignou wrote:
> Call the same bottom half for all EC protocols (threaded code).
>
> Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
> ---
> drivers/platform/chrome/cros_ec.c | 26 ++++++++++++++++-----
> drivers/platform/chrome/cros_ec_ishtp.c | 6 +----
> drivers/platform/chrome/cros_ec_rpmsg.c | 6 +----
> include/linux/platform_data/cros_ec_proto.h | 3 ++-
> 4 files changed, 24 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c
> index 6d6ce86a1408a..4ac33491d0d18 100644
> --- a/drivers/platform/chrome/cros_ec.c
> +++ b/drivers/platform/chrome/cros_ec.c
> @@ -31,7 +31,14 @@ static struct cros_ec_platform pd_p = {
> .cmd_offset = EC_CMD_PASSTHRU_OFFSET(CROS_EC_DEV_PD_INDEX),
> };
>
> -static irqreturn_t ec_irq_handler(int irq, void *data)
> +/**
> + * cros_ec_irq_handler: top half part of the interrupt handler

* cros_ec_irq_handler - top half part of the interrupt handler

> + * @irq: IRQ id
> + * @data: (ec_dev) Device with events to process.
> + *
> + * Return: Wakeup the bottom half
> + */
> +static irqreturn_t cros_ec_irq_handler(int irq, void *data)
> {
> struct cros_ec_device *ec_dev = data;
>

> @@ -72,9 +79,15 @@ bool cros_ec_handle_event(struct cros_ec_device *ec_dev)
>
> return ec_has_more_events;
> }
> -EXPORT_SYMBOL(cros_ec_handle_event);
>
> -static irqreturn_t ec_irq_thread(int irq, void *data)
> +/**
> + * cros_ec_irq_thread: bottom half part of the interrupt handler

* cros_ec_irq_thread - bottom half part of the interrupt handler

> + * @irq: IRQ id
> + * @data: (ec_dev) Device with events to process.
> + *
> + * Return: Interrupt handled.
> + */
> +irqreturn_t cros_ec_irq_thread(int irq, void *data)
> {
> struct cros_ec_device *ec_dev = data;
> bool ec_has_more_events;




thanks.
--
~Randy