public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RFC: pca953 new platform specific changes
@ 2012-06-21  2:43 Darren Hart
  2012-07-05 13:18 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Darren Hart @ 2012-06-21  2:43 UTC (permalink / raw)
  To: LKML, Eric Miao, Grant Likely, Linus Walleij, Rob Herring

I'm working on support for a device which combines a pair of PCA9555
gpio chips with an LIS331DLH accelerometer on an I2C bus.

I'm awaiting some documentation to confirm, but as I understand it the
accelerometer connects one of its interrupt lines to one of the pins on
the first PCA9555, which is then connected to SMB ALERT, which if I
understand is somehow tied to an ACPI GPE (0x0B)).

I have a hacked together set of patches to support this device which do
some horrible things to the pca953x driver. I'm trying to clean these up
and handle the platform changes properly in order to get them
upstreamed. I'd like to let you know what I'm attempting up front in
case you have any preference regarding the implementation as I'm new to
the GPIO subsystem and driver writing.

Key:
o Platform specific properties
  [ ] My approach to support them

For this platform:
o Only IO 0,1,3,4,6, and 15 can be written to on the first PCA555 (0x20)
  [ ] Add output bitbmask to platform data
  [ ] Don't allow the output_direction function to vary from this if
      provided
o All pins have a specified function
  [ ] Add Pin names to platform data
o Pin assignments vary slightly based on board revision, read from 2nd
  PCA555
  [ ] ? Provide a function to perform the test to the platform data ?
o The accelerometer needs to have its interrupt line set to open-drain
  The current hack does this in a new pca53x detect function
  [ ] ? Move this to a platform data function for the accelerometer ?
o This device needs a GPE handler rather than a traditional irq thread
  [ ] Provide GPE or IRQ data in the platform data, choose which to
      setup based on that (rather large blocks of ifdefs per platform
      in the driver).
o Only the fist PCA555 has accessory input lines on this device, so the
  second should not get an interrupt handler setup.
  [ ] Setup different platform data based on I2C device address with
      appropriate GPE/IRQ data in the platform data setup

Does this approach seem appropriate?

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


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

end of thread, other threads:[~2012-07-05 13:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-21  2:43 RFC: pca953 new platform specific changes Darren Hart
2012-07-05 13:18 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox