lkml.org 
[lkml]   [2012]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] i2c / ACPI: add ACPI enumeration support
On Fri, Nov 16, 2012 at 09:02:36PM +0100, Rafael J. Wysocki wrote:
> Ah, that's what's called by acpi_dev_get_resources(). But what about writing
> it this way:
>
> static int acpi_i2c_find_child_address(struct acpi_resource *ares, void *data)
> {
>
> if (ares->type == ACPI_RESOURCE_TYPE_SERIAL_BUS) {
> struct acpi_resource_i2c_serialbus *sb;
>
> sb = &ares->data.i2c_serial_bus;
> if (sb->type == ACPI_RESOURCE_SERIAL_TYPE_I2C) {
> struct acpi_i2c_find *i2c_find = data;
>
> if (sb->slave_address == i2c_find->addr)
> i2c_find->found = true;
> }
> }
>
> /* Tell the ACPI core to skip this resource. */
> return 1;
> }

Not a problem at all, I'll do it like above and also with the SPI case.
I'll wait til tomorrow for more comments and post v3 unless there are
objections.


\
 
 \ /
  Last update: 2012-11-16 21:41    [W:0.110 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site