From patchwork Tue Aug 7 08:05:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10558341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 593A013B4 for ; Tue, 7 Aug 2018 08:06:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BAD929707 for ; Tue, 7 Aug 2018 08:06:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3ECBD2975C; Tue, 7 Aug 2018 08:06:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E01E729707 for ; Tue, 7 Aug 2018 08:06:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727198AbeHGKSw (ORCPT ); Tue, 7 Aug 2018 06:18:52 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56758 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726886AbeHGKSw (ORCPT ); Tue, 7 Aug 2018 06:18:52 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27A878780F; Tue, 7 Aug 2018 08:05:43 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-117-103.ams2.redhat.com [10.36.117.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9AE582166BA2; Tue, 7 Aug 2018 08:05:40 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" , Len Brown , Andy Shevchenko , Mika Westerberg , Darren Hart , Wolfram Sang Cc: Hans de Goede , Srinivas Pandruvada , linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Heikki Krogerus , John Garry , linux-i2c@vger.kernel.org Subject: [PATCH v3 0/4] ACPI bugfix + i2c-multi-instantiate pseudo driver Date: Tue, 7 Aug 2018 10:05:35 +0200 Message-Id: <20180807080539.17811-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 07 Aug 2018 08:05:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 07 Aug 2018 08:05:43 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'hdegoede@redhat.com' RCPT:'' Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi All, So here is my third attempt at dealing with multiple i2c devices being described in a single ACPI fwnode. Like the second attemp This is still based on having a special driver for these corner cases which can be a module and only loaded when on hardware which needs this. New this time around is that this now is a platform driver, avoiding the need for the I2C_CLIENT_IGNORE_BUSY hack and having 2 i2c-clients at the address of the first i2c ACPI resource. While working on the ACPI changes for enumerating ACPI nodes which are handled by the new i2c-multi-instantiate driver as platform devices I found a bug caused by a combination of my: "ACPI / scan: Use acpi_bus_get_status() to initialize ACPI_TYPE_DEVICE devs" and the somewhat (but not much) later added: "ACPI / scan: Do not enumerate Indirect IO host children" commits, specifically the second one does not work because of the first one, I guess it was tested against a kernel without the first commit. My changes for enumerating relevant ACPI nodes as platform devices hit the same problem. Thus the first patch of this series is an ACPI bugfix for that problem. The second patch changes acpi/scan.c to enumerate relevant ACPI nodes as platform devices. The third patch is an ACPI cleanup patch made possible by the first patch. All 3 these patches are new in this version of this series. And finally the fourth patch is the actual i2c-multi-instantiate driver, now as platform driver living under drivers/platform/x86 . Regards, Hans