Re: [Linaro-acpi] How to pass I2C platform_data under ACPI

2014-04-03 Thread Arnd Bergmann
On Thursday 03 April 2014 13:59:18 Pallala, Ramakrishna wrote: > >> We definitely don't want per-board match entries, that does not scale. > >> The driver should be reasonably generic and get all the necessary data > >> out of well-defined tables. You can have different IDs when there are > >> on

RE: [Linaro-acpi] How to pass I2C platform_data under ACPI

2014-04-03 Thread Pallala, Ramakrishna
>> > > And initialize the platform data in either driver or in separate >> > > module which gets compiled along with driver? >> > >> > Typically it has been done in the same driver but I don't see any >> > problems having a separate module as well. >> > >> > > static const struct acpi_device_id

Re: [Linaro-acpi] How to pass I2C platform_data under ACPI

2014-04-03 Thread mika.westerb...@linux.intel.com
On Thu, Apr 03, 2014 at 03:34:30PM +0200, Arnd Bergmann wrote: > On Thursday 03 April 2014 14:38:33 mika.westerb...@linux.intel.com wrote: > > On Thu, Apr 03, 2014 at 11:25:34AM +, Pallala, Ramakrishna wrote: > > > >> In non ACPI environment I used to initialize the platform_data under > > > >

Re: [Linaro-acpi] How to pass I2C platform_data under ACPI

2014-04-03 Thread Arnd Bergmann
On Thursday 03 April 2014 14:38:33 mika.westerb...@linux.intel.com wrote: > On Thu, Apr 03, 2014 at 11:25:34AM +, Pallala, Ramakrishna wrote: > > >> In non ACPI environment I used to initialize the platform_data under > > >> board or platforms files. Under ACPI how do I do that? > > > > > >If

Re: How to pass I2C platform_data under ACPI

2014-04-03 Thread mika.westerb...@linux.intel.com
On Thu, Apr 03, 2014 at 11:25:34AM +, Pallala, Ramakrishna wrote: > >> In non ACPI environment I used to initialize the platform_data under > >> board or platforms files. Under ACPI how do I do that? > > > >If you can't extract that information from ACPI namespace, then one option > >is to pa

RE: How to pass I2C platform_data under ACPI

2014-04-03 Thread Pallala, Ramakrishna
>> In non ACPI environment I used to initialize the platform_data under >> board or platforms files. Under ACPI how do I do that? > >If you can't extract that information from ACPI namespace, then one option is >to pass platform data along with the device ACPI ID: > >static const struct acpi_devi

Re: How to pass I2C platform_data under ACPI

2014-04-03 Thread mika.westerb...@linux.intel.com
On Thu, Apr 03, 2014 at 08:10:40AM +, Pallala, Ramakrishna wrote: > Hi All, > > I am trying to enable a i2c client driver under ACPI. The device is being > enumerated behind adapter device and I am getting IRQ resource as well. > > The problem I have now is, how do I pass the platform data t

How to pass I2C platform_data under ACPI

2014-04-03 Thread Pallala, Ramakrishna
Hi All, I am trying to enable a i2c client driver under ACPI. The device is being enumerated behind adapter device and I am getting IRQ resource as well. The problem I have now is, how do I pass the platform data to driver? struct i2c_board_info { chartype[I2C_NAME_SIZE];