Re: [PATCH v2,3/3] driver: rpmon: add rpmon_qmi driver

From: Randy Dunlap
Date: Mon Apr 13 2020 - 13:18:05 EST


Hi--

On 4/12/20 4:24 AM, Wang Wenhu wrote:
> Implements a kind of communication routine for RPMON to communicate
> with remote processors through QMI infrastructure. RPMON_QMI itself
> is designed as a modular framework that would introduce different
> kind of message sets binding to different services.
>
> RPMON_QMI creates a device of rpmon_device type for each remote
> processor endpoint. All the endpoint devices share an unique set
> of QMI suite.
>
> Signed-off-by: Wang Wenhu <wenhu.wang@xxxxxxxx>
> ---
> Changes since v1:
> - Addressed review comments from Randy
>
> ---
> drivers/rpmon/Kconfig | 15 ++
> drivers/rpmon/Makefile | 1 +
> drivers/rpmon/rpmon_qmi.c | 431 ++++++++++++++++++++++++++++++++++++++
> 3 files changed, 447 insertions(+)
> create mode 100644 drivers/rpmon/rpmon_qmi.c
>

> diff --git a/drivers/rpmon/rpmon_qmi.c b/drivers/rpmon/rpmon_qmi.c
> new file mode 100644
> index 000000000000..fe3b48c23cb9
> --- /dev/null
> +++ b/drivers/rpmon/rpmon_qmi.c
> @@ -0,0 +1,431 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (C) 2020 Vivo Communication Technology Co. Ltd.
> + * Copyright (C) 2020 Wang Wenhu <wenhu.wang@xxxxxxxx>
> + * All rights reserved.
> + *
> + * RPMON: An implementation of remote processor monitor framework
> + * for modern SoCs that typically have heterogeneous remote processor
> + * devices in asymmetric multiprocessing configurations. It is
> + * implemented with chardev and sysfs class, which act as interfaces
> + * to communicate with user level. It supports different communication
> + * interfaces added modularly to communicate with remote processors.
> + *
> + * RPMON_QMI: Implements a kind of communication routine for RPMON
> + * to communicate with remote processors through QMI infrastructure.
> + * At least one set of RPMON_QMI_MSG should be available and RPMON_QMI
> + * initiates with the message set(s) to provide certain servicei(s)

service(s)

> + * like stability checking of remote processors. Currently a set of
> + * messages, implemented by RPMON_QMI_MSG_V1 is available.
> + */
> +




> +
> +static int rpmon_qmi_drv_remove(struct platform_device *pdev)
> +{
> + struct rpmon_qmi_device *rdev = platform_get_drvdata(pdev);
> +
> + rpmon_unregister_device(rdev->info);
> +
> + return 0;
> +}

Missing blank line between functions here.

> +static void rpmon_qmi_msg_callback(enum rpmon_qmi_msg_type type,
> + struct sockaddr_qrtr *sq,
> + const void *msg)
> +{


The rest of the changes to patch 3/3 look good.

Thanks.

--
~Randy