Messages in this thread | | | Date | Mon, 2 Mar 2009 01:55:54 +0100 | From | Daniel Mack <> | Subject | Re: lis3's ACPI dependency |
| |
On Sun, Mar 01, 2009 at 07:28:01PM +0100, Éric Piel wrote: > > are there any plans to free the lis3 driver from its ACPI dependency? > > In fact, this device is I2C/SPI connected which the ACPI layer seems to > > hide from the driver, but to use it on embedded devices, the bus drivers > > must be used directly and the dependeny seems entirely unnecessary > > anyway. > > > > Also I got the feeling that using a globally exported 'adev' symbol all > > over the different layers is not the best practice - I suspect all the > > occasions could be solved with private pointers and/or container_of(). > > Isn't there any cleanup pending? > Hi Daniel, > Actually, the hp_accel.c file is dedicated to the acpi part. The > lis3lv02d.c file is supposed to be bus agnostic. In practice I agree > it's not completely true, but this is mainly because for now there is > only one bus supported (ACPI) and therefore the work for making it > completely bus-independent is not yet worthy. As soon as someone is > interested in writing a I²C/SPI interface it will become much more > apparent what has to be generalized.
Well, it's clear already - there must be no occurance of apci specific structs and calls in lis3lv02d.c and all the calls to the bus type need to go thru a generic interface which is - as you say - bus independent.
> Indeed, as you noticed, the main work left to do is to generalize > acpi_lis3lv02d (adev) to something ACPI independent. I'd say this could > be done simply by changing the signature of the four callback functions > and having device being just a void*. > > If you are willing to write one of the I²C/SPI interfaces, I'll be happy > to support you.
Ok, I'll start and seperate things then but will need you help with testing as I don't have the hardware the driver was written for originally. I do have, in turn, a custom board with this chip connected via SPI.
Is there any patch pending on top of Linus' current git head that I should base my patches on?
Thanks, Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |