Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2743594imj; Mon, 18 Feb 2019 11:20:27 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia3+91EzR+8KO7t6IlYfn/39m408Ffl5/+kbPmAvYf07Q8L2bfYQFeyEPg8oAN5BODSHrDr X-Received: by 2002:a62:d281:: with SMTP id c123mr21298366pfg.210.1550517626919; Mon, 18 Feb 2019 11:20:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550517626; cv=none; d=google.com; s=arc-20160816; b=O95nXiOuYsweuN+1TA8hNtxXh5P4yS4iSDV6r1F5yNnjLlEzD8W7+rSV63ydfz2uNM xGEPy0tJlKjjQWHrkYWWFTBbTzOEMkFL4rhoK4Teu/BIitJzkss6KlGVgIlvyMB8PWHA Dfnaf6lQaUWtXvkh+lC3zs4RLkMw2iRDn35FAgUcyxqlQeuVqEj0+pqqznxuHqJsK4LH lL3LuzsFay5qrX2n4/XX+UP9P5fQos/ha6Jl5JlhUNFqdtJrfaWQN5oV7xvivt/JJgza A+iN5UigrU+sgK5xBriSAode8YkBVrhzcXtkBH1lQMigQ5uMojOLSTaahd4WkTVQB/lc lm6w== 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:dkim-signature; bh=M0Cs1yYhphK+Bp6FriQhJZHT0gh7EecKmgRuXV91t/U=; b=G6DNjjwEGz97Kr7wF5uQaSb6LtR6jWm2cE7RbD/gV531tkjS2Yi6SY0h+IAP1E1PBD DhLsnurg3hyagPvNZfmJC8QE7HGvJk7Rrl0dArsxPUObwrDx5ayoHW6dzo1EnlXTYVrA 2ydXXqN+SmxAIiKrI6pC5deMqy+84pF2FTylP5SOqs/Ch1hUzVm22QZQi5njKairhmcB Aq/9OrBoEu6tCG/26Zej+QQEC/bgF1NPxuxP4YoUrLUZcxhGlQqbjE8yLoUeSao/swUY Zn62IsFZ9MVMIbcmCuiWktVbQLjBkS8OHrGRH0JmhvTGL8rqTH87VJiFdf/wkRhTOHf3 F0Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A5ULmmvC; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u2si6085383pls.34.2019.02.18.11.20.11; Mon, 18 Feb 2019 11:20:26 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A5ULmmvC; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387444AbfBRSZY (ORCPT + 99 others); Mon, 18 Feb 2019 13:25:24 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:32960 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731147AbfBRSZX (ORCPT ); Mon, 18 Feb 2019 13:25:23 -0500 Received: by mail-qt1-f193.google.com with SMTP id z39so20310471qtz.0; Mon, 18 Feb 2019 10:25:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M0Cs1yYhphK+Bp6FriQhJZHT0gh7EecKmgRuXV91t/U=; b=A5ULmmvCXx+cxjZM85lIjf6KJPJ9AUdcGJ8LjAZyv8JSrsfar/myvNrpC1IOLWI0Mn veaD9ZYSquGNc55/LodytGc+AO7ZGCDEM8qKmK9xcq56ZZhix+9YvaMJt37aVoYh5eK1 vlcxrwlAHO0SZw5tZ0qcjnhgypNutq4wuN2vSG1JzM3RLJkeTohCqLsxsqyAj9LD5zDF wf1T9p21jOa4Pz4ZQbwfwb6x9v0+S8WbUX45mT6+QRGHKX2yw3Tlszn7MQaWbqf+vT+Z lrTwExDpfF1J/RxQfCAbGYGLURYeBEZQwHanXZXw3S3k/2nkWnKv5Gj4fHQUvy2jVmUk CEZA== 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=M0Cs1yYhphK+Bp6FriQhJZHT0gh7EecKmgRuXV91t/U=; b=LwbJ4lxkuIMNay93Z/yRNqb0Ptv+Oh4LjU6T1uuHuyWN9QZEVUVmQKg4AeYsB2iHYn 6K4dT4puseukBafuy520Ch1ls/gCiI8ADuplryW+7hdK+eM2UpE0Oew8FG0nWhpvTY4U nm4M1PYRtkomlRFa4OQd6tG+qZqsHzD9ujqZJsUMdRKcH9fsk6dOrOopVkLiFcY9uni9 nOLdRjCIE6z6iuaBz6CgbE2AK6fHsMYvIlBH7aznZ+HlH5sfcfSo269gnkEu6Q4SbvOs gCAMaK0Ko0Moi2qOFJP/2fZLTcwt9FncsCgocKpYyi9xVrssnlPeZehzBvbEJ2Ob500/ EIiQ== X-Gm-Message-State: AHQUAubUQNwG9U10DOLV72VDinU1OYx/UQ7b6r2W8D6HTw6CCQD9VDO5 L1Dhk4ZgO8tb5ReCz0CnZ3fIi7ll/9sZMs7THcxIAw== X-Received: by 2002:ac8:7545:: with SMTP id b5mr19013261qtr.244.1550514322396; Mon, 18 Feb 2019 10:25:22 -0800 (PST) MIME-Version: 1.0 References: <20190216001533.5465-1-jbroadus@gmail.com> <20190218100652.GB27940@ediswmail.ad.cirrus.com> In-Reply-To: <20190218100652.GB27940@ediswmail.ad.cirrus.com> From: Jim Broadus Date: Mon, 18 Feb 2019 10:25:10 -0800 Message-ID: Subject: Re: [PATCH] i2c: Allow recovery of the initial IRQ by a i2c client device. To: Charles Keepax Cc: benjamin.tissoires@redhat.com, wsa@the-dreams.de, linux-i2c@vger.kernel.org, Linux Kernel 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 Thank you Charles. I should probably correct the typos in my commit message. On Mon, Feb 18, 2019 at 2:06 AM Charles Keepax wrote: > > On Fri, Feb 15, 2019 at 04:15:33PM -0800, Jim Broadus wrote: > > A previous change allowed i2c client devices to discover new IRQs upon > > reprobe. By clearing the IRQ in i2c_device_remove. However, if an IRQ was > > assigned in i2c_new_device, that information is lost. > > > > For example, the touchscreen and trackpad devices on a Dell Inspiron laptop > > are I2C devices whose IRQs are defined by ACPI extended IRQ types. The > > client device structures are initialized during an ACPI walk. After > > removing the i2c_hid device, modprobe fails. > > > > This change caches the initial IRQ value in i2c_new_device and then resets > > the client device IRQ to the initial value in i2c_device_remove. > > > > Fixes: 6f108dd70d30 ("i2c: Clear client->irq in i2c_device_remove") > > Signed-off-by: Jim Broadus > > --- > > Reviewed-by: Charles Keepax > > Apologies for the issues caused. I think this looks like a good fix > to me. > > Thanks, > Charles