linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa-dev@sang-engineering.com>
To: Gao Pan <pandy.gao@nxp.com>
Cc: wsa@the-dreams.de, u.kleine-koenig@pengutronix.de,
	cmo@melexis.com, robh@kernel.org, vz@mleia.com,
	linux-i2c@vger.kernel.org, frank.li@nxp.com, fugang.duan@nxp.com
Subject: Re: [Patch V5 2/2] i2c: imx: add low power i2c bus driver
Date: Tue, 29 Nov 2016 22:35:12 +0100	[thread overview]
Message-ID: <20161129213512.GB15594@katana> (raw)
In-Reply-To: <1479714704-3014-2-git-send-email-pandy.gao@nxp.com>

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]


> + * 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 2
> + * of the License, or (at your option) any later version.

Here you say GPL v2 or later, while at the end you declare GPL V2 only.
This needs to be made consistent.

> +static irqreturn_t lpi2c_imx_isr(int irq, void *dev_id)
> +{
> +	struct lpi2c_imx_struct *lpi2c_imx = dev_id;
> +	unsigned int temp;
> +
> +	lpi2c_imx_intctrl(lpi2c_imx, 0);
> +	temp = readl(lpi2c_imx->base + LPI2C_MSR);
> +
> +	if (temp & MSR_RDF) {
> +		lpi2c_imx_read_rxfifo(lpi2c_imx);
> +		return IRQ_HANDLED;
> +	}
> +
> +	if (temp & MSR_TDF) {
> +		lpi2c_imx_write_txfifo(lpi2c_imx);
> +		return IRQ_HANDLED;
> +	}
> +
> +	complete(&lpi2c_imx->complete);
> +
> +	return IRQ_HANDLED;
> +}

Minor nit: Why can't you have one single exit point (e.g. only one
'return IRQ_HANDLED') here?

> +MODULE_LICENSE("GPL v2");

Here is GPL v2 only...

Rest looks good. Thanks Vladimir for the reviews!

Thanks,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-11-29 21:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21  7:51 [Patch V5 1/2] i2c: imx: add devicetree binding for lpi2c Gao Pan
2016-11-21  7:51 ` [Patch V5 2/2] i2c: imx: add low power i2c bus driver Gao Pan
2016-11-29  8:22   ` Pandy Gao
2016-11-29 21:35   ` Wolfram Sang [this message]
2016-11-30  2:26     ` Pandy Gao
  -- strict thread matches above, loose matches on Subject: below --
2016-11-17  8:17 [Patch V5 1/2] i2c: imx: add devicetree binding for lpi2c Gao Pan
2016-11-17  8:17 ` [Patch V5 2/2] i2c: imx: add low power i2c bus driver Gao Pan
2016-11-17 22:36   ` Vladimir Zapolskiy

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=20161129213512.GB15594@katana \
    --to=wsa-dev@sang-engineering.com \
    --cc=cmo@melexis.com \
    --cc=frank.li@nxp.com \
    --cc=fugang.duan@nxp.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=pandy.gao@nxp.com \
    --cc=robh@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vz@mleia.com \
    --cc=wsa@the-dreams.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).