All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Wei-Chun Pan <weichun.pan@advantech.com.tw>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	Jean Delvare <jdelvare@suse.de>,
	Guenter Roeck <linux@roeck-us.net>,
	"Louis.Lu" <Louis.Lu@advantech.com.tw>,
	"Neo.Lo" <neo.lo@advantech.com.tw>,
	"Hank.Peng" <Hank.Peng@advantech.com.tw>,
	"Kevin.Ong" <Kevin.Ong@advantech.com.tw>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] mfd: imanager2: Add Advantech EC APIs support for IT8516/18/28
Date: Tue, 22 Jul 2014 09:36:55 +0100	[thread overview]
Message-ID: <20140722083655.GE28529@lee--X1> (raw)
In-Reply-To: <1405342486-17031-2-git-send-email-weichun.pan@advantech.com.tw>

On Mon, 14 Jul 2014, Wei-Chun Pan wrote:

You have to write a commit log here.  What is this?  Why is it needed?
What problem does it solve?  What happens if it's not provided?  How
is it implemented?  Etc etc.

> Signed-off-by: Wei-Chun Pan <weichun.pan@advantech.com.tw>
> ---
>  drivers/mfd/imanager2_ec.c | 615 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 615 insertions(+)
>  create mode 100644 drivers/mfd/imanager2_ec.c
> 
> diff --git a/drivers/mfd/imanager2_ec.c b/drivers/mfd/imanager2_ec.c
> new file mode 100644
> index 0000000..f7a0003
> --- /dev/null
> +++ b/drivers/mfd/imanager2_ec.c
> @@ -0,0 +1,615 @@
> +/*
> + * imanager2_ec.c - MFD accessing driver of Advantech EC IT8516/18/28
> + * Copyright (C) 2014  Richard Vidal-Dorsch <richard.dorsch@advantech.com>
> + *
> + * This program is free software: you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation, either version 3 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.

I'd prefer if you used the short version.

> + */
> +
> +#include <linux/io.h>
> +#include <linux/delay.h>

I'm sure that you're missing a whole bunch of header files here.  You
are to include all files that you make use of in _this_ file.

> +#include <linux/mfd/imanager2_ec.h>

Comment this line out to see what is not defined.  At the very least
you will need export.h and err.h.

[...]

> +static int imanager2_read_mailbox(u32 ecflag, u8 offset, u8 *data)
> +{
> +	if (ecflag & EC_FLAG_IO_MAILBOX) {
> +		int ret = ec_wait_ibc0();
> +		if (ret)
> +			return ret;
> +		inb(EC_IO_PORT_DATA);
> +		outb(offset + EC_IO_CMD_READ_OFFSET, EC_IO_PORT_CMD);
> +
> +		return ec_inb_after_obf1(data);
> +	} else {
> +		outb(offset, EC_ITE_PORT_OFS);
> +		*data = inb(EC_ITE_PORT_DATA);
> +	}
> +
> +	return 0;
> +}

All of the Mailbox controller code in this file should live in
drivers/mailbox.

Also, does your Mailbox controller support IRQs?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2014-07-22  8:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 12:54 [PATCH 1/4] mfd: imanager2: Add defines support for IT8516/18/28 Wei-Chun Pan
2014-07-14 12:54 ` [PATCH 2/4] mfd: imanager2: Add Advantech EC APIs " Wei-Chun Pan
2014-07-22  8:36   ` Lee Jones [this message]
2014-07-14 12:54 ` [PATCH 3/4] mfd: imanager2: Add Core supports " Wei-Chun Pan
2014-07-22  8:56   ` Lee Jones
2014-07-14 12:54 ` [PATCH 4/4] hwmon: (imanager2) Add support " Wei-Chun Pan
2014-07-14 19:05   ` Guenter Roeck
2014-07-22  7:58 ` [PATCH 1/4] mfd: imanager2: Add defines " Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140722083655.GE28529@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=Hank.Peng@advantech.com.tw \
    --cc=Kevin.Ong@advantech.com.tw \
    --cc=Louis.Lu@advantech.com.tw \
    --cc=jdelvare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=neo.lo@advantech.com.tw \
    --cc=sameo@linux.intel.com \
    --cc=weichun.pan@advantech.com.tw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.