Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2237277imj; Mon, 18 Feb 2019 02:25:42 -0800 (PST) X-Google-Smtp-Source: AHgI3IaEohiPuD1Dvaf3l+6X/fxLCDgbYFJAnGKJqi2xEsKa1xZoRoKT7Q0yzHFK74RouUVubmdR X-Received: by 2002:a17:902:264:: with SMTP id 91mr24874661plc.108.1550485542151; Mon, 18 Feb 2019 02:25:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550485542; cv=none; d=google.com; s=arc-20160816; b=LkDtrQjWrrTTULosrSAHWSyQPP7N7VXWqfiTrj1vacmIOBh/SH7pcROuC0vH3AIs9f xgDzWb1HXjwBs3Efe1BmLpGPsVoQLmw2ShNR+/GhNPBA9WQm5hFT3wpJPybcIa/NpnCk fMo6a/uPq0GeVcSta+VZgJ4TlcOAzZUgEGrvtu56QLFkXjgR4bCn4zevvTuHiMY7O6tx olDV9EWVjK/wIqkrfxBYwWlZ9lct5aIFAdjC/f8phyfp6yi1H8O2O9OLQTcde0VnhD7y HT5CGqPCEn4CdcLdB3I2on7OzjyHFFumc/wix8sThxnKFOaLuDK9DRPwhrSU4rtScapV 8yZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6YvYVuEU76w4HTVVY51OArNeprHKwTMV9oO8hJm45Nk=; b=KuwHEbPn141posHHeziCgc8hkQtPqm94RS+xuUgdcmoZlUyMmNFuX8FtX/2IT/IKqA xcJ3uZkjP8fsp9tV5vGNyOD6WdfAS3LOgpLLej2vKqSOR7MaYaM1XDodDh54UauUwwl3 JexlLW2kBAU9670aMnJ4yVgAAXRKhDiWIoXSENrvyvImsItX4GyFocozmg5Sz8UAjXYE LivClVxLtmvbqMAG3tH81eilHJits7lYJNCxv99Yyq0AQrTc0Npe2pz2PPXeE9QwJ+et 55SvLlUnXLB4Frh/VptzTxRiYn7wIoEf9TUUVkB5khw2zbsi7o3JHwXoFlmeIwEh+49d 0wJw== 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=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h186si12794695pfb.73.2019.02.18.02.24.56; Mon, 18 Feb 2019 02:25:42 -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; 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=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729511AbfBRKG7 (ORCPT + 99 others); Mon, 18 Feb 2019 05:06:59 -0500 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:35758 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729460AbfBRKG7 (ORCPT ); Mon, 18 Feb 2019 05:06:59 -0500 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1IA4Oic010942; Mon, 18 Feb 2019 04:06:53 -0600 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from mail3.cirrus.com ([87.246.76.56]) by mx0b-001ae601.pphosted.com with ESMTP id 2qpftrter5-1; Mon, 18 Feb 2019 04:06:53 -0600 Received: from EX17.ad.cirrus.com (ex17.ad.cirrus.com [172.20.9.81]) by mail3.cirrus.com (Postfix) with ESMTP id 0FBB5611C8AF; Mon, 18 Feb 2019 04:07:05 -0600 (CST) Received: from imbe.wolfsonmicro.main (198.61.95.81) by EX17.ad.cirrus.com (172.20.9.81) with Microsoft SMTP Server id 14.3.408.0; Mon, 18 Feb 2019 10:06:52 +0000 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id x1IA6q9e002932; Mon, 18 Feb 2019 10:06:52 GMT Date: Mon, 18 Feb 2019 10:06:52 +0000 From: Charles Keepax To: Jim Broadus CC: , , , Subject: Re: [PATCH] i2c: Allow recovery of the initial IRQ by a i2c client device. Message-ID: <20190218100652.GB27940@ediswmail.ad.cirrus.com> References: <20190216001533.5465-1-jbroadus@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190216001533.5465-1-jbroadus@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=832 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902180077 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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