Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1605277pxb; Mon, 22 Feb 2021 06:28:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqYZaQxJ1fbOQM/GVTL+Umq5na3tu0i/cCYtkNnGPKfW5a0vGHw7EEdqRp0XAJ0TJYaf+O X-Received: by 2002:a17:906:3d31:: with SMTP id l17mr6822752ejf.193.1614004132062; Mon, 22 Feb 2021 06:28:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614004132; cv=none; d=google.com; s=arc-20160816; b=GD/AV24s7c2qslkyq60tveyodqIEtA6w+aJIwP20khMkgUZK0OBPxzwLSdt/nzlfMc 7lh7rMWoikGnxNYlCSnpcRcgmKqs3TsJxAFlDFAuZI0CRzBtrd/OoOtuxbms/iIoQThN Dx2mV15sNQ9j+WXP8UtHW2TzdKJ1zZu2mJnHApiETLPqkJYRP/xB5xh1KVH17x5IuNkN Z2IPkq2M61N31+PsyKHPgO54ouaW33jtPjpa/gyiZsoQUW30VZHpHGhfg81eQ52lO7EQ XZlCrs1FL6rZ8rJvo2/E9V1Tyyrs2BCwxfWHuVMTSxdBC2JM88sxHPECRJEoCKc6muSM QP3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MuRf9/8b8K4IIlZM2nZP16CBZ8tDQb2s0kmOZ82ah7g=; b=DGvfO/1ks20rxCv9zD2nHlQuA1sY/qA2JKUwp7jqPOo5mIxQ8aqEGW6tdS53+u15DK MF6n9V4+b6kmHyqrjPJyItDsZ8FPgCdLfPaRgrKXIbJJzqn1UnCZ0Bvr4EQ/ihfVnPGC 2zm7L8BV9V8mrlZ2K8wWYwlPSI9nvp2d8dWQ0B9KHMFgHA9pOIxmp6yNvFEubNjvo89R yGiHHwFMVscdqZBftJafVuHXpZCka1cL7g+a0mREMzgvvJuEPdJiKGxerklq+mL0W9NF 1YXNjMSiXuqvO0Amx4wg5h+ZGODQagoN7cwSYK97XhjTY3VS8rdLl6aymiZKiIhiuRt0 gODg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=la0El+ft; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id r22si540953edp.172.2021.02.22.06.28.29; Mon, 22 Feb 2021 06:28:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=la0El+ft; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231201AbhBVOYT (ORCPT + 99 others); Mon, 22 Feb 2021 09:24:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231633AbhBVOQp (ORCPT ); Mon, 22 Feb 2021 09:16:45 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00AA3C06178B; Mon, 22 Feb 2021 06:16:05 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id c19so8634188pjq.3; Mon, 22 Feb 2021 06:16:04 -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=MuRf9/8b8K4IIlZM2nZP16CBZ8tDQb2s0kmOZ82ah7g=; b=la0El+ftwtmu5M03fzpfMVvgBdVuRP3q4ZiVGvwFO53W1pSflIkeMM/mLsuc//DbuA QRhI1h4hB8VXAF16KpdwJq6snysYR/FKx7iBpYm/2wW9mLxbZt+zFxoYV+hYvxT2Ggff 6y03xiPi06tgGt+Es945HsXGJj9uQ1h5QrXf0ok/De/BXAD/VI5hsk+N+nR979u48HXv w03SWlmlRotFvqL8UJzfdcM5iMxd8S4xhAJavUbrvyxrJUDqQDyJrRgPZAjcfaOapafA 88T/ub89tKwE7LkdWQIykWxc+LIUt1trusz17x/lNug6OmgOLBtaK3DVQQBnM4Z0jIdL erkA== 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=MuRf9/8b8K4IIlZM2nZP16CBZ8tDQb2s0kmOZ82ah7g=; b=GhXT66XY6XJloBFO3GiJwfPE9JxYQ9Z/gIjqeA0fkfuhwFX634sF1ZzT6KdLsnnrli 0B4x3MyQpjKd1GbT8EqWLFk1yj2Et8te69U3ZTHGoTUoSAT1zGzXMyC+WRNijcFiygzZ 8ZLemxCcTneLn3qA+5RfEYJS+Ws+GKsJ2rr3r8iVoIkbIdGSKCnCQT30GTvddRMwGi2Z qpEqSSOL6uxaMx+WnUuwq/3ITWuGtRC+SfG3Pwtjq/Vkes6SPdmPn2bqOKtOsubnr3kc JmY8GVGeJXXxKVQzxKo6zGfbcYcci94Lsmay/liO/kwhPZBCeChyq18FzX7QBGGiyFox WoVg== X-Gm-Message-State: AOAM530y/rV3FneSpfKzJg8wzsMBwyPZfb3lKFwSNAsWYOeVGyQsYl3D 1jNLuw3fypCIfk3nQDMtUc3bdvduy1jiDKTHtiM= X-Received: by 2002:a17:90b:3d8:: with SMTP id go24mr24474065pjb.181.1614003364468; Mon, 22 Feb 2021 06:16:04 -0800 (PST) MIME-Version: 1.0 References: <20210222130735.1313443-1-djrscally@gmail.com> In-Reply-To: <20210222130735.1313443-1-djrscally@gmail.com> From: Andy Shevchenko Date: Mon, 22 Feb 2021 16:15:48 +0200 Message-ID: Subject: Re: [PATCH v3 0/6] Introduce intel_skl_int3472 module To: Daniel Scally , Andy Shevchenko , Dmitry Torokhov , Guenter Roeck Cc: Tomasz Figa , Sakari Ailus , Rajmohan Mani , "Rafael J. Wysocki" , Len Brown , Mika Westerberg , Linus Walleij , Bartosz Golaszewski , Wolfram Sang , Lee Jones , kieran.bingham+renesas@ideasonboard.com, Laurent Pinchart , Hans de Goede , Mark Gross , Maximilian Luz , Robert Moore , Erik Kaneda , me@fabwu.ch, Linux Kernel Mailing List , ACPI Devel Maling List , "open list:GPIO SUBSYSTEM" , linux-i2c , Platform Driver , devel@acpica.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 22, 2021 at 3:11 PM Daniel Scally wrote: > > v1 for this series was originally 14-18 of this series: > https://lore.kernel.org/linux-media/20201130133129.1024662-1-djrscally@gmail.com/T/#m91934e12e3d033da2e768e952ea3b4a125ee3e67 > > v2 was here: > https://lore.kernel.org/platform-driver-x86/20210118003428.568892-1-djrscally@gmail.com/ > > Series level changelog: > > - Dropped the patch moving acpi_lpss_dep() to utils since it's not used > in acpi_dev_get_dependent_dev() anymore. > - Replaced it with a patch extending acpi_walk_dep_device_list() to be > able to apply a given callback against each device in acpi_dep_list > - Dropped the patch creating acpi_i2c_dev_name() and simply open coded > that functionality. > > This has been tested on a number of devices, but currently **not** on a device > designed for ChromeOS, which we ideally need to do to ensure no regression > caused by replacing the tps68470 MFD driver. Sakari / Tomasz, is there any way > you could help with that? Unfortunately, I don't have a device to test it on > myself. +Cc: Dmitry and Guenter. Guys, do you know by a chance who can help with the above request from Daniel? > Original cover letter: > > At the moment in the kernel the ACPI _HID INT3472 is taken by the tps68470 > MFD driver, but that driver can only handle some of the cases of that _HID > that we see. There are at least these three possibilities: > > 1. INT3472 devices that provide GPIOs through the usual framework and run > power and clocks through an operation region; this is the situation that > the current module handles and is seen on ChromeOS devices > 2. INT3472 devices that provide GPIOs, plus clocks and regulators that are > meant to be driven through the usual frameworks, usually seen on devices > designed to run Windows > 3. INT3472 devices that don't actually represent a physical tps68470, but > are being used as a convenient way of grouping a bunch of system GPIO > lines that are intended to enable power and clocks for sensors which > are called out as dependent on them. Also seen on devices designed to > run Windows. > > This series introduces a new module which registers: > > 1. An i2c driver that determines which scenario (#1 or #2) applies to the > machine and registers platform devices to be bound to GPIO, OpRegion, > clock and regulator drivers as appropriate. > 2. A platform driver that binds to the dummy INT3472 devices described in > #3 > > The platform driver for the dummy device registers the GPIO lines that > enable the clocks and regulators to the sensors via those frameworks so > that sensor drivers can consume them in the usual fashion. The existing > GPIO and OpRegion tps68470 drivers will work with the i2c driver that's > registered. Clock and regulator drivers are available but have not so far been > tested, so aren't part of this series. > > The existing mfd/tps68470.c driver being thus superseded, it is removed. > > Thanks > Dan > > Daniel Scally (6): > ACPI: scan: Extend acpi_walk_dep_device_list() > ACPI: scan: Add function to fetch dependent of acpi device > i2c: core: Add a format macro for I2C device names > gpiolib: acpi: Export acpi_get_gpiod() > platform/x86: Add intel_skl_int3472 driver > mfd: tps68470: Remove tps68470 MFD driver > > MAINTAINERS | 5 + > drivers/acpi/ec.c | 2 +- > drivers/acpi/pmic/Kconfig | 2 +- > drivers/acpi/pmic/intel_pmic_chtdc_ti.c | 2 +- > drivers/acpi/scan.c | 92 ++- > drivers/gpio/Kconfig | 2 +- > drivers/gpio/gpiolib-acpi.c | 38 +- > drivers/i2c/i2c-core-acpi.c | 2 +- > drivers/i2c/i2c-core-base.c | 4 +- > drivers/mfd/Kconfig | 18 - > drivers/mfd/Makefile | 1 - > drivers/mfd/tps68470.c | 97 --- > drivers/platform/surface/surface3_power.c | 2 +- > drivers/platform/x86/Kconfig | 2 + > drivers/platform/x86/Makefile | 1 + > drivers/platform/x86/intel-int3472/Kconfig | 31 + > drivers/platform/x86/intel-int3472/Makefile | 4 + > .../intel-int3472/intel_skl_int3472_common.c | 106 ++++ > .../intel-int3472/intel_skl_int3472_common.h | 110 ++++ > .../intel_skl_int3472_discrete.c | 592 ++++++++++++++++++ > .../intel_skl_int3472_tps68470.c | 113 ++++ > include/acpi/acpi_bus.h | 8 + > include/linux/acpi.h | 4 +- > include/linux/gpio/consumer.h | 7 + > include/linux/i2c.h | 3 + > 25 files changed, 1100 insertions(+), 148 deletions(-) > delete mode 100644 drivers/mfd/tps68470.c > create mode 100644 drivers/platform/x86/intel-int3472/Kconfig > create mode 100644 drivers/platform/x86/intel-int3472/Makefile > create mode 100644 drivers/platform/x86/intel-int3472/intel_skl_int3472_common.c > create mode 100644 drivers/platform/x86/intel-int3472/intel_skl_int3472_common.h > create mode 100644 drivers/platform/x86/intel-int3472/intel_skl_int3472_discrete.c > create mode 100644 drivers/platform/x86/intel-int3472/intel_skl_int3472_tps68470.c > > -- > 2.25.1 > -- With Best Regards, Andy Shevchenko