linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Pegatron Lucid tablet accelerometer
@ 2011-01-14 20:14 Andy Ross
  2011-01-14 20:14 ` [PATCH 1/2] input: Pegatron Lucid accelerometer Andy Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Ross @ 2011-01-14 20:14 UTC (permalink / raw)
  To: Dmitry Torokhov, Corentin Chary, linux-input, acpi4asus-user,
	platform-driver-x86

Driver for the ACPI interface to the accelerometer on the Pegatron
Lucid tablets (sold as WeTab and ExoPC).  I put detection into
asus-laptop, as that seems to be the owner of the "\_SB.ATKD." space
in ACPI.  Hopefully that's the right choice.

Andy



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 0/2] Pegatron Lucid tablet accelerometer
@ 2011-01-17 17:56 Andy Ross
  2011-01-17 17:56 ` [PATCH 2/2] asus-laptop: Support pega_accel driver Andy Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Ross @ 2011-01-17 17:56 UTC (permalink / raw)
  To: Dmitry Torokhov, Corentin Chary, linux-input, acpi4asus-user,
	platform-driver-x86

Resend with fixes per comments: Driver for the ACPI interface to the
accelerometer on the Pegatron Lucid tablets (sold as WeTab and ExoPC).

Corentin Chary wrote:
> > +       int z =  acpi_s16("\\_SB.ATKD.XLRZ");
> 
> Using the absolute path (\\_SB.ATKD) may not work on new hardware, you
> should find the path of the device using the HID (AKT0100, or
> something like that). But we may not core in this case since it's pega
> specific.

I could pass the ACPI prefix (or a handle) through the platform driver
if you like, but it's a little more complexity and as you mention that
seems like overkill for a driver whose core is only three lines of
code.  Left unchanged.

Corentin Chary wrote:
> > +static int __devinit platform_probe(struct platform_device *pd)
> 
> You should check if the device exists here, before trying to do
> anything, (using the path or the HID, depending of what you'll do
> about my previous comment)

Detection is done in asus-laptop: this code won't be reached unless
the platform device is created, which is after the three needed
methods have already been detected with acpi_check_handle().

Dmitry Torokhov wrote:
> This is not a critical component; default should be 'n' (or just omit
> default statement).

Fixed.

Dmitry Torokhov wrote:
> Please keep Kconfig and Makefile sorted alphabetically.

Fixed in Makefile.  Kconfig is hopelessly out of order, but I did what
I could.

Dmitry Torokhov wrote:
> What's up with people loving to put filename into comments? It just
> makes renaming files more4 difficult.

No love here; I was trying to adhere to what looked like existing
convention.  Removed.

Dmitry Torokhov wrote:
> No need to initialize to 0, in fact, it is quite often dangerous as it
> masks compiler warnings.

True enough.  Fixed.

> > +	ipdev->input->dev.release = dev_noop_release;
> 
> WTH is this???

It's an attempt to avoid this from drivers/base/core.c:

      WARN(1, KERN_ERR "Device '%s' does not have a release() "
           "function, it is broken and must be fixed.\n",
           dev_name(dev));

...but it was in the wrong place.  The input device doesn't hit that
path, the platform device does.  Moved to where it belongs.

Andy

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-17 18:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 20:14 [PATCH 0/3] Pegatron Lucid tablet accelerometer Andy Ross
2011-01-14 20:14 ` [PATCH 1/2] input: Pegatron Lucid accelerometer Andy Ross
2011-01-14 20:14   ` [PATCH 2/2] asus-laptop: Support pega_accel driver Andy Ross
2011-01-15 16:22   ` [PATCH 1/2] input: Pegatron Lucid accelerometer Corentin Chary
2011-01-15 22:16   ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2011-01-17 17:56 [PATCH 0/2] Pegatron Lucid tablet accelerometer Andy Ross
2011-01-17 17:56 ` [PATCH 2/2] asus-laptop: Support pega_accel driver Andy Ross

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).