Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2917069rdh; Wed, 27 Sep 2023 17:53:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYblyN+6mS7ud13ttTK9fZT6ZEf/qxXy0Rz3WqYVJcKAUhKq1ZmF3ezeq03SJ10UYfyyIC X-Received: by 2002:a17:90b:38c6:b0:268:808:8e82 with SMTP id nn6-20020a17090b38c600b0026808088e82mr6017711pjb.1.1695862416722; Wed, 27 Sep 2023 17:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695862416; cv=none; d=google.com; s=arc-20160816; b=BEoq4Sooit1+biqK9pJ6fFvkZmxRAHBAaN1ZheCU6Jj81vfefWcogF0z5GBzebY6Ix TS2K2ZOrcqH8D/O6ryuE6GPODF0SJazy7jABrJkJkEmyvMF9S9j8miS4kFvA3uRFIm+S tkbqTsRTnEVRhP4jC+HVGVAAl9rMLXSEVEhbSfINEqpQJdQxu2txvgzX8OsMF+ABM0lv JKhxDTqbvSE/WSlmpbiu/LTMHhCb9OICNSIGvQnQpfD8b3y3VNWkutHbE8MqcjBzs55O eCR/mUT5Zgp+/0nB8WxUqbkFQda9a7ADNyLkU7FSpmecIuc1yHSMVFKgzgx0SvuNy10p ADbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=oFBFk293L3WpA/SF5GLh0iya0M5nZqt8LWn5s306O2o=; fh=+J1tU8mYRS0tAzYCer2u4MwX4DmdoEjH6cAcxs8XMyc=; b=AU1a5DIQ4gQi9lJZlOARVW1hqebuBjkOdVEQ3Qle1yMqAWkdc6DilC4gyG5U+CTjkU LLIwVEAc6eFA8ZMiT0H1c5QcLuSVNDHu9j4qkRzJEbQ/qofbYkd36cj7vJSK7s/P80NQ 3U1IBjTtdOfQSJLy138C42bZUUY4Qw4/iYWMbucBxXRfrvkTABGthQUULdZBDbq5+0Mf dN30HBdytSIfLKoOGTOYnbPqoUcUZZ0xtiuakWQgj1oEfGnlKtG0KL7pko5XSPSiLz5A OV+KseJDKseC6FJ6qHlYWYsFp9ZqAeCZ9t5/kdbvDWrxm5taxvp7CdGS8+Ib7Bj+fQOH 7R8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EKHdtYPR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id bk13-20020a17090b080d00b00276f10d241fsi11176422pjb.37.2023.09.27.17.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 17:53:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EKHdtYPR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9CCB18369F57; Wed, 27 Sep 2023 01:39:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230127AbjI0Ii6 (ORCPT + 99 others); Wed, 27 Sep 2023 04:38:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230125AbjI0Ii4 (ORCPT ); Wed, 27 Sep 2023 04:38:56 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 564EC95 for ; Wed, 27 Sep 2023 01:38:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695803892; 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=oFBFk293L3WpA/SF5GLh0iya0M5nZqt8LWn5s306O2o=; b=EKHdtYPRureqJduIGY9ufxO3zyAB2acAklipUj65F+JpDLs/Gvq12lAtWeYv19QvMh5W/X 931oV5o2mNU3MZ3C9CtrlNWOZ9NxBTtwVz3vdXAyFhPVDiE6o3OWSg3kjBJ7Ft4W7ueOR2 76yZPOX9DXSSRteGaZ0GgBD9wcykUDw= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-127-vF8QaEQGMF2B3es6KIT9ew-1; Wed, 27 Sep 2023 04:38:11 -0400 X-MC-Unique: vF8QaEQGMF2B3es6KIT9ew-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-99c8bbc902eso925077266b.1 for ; Wed, 27 Sep 2023 01:38:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695803890; x=1696408690; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oFBFk293L3WpA/SF5GLh0iya0M5nZqt8LWn5s306O2o=; b=cpE00KnuSjk3Af3eAr7j7qDQFJoyiVM/VfszDSG1IHDNeg0+1QTqbCo9iBo/sqDE5T s+xRWaz71YAkNA9K1lVd5w78mYZ18bG21RRZzJPlaBwMbubBDYzN2McjCjuUFGHhth0k e8sNJRrfy5UE5Ie7MXZFlsu6ocnlOcPKTWcNpRSLdhpcAoHIxTsQpSmP01rwlWBKDZ8r RRkW1Cd3k/oSNd/uBT0U4qCnGTJDaImOcDlRHGcyIdIUM4z25c3idPNjuzRS3S7cf5hl Xq+UMapG2lPo9dWyarePDWsP3uh7+ApOuMS+yhq8sxCYFgTL3zcQzkcOI+Y1LzWXvdFC PRYQ== X-Gm-Message-State: AOJu0Yz6VsicA1rVo2YfI3UMi9f2TMqGmRqMo5jGwYYLj9849NpSG/zC wvR8sY5Mimj0G1ykD/Oj0uIudUYaKKCV5LxUqT7ZtEdgbSjHj+Nc4oz7gNjNcQT29zPRu/aWN81 xvs5pY84sTAitgQewHHirs3yV X-Received: by 2002:a05:6402:6da:b0:530:9fbc:8df5 with SMTP id n26-20020a05640206da00b005309fbc8df5mr1352485edy.9.1695803889949; Wed, 27 Sep 2023 01:38:09 -0700 (PDT) X-Received: by 2002:a05:6402:6da:b0:530:9fbc:8df5 with SMTP id n26-20020a05640206da00b005309fbc8df5mr1352472edy.9.1695803889612; Wed, 27 Sep 2023 01:38:09 -0700 (PDT) Received: from [192.168.1.217] ([109.36.155.235]) by smtp.gmail.com with ESMTPSA id x62-20020a50bac4000000b0053443c8fd90sm2645885ede.24.2023.09.27.01.38.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Sep 2023 01:38:08 -0700 (PDT) Message-ID: Date: Wed, 27 Sep 2023 10:38:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [RFT PATCH 0/4] platform/x86: int3472: don't use gpiod_toggle_active_low() Content-Language: en-US To: Bartosz Golaszewski , Mika Westerberg , Andy Shevchenko , Linus Walleij , Daniel Scally , 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 References: <20230926145943.42814-1-brgl@bgdev.pl> From: Hans de Goede In-Reply-To: <20230926145943.42814-1-brgl@bgdev.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (howler.vger.email [0.0.0.0]); Wed, 27 Sep 2023 01:39:01 -0700 (PDT) Hi Bartosz, On 9/26/23 16:59, Bartosz Golaszewski wrote: > 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. I saw your previous proposal which added a new api to directly set the active_low flag, rather then toggle it. I intended to reply to that thread to say that I liked that approach, but I don't remember if I actually did reply. I wonder what made you abandon the new function to directly set the active-low flag on a gpio_desc? For the int3472 code that would work pretty well and it would be much cleaner then the temp gpio-lookup approach. Regards, Hans > > 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(-) >