[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABb+yY2z4jDWJdDY2WRw5Mhv+ArTuvLgqJ9RyVoUJj3O1d=o6A@mail.gmail.com>
Date: Fri, 5 Jan 2018 09:58:57 +0530
From: Jassi Brar <jassisinghbrar@...il.com>
To: Kaihua Zhong <zhongkaihua@...wei.com>
Cc: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Wei Xu <xuwei5@...ilicon.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Devicetree List <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm-kernel@...ts.infradead.org,
Guodong Xu <guodong.xu@...aro.org>,
Haojian Zhuang <haojian.zhuang@...aro.org>,
suzhuangluan@...ilicon.com, xuezhiliang@...ilicon.com,
kevin.wangtao@...ilicon.com
Subject: Re: [PATCH v4 2/3] mailbox: Add support for Hi3660 mailbox
On Tue, Dec 19, 2017 at 4:45 PM, Kaihua Zhong <zhongkaihua@...wei.com> wrote:
.....
> diff --git a/drivers/mailbox/hi3660-mailbox.c b/drivers/mailbox/hi3660-mailbox.c
> new file mode 100644
> index 0000000..3ceca40
> --- /dev/null
> +++ b/drivers/mailbox/hi3660-mailbox.c
> @@ -0,0 +1,319 @@
> +// SPDX-License-Identifier: GPL-2.0
> +// Copyright (c) 2017 Hisilicon Limited.
> +// Copyright (c) 2017 Linaro Limited.
A blank here please.
> +#include <linux/bitops.h>
> +#include <linux/delay.h>
> +#include <linux/device.h>
> +#include <linux/err.h>
> +#include <linux/interrupt.h>
> +#include <linux/io.h>
> +#include <linux/iopoll.h>
.....
> +
> +static inline struct hi3660_mbox *to_hi3660_mbox(struct mbox_controller *mbox)
>
inline in .c is out of fasion these days
> +{
> + return container_of(mbox, struct hi3660_mbox, controller);
> +}
> +
....
> +
> +static int hi3660_mbox_startup(struct mbox_chan *chan)
> +{
> + int ret;
> +
> + ret = hi3660_mbox_check_state(chan);
> + if (ret)
> + return ret;
> +
> + ret = hi3660_mbox_unlock(chan);
> + if (ret)
> + return ret;
> +
> + ret = hi3660_mbox_acquire_channel(chan);
> + if (ret)
> + return ret;
> +
> + return 0;
> +}
Do you not need to do "release channel" for shutdown() ?
.....
> +
> +static int hi3660_mbox_send_data(struct mbox_chan *chan, void *msg)
> +{
> + return hi3660_mbox_send(chan, msg);
>
Please directly have hi3660_mbox_send as .send_data
Cheers!
Powered by blists - more mailing lists