Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2044950rdh; Tue, 26 Sep 2023 10:35:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4OHHOhGi3GzsY+E1fJMvn9I9I3l9PcI+reEvkhKgeDR7b7r+fJpWLEe7XwRvMkcB2ngLM X-Received: by 2002:a05:6a20:6a04:b0:14d:f41c:435a with SMTP id p4-20020a056a206a0400b0014df41c435amr11882667pzk.39.1695749702787; Tue, 26 Sep 2023 10:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695749702; cv=none; d=google.com; s=arc-20160816; b=VqyPQ81pdCJodeeKJp+OWTMgv7cWDUKwlMqLAvZaJhbOJaCha1Bp4AahmfBVpxcCw6 Wmf0NOy0ZJIrcojLV6prk/seFD0ukuOVMij5HzqkQr86KKO7PyNeJcQ6r6Dnko5voDcK 3BMGMuh+SPv8KQKJ+S/+gRT5an9x8V4xi1OVGSTggTzloSKTsv6/IJYwnr431sOVi1cS cKoHe2DKvaHhkUxYZEq7gIEdq7dyLXkUWKX2pZDj6ou9HTwu5gRs3qrrNGcaLzuLkHGJ c+ZLKZ1b7kKmpWbEoV18Rge5WwfTdL2V6fp0g+WBZbI3Y63CcVZg6HJ7mOXf3Vccds+z SOaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vfLYtgRnxIhfGIuZ3AuQPnmd6mF7Zk5St0BXq4vGsIQ=; fh=Tss7K8NVbsMYNZ1fG9jf8bECM8zIrRfQ37piI3ZudAE=; b=OvJK/M4pExqAliqOTiyf2TyTrbNiWNHd74Hk6mllju1pI+mYGF/E39XJKnMVDdxVm8 PCxyW4LF0rwSJj+CJlkrHNLz2KjDEuIz60iCMhE5aDm7pcjK/+TnOGs+4AICP0abPWz+ 6Pi2phVbNuVEvO87j+YHd8i458Mb3u89euo/3Lsw2yGKM/sM3wsUsGdYU2rptzu97u+Q HesT6jT8heCWad/Hw3H7OG7YpdU4VhsxxVIisoF+rLSiONjC69IrWqE0rBGS1ir3DwfG Wcycir1ZEycuFyvRcKYA12shGEPxynCHgpgLYhYx1bL0cy/3pUL4Ar/26uq13nmuqR8D HBow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=TLzw53xl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id b66-20020a633445000000b00564b99f128dsi13466122pga.656.2023.09.26.10.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 10:35:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=TLzw53xl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B1FE38329A35; Tue, 26 Sep 2023 08:00:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234991AbjIZPAB (ORCPT + 99 others); Tue, 26 Sep 2023 11:00:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbjIZO77 (ORCPT ); Tue, 26 Sep 2023 10:59:59 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9B178E for ; Tue, 26 Sep 2023 07:59:52 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-32167a4adaaso8732733f8f.1 for ; Tue, 26 Sep 2023 07:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1695740391; x=1696345191; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vfLYtgRnxIhfGIuZ3AuQPnmd6mF7Zk5St0BXq4vGsIQ=; b=TLzw53xlfCA4B2yyekGcmN2Gow3tYsMQZDMag7APmsRKZLKRwPcuPoc7Xfm9pZ1N8A i8XZ6fbmgckGNwnl/tB/4I5ppkDl4KZpStL4Xiv9ChBKbHtPW+I1ipHDcBULsm4XLdE3 aBu2drv72zmlMLQSx51xCIobXP2ySCWI7bFE7fqUuQCm41h1B3nTdBqVBLZk+3Wqr9TQ UQcxODnyP08mnU+n1WxUthfrUHGcjCBdV14jAzYfqloN4c3Y2vLkGRyoEGR/WlHc5Kh+ TuNVFJ7KMX7DuFMdygi7a54VJGyS0URP4mSdyyDhwbZ4H+ipRDjnQ5o8xw/GHYglb4jt R8xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695740391; x=1696345191; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vfLYtgRnxIhfGIuZ3AuQPnmd6mF7Zk5St0BXq4vGsIQ=; b=BeRVa8BDIoswwIVnDMbybcD9DV8CEyaUMrj+lzgTTjc/eTS73kc1TK+9Ni+cfmm1po cnJRTI9AxVlExDoC5ky+P0XRJ3qNDY3v7oRU0YTniiaKOe9bBAXDQl+wu52j85a3+vP8 SqbC5n+8lQJYBbWFacT2JX+dvRpyNk+gdph6Ta6JeY6oKfsVq8lSCRv5N0VGQ3HXj237 aD5UY0ZnT7e85mJADhwY5hRiDRcoIOv0htKkxf4wEKMEuHrSgFt7xM+L0PgPJQ9jSURM m/ICP7YH1FgsACkWFmoDFNyg8V7sGqsevf+girsiky1DqlOgm4/KP+Pkm/EAjZMe1ucW XptQ== X-Gm-Message-State: AOJu0YynAZ8mcmeoTX0lUk2X3vJxlx1tRLWAlsINEo17YhHozHrqI07/ 4LKeudrJxKmP+tVK4JJF0YM+eQ== X-Received: by 2002:a5d:44ca:0:b0:31f:d52a:82af with SMTP id z10-20020a5d44ca000000b0031fd52a82afmr8678818wrr.49.1695740391015; Tue, 26 Sep 2023 07:59:51 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:686:c497:30b1:d2b9]) by smtp.gmail.com with ESMTPSA id s2-20020a5d5102000000b0031f82743e25sm14871634wrt.67.2023.09.26.07.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 07:59:50 -0700 (PDT) From: Bartosz Golaszewski To: Mika Westerberg , Andy Shevchenko , Linus Walleij , Daniel Scally , Hans de Goede , Mark Gross Cc: linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Bartosz Golaszewski Subject: [RFT PATCH 0/4] platform/x86: int3472: don't use gpiod_toggle_active_low() Date: Tue, 26 Sep 2023 16:59:39 +0200 Message-Id: <20230926145943.42814-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 26 Sep 2023 08:00:01 -0700 (PDT) From: Bartosz Golaszewski gpiod_toggle_active_low() is a badly designed API that should have never been used elsewhere then in the MMC code. And even there we should find a better solution. Replace the uses of it in the int3472 driver with the good old temporary lookup table trick. This is not very pretty either but it's the lesser evil. Bartosz Golaszewski (4): platform/x86: int3472: provide a helper for getting GPIOs from lookups platform/x86: int3472: led: don't use gpiod_toggle_active_low() platform/x86: int3472: clk_and_regulator: use GPIO lookup tables gpio: acpi: remove acpi_get_and_request_gpiod() drivers/gpio/gpiolib-acpi.c | 28 ------------------ .../x86/intel/int3472/clk_and_regulator.c | 22 ++++++-------- drivers/platform/x86/intel/int3472/common.c | 29 +++++++++++++++++++ drivers/platform/x86/intel/int3472/common.h | 9 ++++++ drivers/platform/x86/intel/int3472/led.c | 12 +++----- include/linux/gpio/consumer.h | 8 ----- 6 files changed, 51 insertions(+), 57 deletions(-) -- 2.39.2