From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCDD9C2B9F8 for ; Tue, 25 May 2021 13:12:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD7356140B for ; Tue, 25 May 2021 13:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233140AbhEYNOW (ORCPT ); Tue, 25 May 2021 09:14:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58542 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233148AbhEYNOT (ORCPT ); Tue, 25 May 2021 09:14:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621948369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0twBDBD8OnsIb7qcxH3IhWfsLWZlhuInb0dZ2mp3al8=; b=efyePDCttOUfHNIc6Br52CTOkoUAv0raZYO7kT705mg4xvPoKWoeoSZD+DP0rMlK0r4Q6+ xBXvD18S0JMXFp9rdZJK0v1OmTXjAdu0lsAhtdEEk6r20a3mcxw9MTpAbSVWC95hhpp6pn HETVfK15m0EYDy0xY7ENLeCVXNqXQfU= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-195-vnGWXuSIOq6hWFqMKLGDag-1; Tue, 25 May 2021 09:12:47 -0400 X-MC-Unique: vnGWXuSIOq6hWFqMKLGDag-1 Received: by mail-ed1-f72.google.com with SMTP id q18-20020a50cc920000b029038cf491864cso17270832edi.14 for ; Tue, 25 May 2021 06:12:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0twBDBD8OnsIb7qcxH3IhWfsLWZlhuInb0dZ2mp3al8=; b=NriV2LztJ20X9ADjlbxYGn677JbhfCQ88fO4it0U6JtfmjE8oNkYMZEmBuX3jkJeiZ 3Agf4bELUPb9J2nMluj9kJxctQ1xoE7gVbp/avV5O+c7WZSsqDA7MMJB7cygSsjrxdS8 SqsiRtB4EW5GjM++Rul45aVz4QIoWXhnS/aD/stQfoJOawGlhFFacQ+L1trrZkOlqyDr O5YqR45JPMKB8o3fi9kPZed3Ox5adeX4iUw6wYhKou0iM83ZddFWzVEDsXayOGwTK2ki eJ0nSOVz1qXFs+cNlPTJmiJboU3Q0i1PWueZvclxA+WsIkefNyz7ppoHga0I6vL1AL3i Dvyw== X-Gm-Message-State: AOAM533Kj/uSMV7fubXj4cFdE6iF7Rup6RgsovlyP3aVqJQdVtlczlnT kZKAIUMqGH8NeKUbsw0fE9HII0LMrdKkwZi9q5UrWIgsJnlS8P1cZZXeGrJRTB4yxIf5Y/GXTIs 3SDlUgbcu7luSlii6J3Yclw== X-Received: by 2002:a17:906:851:: with SMTP id f17mr12299089ejd.124.1621948366427; Tue, 25 May 2021 06:12:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5oWMM8JXhKtJG6GsKjPFKCO0QrtxE+CalgpgW5rQoYCK06xZCk+5T9ydYfO5Nua7kk6YBVQ== X-Received: by 2002:a17:906:851:: with SMTP id f17mr12299066ejd.124.1621948366182; Tue, 25 May 2021 06:12:46 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c1e-bf00-1054-9d19-e0f0-8214.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:1054:9d19:e0f0:8214]) by smtp.gmail.com with ESMTPSA id j4sm7988955edq.13.2021.05.25.06.12.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 May 2021 06:12:45 -0700 (PDT) Subject: Re: [PATCH v4 0/8] Introduce intel_skl_int3472 module From: Hans de Goede To: Daniel Scally , "Rafael J . Wysocki" , Andy Shevchenko , Wolfram Sang , Lee Jones , Maximilian Luz , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, platform-driver-x86@vger.kernel.org, devel@acpica.org Cc: Len Brown , Mika Westerberg , Russell King , Linus Walleij , Bartosz Golaszewski , Mark Gross , Robert Moore , Erik Kaneda , laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com References: <20210520140928.3252671-1-djrscally@gmail.com> Message-ID: Date: Tue, 25 May 2021 15:12:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Hi again, On 5/25/21 3:10 PM, Hans de Goede wrote: > Hi Daniel, > > On 5/20/21 4:09 PM, Daniel Scally wrote: >> Hello all >> >> Apologies for the long delay since the last version of this series; the time I >> had free to work on it became somewhat restrained. > > No worries, thank you for all the work you are putting into this. > > I have not taken a close look at the code yet, but I see that Andy has and > the amount of remarks which he has on patch 7/8 which is the big one seems > to be limited, so I believe that we are getting close to this being ready > for merging. > > This touches a lot of subsystems, so we need to come up with a plan to > merge this. Here is my proposal for how to do this: > > 1/8 ACPI: scan: Extend acpi_walk_dep_device_list() > 2/8 ACPI: scan: Add function to fetch dependent of acpi device > 3/8 i2c: core: Add a format macro for I2C device names > 4/8 gpiolib: acpi: Export acpi_get_gpiod() > 5/8 clkdev: Make clkdev_drop() null aware > 6/8 gpiolib: acpi: Add acpi_gpio_get_io_resource() > 7/8 platform/x86: Add intel_skl_int3472 driver > 8/8 mfd: tps68470: Remove tps68470 MFD driver > > Rafael already indicated that he wants to merge 1/8 (and presumably also 2/8) > through his tree and that he will provide an immutable branch with those > for merging into the pdx86 tree. p.s. Daniel it would be good if you can at least send a v5 of patch 2/8 with the suggested renames, then Rafael can merge 1/8 + 2/8 and we are down to 6 patches (4 if we also merge the i2c + clk patches independently). Regards, Hans > 4/8 and 6/8 are both gpiolib-acpi patches and seem to be ready for merging > now, perhaps the gpiolib-acpi maintainers can already merge these and also > provide an immutable branch ? Andy/Mika ? > > 3/8 and 5/8 seem to be nice cleanups, but not really necessary. IMHO it > would be best to park these cleanups for later and for 3/8 add the following > where necessary for now: > > /* FIXME drop this once the I2C_DEV_NAME_FORMAT macro has been added to include/linux/i2c.h */ > #ifndef I2C_DEV_NAME_FORMAT > #define I2C_DEV_NAME_FORMAT "i2c-%s" > #endif > > This is not the prettiest but it reduces all the subsys cross-deps and things > like this have been done before for similar reasons. > > Likewise it would be good if you can add if (foo) as condition before any > clkdev_drop(foo) calls in this patch-set and then merge > 5/8 "clkdev: Make clkdev_drop() null aware" independently of this and then > once both are in Linux tree follow-up with a cleanup patch dropping the if (foo) > guards. > > So this would leave as deps for 7/8 just the 2 ACPI and 2 gpiolib-acpi patches > which I can hopefully pull-in via immutable branches and then we are good. > > AFAICT patch 8/8 can be merged independently once 7/8 hits for-next (IOW once > we are sure the next kernel will have 7/8). > > > > Or alternatively one of the involved subsys maintainers just merges the entire > set (once it is ready) and then provides an immutable branch with the entire set > on top of 5.13-rc1 (or 5.14-rc1). But that requires acks from all the other > subsys maintainers. Note I'm fine with either approach. > > Regards, > > Hans > > > > > >> 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/ >> >> v3 was here: >> https://lore.kernel.org/lkml/20210222130735.1313443-1-djrscally@gmail.com/ >> >> Series level changelog: >> >> - Added patch 5/8 to make clkdev_drop() NULL aware to simplify error >> handling. >> - Added patch 6/8 to add acpi_gpio_get_io_resource(). >> >> 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. Unfortunately, I don't have a >> device to test it on myself. >> >> =========== 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 (8): >> 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() >> clkdev: Make clkdev_drop() null aware >> gpiolib: acpi: Add acpi_gpio_get_io_resource() >> 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 | 107 ++++- >> drivers/clk/clkdev.c | 3 + >> drivers/gpio/Kconfig | 2 +- >> drivers/gpio/gpiolib-acpi.c | 61 ++- >> drivers/i2c/i2c-core-acpi.c | 8 +- >> drivers/i2c/i2c-core-base.c | 4 +- >> drivers/mfd/Kconfig | 18 - >> drivers/mfd/Makefile | 1 - >> drivers/mfd/tps68470.c | 97 ----- >> drivers/platform/surface/aggregator/core.c | 6 +- >> drivers/platform/surface/surface3_power.c | 22 +- >> .../platform/surface/surface_acpi_notify.c | 7 +- >> drivers/platform/x86/Kconfig | 2 + >> drivers/platform/x86/Makefile | 1 + >> drivers/platform/x86/intel-int3472/Kconfig | 31 ++ >> drivers/platform/x86/intel-int3472/Makefile | 5 + >> .../intel_skl_int3472_clk_and_regulator.c | 195 +++++++++ >> .../intel-int3472/intel_skl_int3472_common.c | 106 +++++ >> .../intel-int3472/intel_skl_int3472_common.h | 113 +++++ >> .../intel_skl_int3472_discrete.c | 409 ++++++++++++++++++ >> .../intel_skl_int3472_tps68470.c | 109 +++++ >> include/acpi/acpi_bus.h | 8 + >> include/linux/acpi.h | 11 +- >> include/linux/gpio/consumer.h | 2 + >> include/linux/i2c.h | 3 + >> 29 files changed, 1175 insertions(+), 167 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_clk_and_regulator.c >> 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 >> From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFD40C2B9F8 for ; Tue, 25 May 2021 13:14:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0CA36141B for ; Tue, 25 May 2021 13:14:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0CA36141B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:Cc:To:From:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2XHPvmaySgEcY0EIUan/fkXnUtfCwu1EpPHxdRJJSCk=; b=Ys3AnwaHbu1/HTJh9BeY/m5cA6 gS45diJcv3hm983b+aJ2c/gr6mAvZ7MffBnR5VhR5/IZSVIhQRtV6DbNBkRbc8C5BHhqQxli0pbv9 rhdM10gaQgI9c3e5M4wad33DkUscu7jaEQO69cL+CVc9j3A8ZTEziW54/LBXYWYQDscm6rD4FFAiX ja9LwmllIXTvwjC38RQirVRApLORBUCxId5Rn6+HR1BhxYOkYdO6cw8ifVfUalnm5opSspXMjgRkE xs2A5BMq9sGbvkxgCbMyUXBkUy9fwgh3/iDKzD+WD2Y5ZE6eCmorx1B2A7mh3rMT1PfH6XlxikG84 HrUGyQBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llWrf-005F4C-1Y; Tue, 25 May 2021 13:12:55 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1llWra-005F2e-IE for linux-arm-kernel@lists.infradead.org; Tue, 25 May 2021 13:12:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621948369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0twBDBD8OnsIb7qcxH3IhWfsLWZlhuInb0dZ2mp3al8=; b=efyePDCttOUfHNIc6Br52CTOkoUAv0raZYO7kT705mg4xvPoKWoeoSZD+DP0rMlK0r4Q6+ xBXvD18S0JMXFp9rdZJK0v1OmTXjAdu0lsAhtdEEk6r20a3mcxw9MTpAbSVWC95hhpp6pn HETVfK15m0EYDy0xY7ENLeCVXNqXQfU= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-554-Mf0b2wIWPX-S9f_DNS8rZw-1; Tue, 25 May 2021 09:12:47 -0400 X-MC-Unique: Mf0b2wIWPX-S9f_DNS8rZw-1 Received: by mail-ed1-f71.google.com with SMTP id m6-20020aa7c4860000b029038d4e973878so13093223edq.10 for ; Tue, 25 May 2021 06:12:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0twBDBD8OnsIb7qcxH3IhWfsLWZlhuInb0dZ2mp3al8=; b=tSRhIO+uqU+NHgQdp+ahUaDFDa7cg88ZmdLdFky0BQkZBa5CbsTYK4187xM0HHJZha /XiqDGb++froIbM6wK6f3Bu2vmp8aznKuVYqTX3QB5X5rwi5xZPRsBt3PcY5RlQQpQFQ UPw4WkMffhEIy0amuHskkoINFAvjQP3h3GCiSL5QOlNlkYtRUs/DL9rMoZ68K1EMGUhT RYjZbCjTVJ6A7RATel2uctsRMHoy+EQYXq4hTjeJ0TLVNomhhSSfo1tS8NYHwH+3ML5f 9E+W25v5oGv2b2pP12avjqxYR80a4mauk0L58Q571P8oHcP8VkJ/ccT3HKEsXaTJoZPF qq4A== X-Gm-Message-State: AOAM5338Fuqq22Z1dIstCxnu4yTKfh1K5JY5zu5en1v3oyBNIb4XTq0t qqda41LXEVNw7WJxyHSHSI3kAh+cr8bBwEzRu8rCcLw39nWahJb8gZM2m26Ma+4cpA1oPQYq/m5 fcdgsQik8IT3lNMnB/bVqk3a1E+bgH+PLZic= X-Received: by 2002:a17:906:851:: with SMTP id f17mr12299098ejd.124.1621948366429; Tue, 25 May 2021 06:12:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5oWMM8JXhKtJG6GsKjPFKCO0QrtxE+CalgpgW5rQoYCK06xZCk+5T9ydYfO5Nua7kk6YBVQ== X-Received: by 2002:a17:906:851:: with SMTP id f17mr12299066ejd.124.1621948366182; Tue, 25 May 2021 06:12:46 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c1e-bf00-1054-9d19-e0f0-8214.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:1054:9d19:e0f0:8214]) by smtp.gmail.com with ESMTPSA id j4sm7988955edq.13.2021.05.25.06.12.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 May 2021 06:12:45 -0700 (PDT) Subject: Re: [PATCH v4 0/8] Introduce intel_skl_int3472 module From: Hans de Goede To: Daniel Scally , "Rafael J . Wysocki" , Andy Shevchenko , Wolfram Sang , Lee Jones , Maximilian Luz , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, platform-driver-x86@vger.kernel.org, devel@acpica.org Cc: Len Brown , Mika Westerberg , Russell King , Linus Walleij , Bartosz Golaszewski , Mark Gross , Robert Moore , Erik Kaneda , laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com References: <20210520140928.3252671-1-djrscally@gmail.com> Message-ID: Date: Tue, 25 May 2021 15:12:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210525_061250_726221_8EE3AE41 X-CRM114-Status: GOOD ( 52.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi again, On 5/25/21 3:10 PM, Hans de Goede wrote: > Hi Daniel, > > On 5/20/21 4:09 PM, Daniel Scally wrote: >> Hello all >> >> Apologies for the long delay since the last version of this series; the time I >> had free to work on it became somewhat restrained. > > No worries, thank you for all the work you are putting into this. > > I have not taken a close look at the code yet, but I see that Andy has and > the amount of remarks which he has on patch 7/8 which is the big one seems > to be limited, so I believe that we are getting close to this being ready > for merging. > > This touches a lot of subsystems, so we need to come up with a plan to > merge this. Here is my proposal for how to do this: > > 1/8 ACPI: scan: Extend acpi_walk_dep_device_list() > 2/8 ACPI: scan: Add function to fetch dependent of acpi device > 3/8 i2c: core: Add a format macro for I2C device names > 4/8 gpiolib: acpi: Export acpi_get_gpiod() > 5/8 clkdev: Make clkdev_drop() null aware > 6/8 gpiolib: acpi: Add acpi_gpio_get_io_resource() > 7/8 platform/x86: Add intel_skl_int3472 driver > 8/8 mfd: tps68470: Remove tps68470 MFD driver > > Rafael already indicated that he wants to merge 1/8 (and presumably also 2/8) > through his tree and that he will provide an immutable branch with those > for merging into the pdx86 tree. p.s. Daniel it would be good if you can at least send a v5 of patch 2/8 with the suggested renames, then Rafael can merge 1/8 + 2/8 and we are down to 6 patches (4 if we also merge the i2c + clk patches independently). Regards, Hans > 4/8 and 6/8 are both gpiolib-acpi patches and seem to be ready for merging > now, perhaps the gpiolib-acpi maintainers can already merge these and also > provide an immutable branch ? Andy/Mika ? > > 3/8 and 5/8 seem to be nice cleanups, but not really necessary. IMHO it > would be best to park these cleanups for later and for 3/8 add the following > where necessary for now: > > /* FIXME drop this once the I2C_DEV_NAME_FORMAT macro has been added to include/linux/i2c.h */ > #ifndef I2C_DEV_NAME_FORMAT > #define I2C_DEV_NAME_FORMAT "i2c-%s" > #endif > > This is not the prettiest but it reduces all the subsys cross-deps and things > like this have been done before for similar reasons. > > Likewise it would be good if you can add if (foo) as condition before any > clkdev_drop(foo) calls in this patch-set and then merge > 5/8 "clkdev: Make clkdev_drop() null aware" independently of this and then > once both are in Linux tree follow-up with a cleanup patch dropping the if (foo) > guards. > > So this would leave as deps for 7/8 just the 2 ACPI and 2 gpiolib-acpi patches > which I can hopefully pull-in via immutable branches and then we are good. > > AFAICT patch 8/8 can be merged independently once 7/8 hits for-next (IOW once > we are sure the next kernel will have 7/8). > > > > Or alternatively one of the involved subsys maintainers just merges the entire > set (once it is ready) and then provides an immutable branch with the entire set > on top of 5.13-rc1 (or 5.14-rc1). But that requires acks from all the other > subsys maintainers. Note I'm fine with either approach. > > Regards, > > Hans > > > > > >> 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/ >> >> v3 was here: >> https://lore.kernel.org/lkml/20210222130735.1313443-1-djrscally@gmail.com/ >> >> Series level changelog: >> >> - Added patch 5/8 to make clkdev_drop() NULL aware to simplify error >> handling. >> - Added patch 6/8 to add acpi_gpio_get_io_resource(). >> >> 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. Unfortunately, I don't have a >> device to test it on myself. >> >> =========== 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 (8): >> 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() >> clkdev: Make clkdev_drop() null aware >> gpiolib: acpi: Add acpi_gpio_get_io_resource() >> 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 | 107 ++++- >> drivers/clk/clkdev.c | 3 + >> drivers/gpio/Kconfig | 2 +- >> drivers/gpio/gpiolib-acpi.c | 61 ++- >> drivers/i2c/i2c-core-acpi.c | 8 +- >> drivers/i2c/i2c-core-base.c | 4 +- >> drivers/mfd/Kconfig | 18 - >> drivers/mfd/Makefile | 1 - >> drivers/mfd/tps68470.c | 97 ----- >> drivers/platform/surface/aggregator/core.c | 6 +- >> drivers/platform/surface/surface3_power.c | 22 +- >> .../platform/surface/surface_acpi_notify.c | 7 +- >> drivers/platform/x86/Kconfig | 2 + >> drivers/platform/x86/Makefile | 1 + >> drivers/platform/x86/intel-int3472/Kconfig | 31 ++ >> drivers/platform/x86/intel-int3472/Makefile | 5 + >> .../intel_skl_int3472_clk_and_regulator.c | 195 +++++++++ >> .../intel-int3472/intel_skl_int3472_common.c | 106 +++++ >> .../intel-int3472/intel_skl_int3472_common.h | 113 +++++ >> .../intel_skl_int3472_discrete.c | 409 ++++++++++++++++++ >> .../intel_skl_int3472_tps68470.c | 109 +++++ >> include/acpi/acpi_bus.h | 8 + >> include/linux/acpi.h | 11 +- >> include/linux/gpio/consumer.h | 2 + >> include/linux/i2c.h | 3 + >> 29 files changed, 1175 insertions(+), 167 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_clk_and_regulator.c >> 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 >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel