From patchwork Fri Jun 21 10:08:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 1120100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=opensource.cirrus.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=cirrus.com header.i=@cirrus.com header.b="Sc+LlKP/"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45VZCs0ld0z9sBr for ; Fri, 21 Jun 2019 20:09:13 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726557AbfFUKIo (ORCPT ); Fri, 21 Jun 2019 06:08:44 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:49756 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726218AbfFUKIo (ORCPT ); Fri, 21 Jun 2019 06:08:44 -0400 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5LA3qN9008654; Fri, 21 Jun 2019 05:08:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=PODMain02222019; bh=DdAblSvKFopDe47PiVKyUP6lu1VEAXERAt2Tpbw45S0=; b=Sc+LlKP/O3VIAT7hX6721aVm8ErJL68b3I3QmZoLrQUmMS2CVCnh74HVUcqExpn9jzcA /r1un1v70UFX4lsJPzlU23sNE7pN6RJq9mbY59Gdhg/p/8+RGcRyYQwCru0fNmtg8ycb lvVQeJcY6n+S/H2A96ZcBoGkSllP9YJrpx5RLMhbWVw9rQtEGtNLW/cQgGW90BucU4fw Ea43FePZuckMvnPyzSC/OfYneYtTM7/63kKgCsTbwZVl6IdLOvQNMvbzhawFs6rzywNY e11QKTTI7nHEmhkm5Sv6r4LHHSDuXBXZYZDhuuREr+vnriqSVcbUtcN7hHmT/wKr0sho CQ== Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from mail2.cirrus.com (mail2.cirrus.com [141.131.128.20]) by mx0a-001ae601.pphosted.com with ESMTP id 2t780gm6v7-1; Fri, 21 Jun 2019 05:08:16 -0500 Received: from EDIEX02.ad.cirrus.com (unknown [198.61.84.81]) by mail2.cirrus.com (Postfix) with ESMTP id 25897605A6BD; Fri, 21 Jun 2019 05:08:16 -0500 (CDT) Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Fri, 21 Jun 2019 11:08:15 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1591.10 via Frontend Transport; Fri, 21 Jun 2019 11:08:15 +0100 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 1BF5544; Fri, 21 Jun 2019 11:08:15 +0100 (BST) From: Charles Keepax To: , CC: , , , , , , , Subject: [PATCH v6 0/7] I2C IRQ Probe Improvements Date: Fri, 21 Jun 2019 11:08:08 +0100 Message-ID: <20190621100815.12417-1-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=923 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906210085 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org This series attempts to align as much IRQ handling into the probe path as possible. Note that I don't have a great setup for testing these patches so they are mostly just build tested and need careful review and testing before any of them are merged. The series brings the ACPI path inline with the way the device tree path handles the IRQ entirely at probe time. However, it still leaves any IRQ specified through the board_info as being handled at device time. In that case we need to cache something from the board_info until probe time, which leaves any alternative solution with something basically the same as the current handling although perhaps caching more stuff. Thanks, Charles See previous discussions: - https://lkml.org/lkml/2019/2/15/989 - https://www.spinics.net/lists/linux-i2c/msg39541.html Charles Keepax (7): i2c: core: Allow whole core to use i2c_dev_irq_from_resources i2c: acpi: Use available IRQ helper functions i2c: acpi: Factor out getting the IRQ from ACPI i2c: core: Make i2c_acpi_get_irq available to the rest of the I2C core i2c: core: Move ACPI IRQ handling to probe time i2c: core: Move ACPI gpio IRQ handling into i2c_acpi_get_irq i2c: core: Tidy up handling of init_irq drivers/i2c/i2c-core-acpi.c | 59 ++++++++++++++++++++++++++++++++------------- drivers/i2c/i2c-core-base.c | 11 +++++---- drivers/i2c/i2c-core.h | 9 +++++++ 3 files changed, 57 insertions(+), 22 deletions(-)