RE: [Patch V5 2/2] i2c: imx: add low power i2c bus driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 From: Wolfram Sang <mailto:wsa-dev@xxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, November 30, 2016 5:35 AM
> To: Pandy Gao <pandy.gao@xxxxxxx>
> Cc: wsa@xxxxxxxxxxxxx; u.kleine-koenig@xxxxxxxxxxxxxx;
> cmo@xxxxxxxxxxx; robh@xxxxxxxxxx; vz@xxxxxxxxx; linux-
> i2c@xxxxxxxxxxxxxxx; Frank Li <frank.li@xxxxxxx>; Andy Duan
> <fugang.duan@xxxxxxx>
> Subject: Re: [Patch V5 2/2] i2c: imx: add low power i2c bus driver
> 
> 
> > + * 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?

Thanks,  will change it in next version. 
 
> > +MODULE_LICENSE("GPL v2");
> 
> Here is GPL v2 only...

Thanks, will change it in next version.

Best Regards
Gao Pan
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux