From patchwork Sat Feb 18 10:32:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 654945 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8F2CC636D7 for ; Sat, 18 Feb 2023 10:33:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229896AbjBRKdb (ORCPT ); Sat, 18 Feb 2023 05:33:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbjBRKda (ORCPT ); Sat, 18 Feb 2023 05:33:30 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A809B1B320 for ; Sat, 18 Feb 2023 02:32:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676716363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=+trPnWf+vRJ2/iTAVbxTHjHnpzIARmxivvQmHCINeLI=; b=MvvRdnCub+kMb6yWIqGRBEtyQMzqt9oQBuozrSmw1tLKsWosXSEZo/rlTWllS6cGSYeIX5 MUR8GFbAbTN0bc0D3oa26Ymt8krOXaIxPOZO2kKOb6XKgZKClN+40qFD5Lt2aJys7AVAkq 4WPeyD5uQAOJL/FkQ1b0NNlWcKOb1vw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-672-iLrO-an1P6O5kZPaiDdwCg-1; Sat, 18 Feb 2023 05:32:38 -0500 X-MC-Unique: iLrO-an1P6O5kZPaiDdwCg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE78B1C05EBD; Sat, 18 Feb 2023 10:32:37 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4988B2026D4B; Sat, 18 Feb 2023 10:32:36 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" , Sebastian Reichel , Mika Westerberg , Andy Shevchenko , Linus Walleij Cc: Hans de Goede , Len Brown , linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH 0/3] ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper Date: Sat, 18 Feb 2023 11:32:32 +0100 Message-Id: <20230218103235.6934-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hi All, x86 ACPI boards which ship with only Android as their factory image usually have pretty broken ACPI tables, relying on everything being hardcoded in the factory kernel image and often disabling parts of the ACPI enumeration kernel code to avoid the broken tables causing issues. Part of this broken ACPI code is that sometimes these boards have _AEI ACPI GPIO event handlers which are broken. So far this has been dealt with in the platform/x86/x86-android-tablets.c module by it calling acpi_gpiochip_free_interrupts() on gpiochip-s with troublesome handlers to disable the handlers. But this is racy and sometimes too late. This series adds a new acpi_quirk_skip_gpio_event_handlers() function to drivers/acpi/x86/utils.c using the existing DMI table for this to avoid duplication of DMI matches. Patch 2 adds a new x86 Android tablet model which needs the new SKIP_GPIO_EVENT_HANDLERS quirk. Patch 3 uses acpi_quirk_skip_gpio_event_handlers() in axp288_charger.c to deal with there not being a ACPI event handler to disable charging from Vbus before enable 5V boost output on the tablets micro-USB conn. Sebastian (sre), since patch 3 depends on patch 1, it is probably easiest to just merge the entire series through the linux-pm tree. May we have your ack for this ? Regards, Hans Hans de Goede (3): ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper ACPI: x86: Add skip i2c clients quirk for Acer Iconia One 7 B1-750 power: supply: axp288_charger: Use alt usb-id extcon on some x86 android tablets drivers/acpi/x86/utils.c | 34 ++++++++++++++++++++++++--- drivers/gpio/gpiolib-acpi.c | 3 +++ drivers/power/supply/axp288_charger.c | 15 ++++++++++-- include/acpi/acpi_bus.h | 5 ++++ 4 files changed, 52 insertions(+), 5 deletions(-)