Prev: [PATCH/RFC 1/5] [PATCH] sched: merge cpu_to_core_group functions
Next: [PATCH/RFC 5/5] [PATCH] topology: add z196 cpu topology support
From: Stepan Moskovchenko on 12 Aug 2010 13:30 On 8/12/2010 9:49 AM, Neil Leeder wrote: > This driver is for the QCI trackpad used on Quanta smartbooks > > Signed-off-by: Horace Fu<horace.fu(a)quantatw.com> > Signed-off-by: Mandeep Singh Baines<msb(a)chromium.org> > [nleeder(a)codeaurora.org: cleanup i2c calls, address review comments etc] > Signed-off-by: Neil Leeder<nleeder(a)codeaurora.org> > --- > drivers/input/mouse/Kconfig | 12 ++ > drivers/input/mouse/Makefile | 1 + > drivers/input/mouse/qci_touchpad.c | 270 ++++++++++++++++++++++++++++++++++++ > include/linux/input/qci_touchpad.h | 25 ++++ > 4 files changed, 308 insertions(+), 0 deletions(-) > create mode 100644 drivers/input/mouse/qci_touchpad.c > create mode 100644 include/linux/input/qci_touchpad.h > > diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig > index c714ca2..32a88b4 100644 > --- a/drivers/input/mouse/Kconfig > +++ b/drivers/input/mouse/Kconfig > @@ -303,6 +303,18 @@ config MOUSE_MAPLE > To compile this driver as a module choose M here: the module will be > called maplemouse. > > +config MOUSE_QCITP > + tristate "Quanta Computer Inc. Touchpad" > + depends on I2C > + help > + This driver supports the touchpad on Quanta smartbook devices. > + > + Say Y here if you have a Quanta-based smartboot or notepad Sorry, very minor point - do you mean "smartbook" here? A lot of machines are made by Quanta. Should this be given a description / option name that is more specific, ie, "Quanta [chip name] Touchpad" or even "Quanta I2C Touchpad" ? What you have might be fine, however... Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Neil Leeder on 12 Aug 2010 14:00 On 8/12/2010 1:25 PM, Stepan Moskovchenko wrote: > On 8/12/2010 9:49 AM, Neil Leeder wrote: >> +config MOUSE_QCITP >> + tristate "Quanta Computer Inc. Touchpad" >> + depends on I2C >> + help >> + This driver supports the touchpad on Quanta smartbook devices. >> + >> + Say Y here if you have a Quanta-based smartboot or notepad > Sorry, very minor point - do you mean "smartbook" here? > > A lot of machines are made by Quanta. Should this be given a description > / option name that is more specific, ie, "Quanta [chip name] Touchpad" > or even "Quanta I2C Touchpad" ? What you have might be fine, however... > Good catch on the typo. I can update the Kconfig item to include I2C as you suggested. -- Neil -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Trilok Soni on 13 Aug 2010 05:40 Hi Shubhrajyoti, >> + >> +gpio_request_fail: >> + input_unregister_device(context->qcitp_dev); >> + context->qcitp_dev = NULL; >> + >> +register_fail: >> + input_free_device(context->qcitp_dev); > You may like to revisit the use of free after unregister. > That looks OK, because qcitp_dev is set to NULL before this call. ---Trilok Soni -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Neil Leeder on 13 Aug 2010 18:00 On 8/12/2010 10:49 PM, Dmitry Torokhov wrote: > On Thu, Aug 12, 2010 at 01:58:18PM -0400, Neil Leeder wrote: > Actually, since this is not a new touchpad but simply a PS/2 interface > it should be implemented as a serio driver, not input device driver. > Dmitri, Thanks for supplying that serio driver. I just have a couple of questions. Even though the interface on the wpce775x EC happens to be a PS/2 interface, this is completely hidden by the firmware on that device. To the linux driver it looks like a dedicated i2c connection directly to the touchpad. You can't substitute any other device on that PS/2 interface without rewriting the firmware in the EC - it's not a generic interface. A manufacturer could even move the touchpad from the PS/2 interface to say GPIOs, re-write the firmware and the linux driver couldn't tell the difference. Does that change the rationale for using a serio driver? If the request to use a serio driver is still valid, then it seems that the workqueue from the interrupt handler sends each byte of data received over i2c in a separate serio_interrupt() call to the touchpad driver. Touchpad data comes in 3-byte packets, so the touchpad driver will have to re-assemble the packet from 3 separate interrupts. Is that the intended use? > Could you please tell me if the following works for you? Note that it > expects IRQ to be set up properly (edge vs. level trigger) by the > platform code The i2c_board_info that supplies the irq # from platform code doesn't have a way to set i2c flags, and can't set_irq_type() until after irq_request(). This may require another platform_data struct to pass the trigger level in. Thanks. -- Neil -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Dmitry Torokhov on 13 Aug 2010 21:00
On Friday, August 13, 2010 02:56:41 pm Neil Leeder wrote: > On 8/12/2010 10:49 PM, Dmitry Torokhov wrote: > > On Thu, Aug 12, 2010 at 01:58:18PM -0400, Neil Leeder wrote: > > Actually, since this is not a new touchpad but simply a PS/2 interface > > it should be implemented as a serio driver, not input device driver. > > Dmitri, > > Thanks for supplying that serio driver. I just have a couple of questions. > > Even though the interface on the wpce775x EC happens to be a PS/2 > interface, this is completely hidden by the firmware on that device. To > the linux driver it looks like a dedicated i2c connection directly to > the touchpad. You can't substitute any other device on that PS/2 > interface without rewriting the firmware in the EC - it's not a generic > interface. A manufacturer could even move the touchpad from the PS/2 > interface to say GPIOs, re-write the firmware and the linux driver > couldn't tell the difference. Hmm, according to the following diagram from Nuvoton trhe chip does in fact has a distinct PS/2 interface (3 of them actually): http://www.nuvoton.com/NuvotonMOSS/Community/ProductInfo.aspx?tp_GUID=d2a1e761-c93d-4bf0-b292-acb80b38cfaf Also it is not a simple coincidence that to enable device you send 0xf4 to it (which is PSMOUSE_CMD_ENABLE - standard PS/2 command). This tends to suggest that interface is not actually hidden and that the device (touchpad) could be replaced with other kinds of devices. Anyway, please try the driver (you may need to hardcode the IRQ trigger type for now) and see if psmouse is able to talk to the touchpad. If it is then serio is the proper solution. > Does that change the rationale for using a > serio driver? > > If the request to use a serio driver is still valid, then it seems that > the workqueue from the interrupt handler sends each byte of data > received over i2c in a separate serio_interrupt() call to the touchpad > driver. Touchpad data comes in 3-byte packets, so the touchpad driver > will have to re-assemble the packet from 3 separate interrupts. Is that > the intended use? Yes, serio ports are byte-oriented devices. psmouse and atkbd drivers should be able to work with such data. Thanks. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |