John Linn | 30 Jun 17:34

[PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver

Added a new driver for Xilinx XPS PS2 IP. This driver is
a flat driver to better match the Linux driver pattern.

Signed-off-by: Sadanand <sadanan <at> xilinx.com>
Signed-off-by: John Linn <john.linn <at> xilinx.com>
---

V2

Changes from v1:

Ran the scripts/checkpatch.pl on the patch as I should have done
before sending it (thanks to Stephen).

 drivers/input/serio/Kconfig      |    5 +
 drivers/input/serio/Makefile     |    1 +
 drivers/input/serio/xilinx_ps2.c |  460 ++++++++++++++++++++++++++++++++++++++
 drivers/input/serio/xilinx_ps2.h |   97 ++++++++
 4 files changed, 563 insertions(+), 0 deletions(-)
 create mode 100644 drivers/input/serio/xilinx_ps2.c
 create mode 100644 drivers/input/serio/xilinx_ps2.h

diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
index ec4b661..0e62b39 100644
--- a/drivers/input/serio/Kconfig
+++ b/drivers/input/serio/Kconfig
@@ -190,4 +190,9 @@ config SERIO_RAW
 	  To compile this driver as a module, choose M here: the
 	  module will be called serio_raw.

(Continue reading)

Peter Korsgaard | 30 Jun 19:55

Re: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver

>>>>> "John" == John Linn <john.linn <at> xilinx.com> writes:

 John> Added a new driver for Xilinx XPS PS2 IP. This driver is
 John> a flat driver to better match the Linux driver pattern.

 John> Signed-off-by: Sadanand <sadanan <at> xilinx.com>
 John> Signed-off-by: John Linn <john.linn <at> xilinx.com>
 John> ---

 John> V2

 John> Changes from v1:

 John> Ran the scripts/checkpatch.pl on the patch as I should have done
 John> before sending it (thanks to Stephen).

What about my comments?

--

-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

John Linn | 30 Jun 19:59

RE: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver

Ahh... sorry about that Peter, didn't ignore your comments on purpose. 

Just got on a tangent about sending it to the other mailing list and
forgot to look on down.

I'll review them.

-- John

-----Original Message-----
From: Peter Korsgaard [mailto:jacmet <at> gmail.com] On Behalf Of Peter
Korsgaard
Sent: Monday, June 30, 2008 11:56 AM
To: John Linn
Cc: linuxppc-dev <at> ozlabs.org; linux-input <at> vger.kernel.org; Sadanand
Mutyala
Subject: Re: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver

>>>>> "John" == John Linn <john.linn <at> xilinx.com> writes:

 John> Added a new driver for Xilinx XPS PS2 IP. This driver is
 John> a flat driver to better match the Linux driver pattern.

 John> Signed-off-by: Sadanand <sadanan <at> xilinx.com>
 John> Signed-off-by: John Linn <john.linn <at> xilinx.com>
 John> ---

 John> V2

 John> Changes from v1:
(Continue reading)

Dmitry Torokhov | 30 Jun 20:21

Re: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver

On Mon, Jun 30, 2008 at 08:38:21AM -0700, John Linn wrote:
> +	spin_lock_init(&drvdata->lock);
> +	dev_set_drvdata(dev, (void *)drvdata);

No need to cast to void *.

> +
> +	if (!regs_res || !irq_res) {
> +		dev_err(dev, "IO resource(s) not found\n");
> +		retval = -EFAULT;
> +		goto failed1;
> +	}
> +
> +	drvdata->irq = irq_res->start;
> +	remap_size = regs_res->end - regs_res->start + 1;
> +	if (!request_mem_region(regs_res->start, remap_size, DRIVER_NAME)) {
> +
> +		dev_err(dev, "Couldn't lock memory region at 0x%08X\n",
> +			(unsigned int)regs_res->start);
> +		retval = -EBUSY;
> +		goto failed1;
> +	}
> +
> +	/* Fill in configuration data and add them to the list */
> +	drvdata->phys_addr = regs_res->start;
> +	drvdata->remap_size = remap_size;
> +	drvdata->base_address = ioremap(regs_res->start, remap_size);
> +	if (drvdata->base_address == NULL) {
> +
> +		dev_err(dev, "Couldn't ioremap memory at 0x%08X\n",
(Continue reading)

John Linn | 30 Jun 23:28

RE: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver

Thanks Dmitry, see my comments inline.

-- John

>On Mon, Jun 30, 2008 at 08:38:21AM -0700, John Linn wrote:
>> +	spin_lock_init(&drvdata->lock);
>> +	dev_set_drvdata(dev, (void *)drvdata);
>
>No need to cast to void *.

OK.

>
>> +
>> +	if (!regs_res || !irq_res) {
>> +		dev_err(dev, "IO resource(s) not found\n");
>> +		retval = -EFAULT;
>> +		goto failed1;
>> +	}
>> +
>> +	drvdata->irq = irq_res->start;
>> +	remap_size = regs_res->end - regs_res->start + 1;
>> +	if (!request_mem_region(regs_res->start, remap_size,
DRIVER_NAME)) {
>> +
>> +		dev_err(dev, "Couldn't lock memory region at 0x%08X\n",
>> +			(unsigned int)regs_res->start);
>> +		retval = -EBUSY;
>> +		goto failed1;
>> +	}
(Continue reading)


Gmane