Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2523666rdh; Wed, 27 Sep 2023 05:28:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeSjNhpK9+Oj/0tBXETxDZEMLo+R7wn9xk/blanla6tSmdKEJzJdImzS5cq5+ZEGZaAEE5 X-Received: by 2002:a05:6871:68e:b0:1b7:2d92:58d6 with SMTP id l14-20020a056871068e00b001b72d9258d6mr2428745oao.32.1695817680494; Wed, 27 Sep 2023 05:28:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695817680; cv=none; d=google.com; s=arc-20160816; b=HwsqF4hwLHhULHr5mPsHWzgIbHjNoh9luzpj4HZ7N15yrgl8gHa8oiIQw4w1Ml7vn1 hbe6MClTiz9NIFFCljQjEHmTzMYvw92U+a6yT0NsaC3E5RhxJhK5Az6TDgA8nTRAS8vS ZNWh2NsbvjDNNI44kTmtCaVaJJ3w3nvHNkMUl8nJmmm4NGdY03Wzf4PCmaSVltsMD4Hb 01mzOI5ZwPd72SX61wE7BMnWqOxuxBd6G6OVMtlBYyTCArtVvRHx0rBQqyW5dI1b96uF APCp4y6PyOrFHjrVULH7iTzm0FJdhq7o3WfaWiG50kWQC4bIevszzsqGf2a8GP7/77cP qMjA== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=dRjpHatXMpLPR28RDuixweakSgTj14YOtfkxYl7i+lQ=; fh=+J1tU8mYRS0tAzYCer2u4MwX4DmdoEjH6cAcxs8XMyc=; b=BMCzTuduEeCs4Zn2zXEazJDiQ6BV7oFiWI4zk6E4e2WN9n4f/nSIGV17/Ud4/NeSPL QcMRcMd+yaWYzEsGg6e0eFRcN8qrKb9Shok38wEAxPIBSBcRS3S8nrTh5ouhGwO8IXoC CLNMM9uRf6gH/Q1QQiCPSaxzwXdGG7T0IZL4QbgkNi4c4VKIeYKbLRymtlXKAP4RxeZA XwCiQ8LmROMVXmaAVMzxkYPnOSEgsQbLiGhK53rJ3hyXcDFeO6/B1UMZ2rRSmIvMRLtG 5DhI1IewnL3R8MsibFCKUU13UU8g04biTlaiMB/khjCcZlbbE+Aoe/lUQb6h5cRwKbsm g+gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KQ5k5EkJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id 63-20020a630142000000b005775a4a2961si15763886pgb.657.2023.09.27.05.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 05:28:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KQ5k5EkJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id D899D807BEC5; Wed, 27 Sep 2023 01:42:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230062AbjI0ImA (ORCPT + 99 others); Wed, 27 Sep 2023 04:42:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbjI0Il6 (ORCPT ); Wed, 27 Sep 2023 04:41:58 -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 65B3495 for ; Wed, 27 Sep 2023 01:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695804070; 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=dRjpHatXMpLPR28RDuixweakSgTj14YOtfkxYl7i+lQ=; b=KQ5k5EkJCseJgInAWsZbFeMA7Ie7bwV3f/cXopU5YQXDI0DC1Acbrui7yXzyW9h1ci/y1S RGG73L90HZ74MUI/YEs93NYtyraz3Ry+UUfJb9hVyHMyPUoxZTwVxmeaT4SB2qvONpTLpS l0JhcI5qH8sBv6QszmV0kStMSLc+CP8= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-683-cswk7xsBOXCvLIwZI5qSmQ-1; Wed, 27 Sep 2023 04:41:09 -0400 X-MC-Unique: cswk7xsBOXCvLIwZI5qSmQ-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-9a9e3f703dfso886581966b.1 for ; Wed, 27 Sep 2023 01:41:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695804068; x=1696408868; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dRjpHatXMpLPR28RDuixweakSgTj14YOtfkxYl7i+lQ=; b=vEGCC14stXPHlh7Sh0dChbqsT6uXJR0BMEvyXx/RGY0vb3G/PO6KsJ/8O93PdMOxYJ ZTEaA642WbNxZT2sMGomd+yT0XyrzPyv7Dzw4TTg9aVvVHeSTF81sddr1hVXx1hIAVHi hX01so5/aGGgqT2Br0Mw7tBXByy98RY2p1DstwlH08Kt8BvHewuYz6Zw3owCPa8xDQUa YWxhCAHknXF4gAxGUYOXbMmiOVKYs4OYa+CSy9F5rc/hFSgqzYbEXwqFWZs3z7OR2E1P hrttbO+PwiFgcbNPt/CSm3d0mUdy8fJlV6GqTA4l58kO5f/u/ZHWSH4g7rC1zkkzmGCz xg/A== X-Gm-Message-State: AOJu0Yzu5vnspcvBMIuimp7juCaWJ+Wp3jFOVrEaWqE8QyhQIgp4BmKT 6G+Y8mRYBgpdeDsKvpNOvxgdsnwHBLJzIH1vUr93Oni5IKUJPEEqUSwKx40DGWhhXZqUYS+/O/8 e8PBEMG+L1KXPgR6eWyhBfChZ X-Received: by 2002:a17:906:d6:b0:9ae:2f33:4ad0 with SMTP id 22-20020a17090600d600b009ae2f334ad0mr1286244eji.71.1695804067904; Wed, 27 Sep 2023 01:41:07 -0700 (PDT) X-Received: by 2002:a17:906:d6:b0:9ae:2f33:4ad0 with SMTP id 22-20020a17090600d600b009ae2f334ad0mr1286224eji.71.1695804067504; Wed, 27 Sep 2023 01:41:07 -0700 (PDT) Received: from [192.168.1.217] ([109.36.155.235]) by smtp.gmail.com with ESMTPSA id vb5-20020a170907d04500b009b299529709sm2262486ejc.132.2023.09.27.01.41.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Sep 2023 01:41:07 -0700 (PDT) Message-ID: <5e127422-1e09-816c-d956-d7afd7ed1c6d@redhat.com> Date: Wed, 27 Sep 2023 10:41:04 +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 From: Hans de Goede 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 01:42:10 -0700 (PDT) Hi, On 9/27/23 10:38, Hans de Goede wrote: > 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. I missed that 4/4 removes acpi_get_and_request_gpiod(), so I guess that this is not just only about removing gpiod_toggle_active_low() but also about removing gpiod_toggle_active_low() ? 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(-) >>