From patchwork Fri Aug 2 12:51:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 11073317 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 68671746 for ; Fri, 2 Aug 2019 12:51:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C4522882A for ; Fri, 2 Aug 2019 12:51:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3FF9528831; Fri, 2 Aug 2019 12:51:14 +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 E13802882A for ; Fri, 2 Aug 2019 12:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728404AbfHBMvN (ORCPT ); Fri, 2 Aug 2019 08:51:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:38596 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726422AbfHBMvN (ORCPT ); Fri, 2 Aug 2019 08:51:13 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 94B71AFF6; Fri, 2 Aug 2019 12:51:11 +0000 (UTC) Date: Fri, 2 Aug 2019 14:51:09 +0200 From: Jean Delvare To: Linux I2C Cc: Wolfram Sang , linux-kernel@vger.kernel.org, Andrew Cooks , linux-acpi@vger.kernel.org, platypus-sw@opengear.com, "Tobin C . Harding" , Guenter Roeck , Will Wagner Subject: [PATCH v5 0/3] Enable ACPI-defined peripherals on i2c-piix4 SMBus Message-ID: <20190802145109.38dd4045@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These patches fix a couple of issues with the i2c-piix4 driver on AMD Family 16h Model 30h SoCs and add ACPI-based enumeration to the i2c-piix4 driver. Some I2C peripherals, eg. PCA953x IO expander, are not discovered by the probe or detect mechanisms when attached to an SMBus controller that uses the i2c-piix4 SMBus driver. ACPI provides a mechanism to define these peripherals and the controller port that they're attached to. Based on earlier work by Andrew Cooks. Changes: v5: take over from Andrew Cooks who apparently moved to other projects fix style issues reported by Tobin C. Harding fix potential array overrun make sure all registered adapters get unregistered keep ports 3 and 4 on early Hudson2 assume AMD SMBus numbering for ACPI devices v4: remove unnecessary SB800_MAIN_PORTS constant reduce piix4_remove change v3: take chip revision into account when determining port selection register v2: count the adapters, instead of misusing port numbers