Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5939419ybi; Wed, 12 Jun 2019 11:03:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPmFh9Bf8vRYh52RnZjDd5QOemxumKnEcQdszQwL0QnKMVAztrCIkKohSiNed9zluslR9/ X-Received: by 2002:a17:902:728b:: with SMTP id d11mr53595281pll.78.1560362627613; Wed, 12 Jun 2019 11:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362627; cv=none; d=google.com; s=arc-20160816; b=zCfJcpP8AaY90RnprwArBgakT7vJgwlF3zmELt6wljb3CnFnBJPzcm3/mqaMOufKWy rLyTI6itXZBKdgDmVVB/IC0o4fwKstf/aRPd36Nsa/U4ydYAuDHQ0qUgNtp5yhNzPSIU OyacHZdTcyX82r+1RbjXsNJ8qrIRbrZVv2vpviI/361d+dTrQwiBaopBlf+kTDIHs9Es mH89sQ0yMhFWlCTnGwW9bQCeieHFpE1/veNj6D2RSVTC+ySRdd0SsGu32iHJ8N1D3WuT WwdLSEhRi+7a58Y0EYN8ldZsuQL/NynI/PF6JA8h4U1K2amdWqDtmERksps09R3xVH/D XniA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=w6yEZrHOYLo+3p9iSZ2w8TKW5Sdr4j5I7ju6ZqEBMcc=; b=DDR4u61Pl5Efv6ahFVJke7g9ypsiAKjy7N5c5ISXKQqd/y3AtI10BYKbN9IUvZGLgu dxCnYKYZkfcZmSd6ELixJWpWHywwNFGb3Fg5mavLkZcW7YCmFHWrUVKZwStxJmOxqMG2 EY2vA0Jxwsv49soEvvEx3Vl+hgyuS+CVqiamJz8o8Cnyhdv3qA0WLoDrAtlmkqLsZP0E NxLIzvmp6sLLbEO0adS6sLe8Ib5IvcBs0dv+DsiSzF/q7UluvYZqlNnT10reYFghk7rZ 1lfwJJ35kD7hL7DmWHpYbG8W2sYSLbMXejOI0pdj8nv1iCBQFhpADSmV8hMKcfT1BhtU 1ZNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y34si329690plb.186.2019.06.12.11.03.32; Wed, 12 Jun 2019 11:03:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408706AbfFLPME (ORCPT + 99 others); Wed, 12 Jun 2019 11:12:04 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:35408 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408635AbfFLPME (ORCPT ); Wed, 12 Jun 2019 11:12:04 -0400 Received: by mail-qk1-f195.google.com with SMTP id l128so10508087qke.2 for ; Wed, 12 Jun 2019 08:12:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w6yEZrHOYLo+3p9iSZ2w8TKW5Sdr4j5I7ju6ZqEBMcc=; b=djyOLQZNJqxyDl2mm8By1aW85Z2bA0RWMBD96dzJS5+6eiaJsHbuEzNlB68fAbkwGK dyy/SCE3ED1KObGPA7c5kGt/8Qkqw/ljfvcdl72WyHclxDuNI7Msxfa88BWhilGFO8Ts UOGUkU8482q4m3qvEAvzH3kakBJ/gCX5EPu5mF2L2Hn/75C9BdTvZDVsLnz856m3Pv/d gMvXKqvhQXX/+5CyBFFmvPxksLtx2RPWX2pH4dHANLAA0oatj4Ip4UDEv1+y6ijdtLvj HgqYSU452KzQVbTJx6iLOMHyIJbzRrMqYcb8cRJYFdZfeAgETAWdia1uto10cS4yJzTC oP7A== X-Gm-Message-State: APjAAAWOs+fRZs1P/9rJQ/WWTXiSE6obnNBkepXuVSbrMYW56jds7zii YxBf9iXDZe9DaNdhoDzbmnJjR3CmRMj0DLDO+AV3DA== X-Received: by 2002:a05:620a:1497:: with SMTP id w23mr67415173qkj.49.1560352323294; Wed, 12 Jun 2019 08:12:03 -0700 (PDT) MIME-Version: 1.0 References: <20190611123101.25264-1-ckeepax@opensource.cirrus.com> <20190611123101.25264-5-ckeepax@opensource.cirrus.com> In-Reply-To: <20190611123101.25264-5-ckeepax@opensource.cirrus.com> From: Benjamin Tissoires Date: Wed, 12 Jun 2019 17:11:51 +0200 Message-ID: Subject: Re: [PATCH v4 4/7] i2c: core: Make i2c_acpi_get_irq available to the rest of the I2C core To: Charles Keepax Cc: Wolfram Sang , mika.westerberg@linux.intel.com, Jarkko Nikula , Andy Shevchenko , Linux I2C , linux-acpi@vger.kernel.org, lkml , Jim Broadus , patches@opensource.cirrus.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 11, 2019 at 2:31 PM Charles Keepax wrote: > > In preparation for more refactoring make i2c_acpi_get_irq available > outside i2c-core-acpi.c. > > Signed-off-by: Charles Keepax > --- So, my bisect fails here: when I recompile the vmlinuz image, it fails after loading the initrd. There is no boot up message, so not sure, but the problem with the non working touchpad is either this one or the next one. Cheers, Benjamin > > Changes since v3: > - Move the change to use the helper function from i2c-core-base into its own patch. > > Thanks, > Charles > > drivers/i2c/i2c-core-acpi.c | 15 +++++++++++++-- > drivers/i2c/i2c-core.h | 7 +++++++ > 2 files changed, 20 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c > index 7d4d66ba752d4..35966cc337dde 100644 > --- a/drivers/i2c/i2c-core-acpi.c > +++ b/drivers/i2c/i2c-core-acpi.c > @@ -144,8 +144,17 @@ static int i2c_acpi_add_resource(struct acpi_resource *ares, void *data) > return 1; /* No need to add resource to the list */ > } > > -static int i2c_acpi_get_irq(struct acpi_device *adev) > +/** > + * i2c_acpi_get_irq - get device IRQ number from ACPI > + * @client: Pointer to the I2C client device > + * > + * Find the IRQ number used by a specific client device. > + * > + * Return: The IRQ number or an error code. > + */ > +int i2c_acpi_get_irq(struct i2c_client *client) > { > + struct acpi_device *adev = ACPI_COMPANION(&client->adapter->dev); > struct list_head resource_list; > int irq = -ENOENT; > int ret; > @@ -162,6 +171,8 @@ static int i2c_acpi_get_irq(struct acpi_device *adev) > return irq; > } > > +static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev); > + > static int i2c_acpi_get_info(struct acpi_device *adev, > struct i2c_board_info *info, > struct i2c_adapter *adapter, > @@ -198,7 +209,7 @@ static int i2c_acpi_get_info(struct acpi_device *adev, > *adapter_handle = lookup.adapter_handle; > > /* Then fill IRQ number if any */ > - ret = i2c_acpi_get_irq(adev); > + ret = i2c_acpi_get_irq(i2c_acpi_find_client_by_adev(adev)); > if (ret > 0) > info->irq = ret; > > diff --git a/drivers/i2c/i2c-core.h b/drivers/i2c/i2c-core.h > index 2a3b28bf826b1..517d98be68d25 100644 > --- a/drivers/i2c/i2c-core.h > +++ b/drivers/i2c/i2c-core.h > @@ -63,6 +63,8 @@ const struct acpi_device_id * > i2c_acpi_match_device(const struct acpi_device_id *matches, > struct i2c_client *client); > void i2c_acpi_register_devices(struct i2c_adapter *adap); > + > +int i2c_acpi_get_irq(struct i2c_client *client); > #else /* CONFIG_ACPI */ > static inline void i2c_acpi_register_devices(struct i2c_adapter *adap) { } > static inline const struct acpi_device_id * > @@ -71,6 +73,11 @@ i2c_acpi_match_device(const struct acpi_device_id *matches, > { > return NULL; > } > + > +static inline int i2c_acpi_get_irq(struct i2c_client *client) > +{ > + return 0; > +} > #endif /* CONFIG_ACPI */ > extern struct notifier_block i2c_acpi_notifier; > > -- > 2.11.0 >