Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3462536rdb; Wed, 13 Sep 2023 12:47:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEPofq0oadZlFfzApJnBwtUsZ+33+Uznz8kwzmsy+fz+A+LD2f+oxPrEQORMZefZluIjavp X-Received: by 2002:a05:6358:3414:b0:132:d333:4a5c with SMTP id h20-20020a056358341400b00132d3334a5cmr4238545rwd.10.1694634457442; Wed, 13 Sep 2023 12:47:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694634457; cv=none; d=google.com; s=arc-20160816; b=R6Cmi4DE6u5JQHeQB8X2+6TblBfbVJfb0lN8oA18z/WU3sp0N10f4OjG2RVwu6Saet AQk0tQVJsSDmFhNBT8P9iUJkF+KrKWOk45ZiJ5vp2Nm7M4PAnLWTFP/KAq20nn6AqJwR meOjOZyPCtysKdEQ+lm8MCNt+VAO1fFzLO+UqGEMDLWd82IRXiut7GGJiA4auIYZAydW b/JszsmIY3oucZKGb8C1+3kuT47pNLp3z3AsvWi7IvJMcUZb52Li4S5tQN/3mHdQIRNp grZCgAp1htfJwIi5YqNH2bwUksBPleaNDX2ZmMAO//8dkNkzrgN/FX65zS8EBmsY+jrr LKlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=vCKxnDesqkrsZ7yc2N/Fu7/OJ4drr6VqYcEJHvcodks=; fh=VrCUDjEcZ8Ampwp0xEDw2W55zIH1no7/VhHEY2CfYKc=; b=F+ghiau7/0CUWnglIg92U9HJztQCb5AxhEXpY5qArW1b8iDt04K2RYeIX4d0SIo2iS KTq6h95glUDadkquyw4bwHm0CES87kJlTPWXRzqNPMPPurQpkyqz/NpxomeEqNEhoeaC DBRuvpv5KkSkLQBOFhRQehnMILcYHHa7MFTw2STetA54lmOqIIcJXQ9lAuOB3S+tGEVA Bj++fVU+tQ5bczA4VnXeIHhtwJuQGvVcjWjGefFemdInu+s9i8jTOskDLQd+fXpV7ieg ctNcSDBO2zUVIy76wy9Ca/nPuuXHxjOUyG7u0wJDLsP1Uj1sAeDJDsAFeIKh19vv0GMk WPiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vxKbfQLA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id k129-20020a632487000000b0056379ae7b03si10507602pgk.71.2023.09.13.12.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 12:47:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vxKbfQLA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id A66FA827043C; Wed, 13 Sep 2023 05:24:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235846AbjIMMYp (ORCPT + 99 others); Wed, 13 Sep 2023 08:24:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236266AbjIMMYo (ORCPT ); Wed, 13 Sep 2023 08:24:44 -0400 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1099219B4 for ; Wed, 13 Sep 2023 05:24:40 -0700 (PDT) Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-d8164e661abso412672276.1 for ; Wed, 13 Sep 2023 05:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694607879; x=1695212679; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vCKxnDesqkrsZ7yc2N/Fu7/OJ4drr6VqYcEJHvcodks=; b=vxKbfQLARYe7n9PhA60DoNm/TpOCGp1cbwa8vsAyFYwt9+QX0e6Rd/v+qcx90xwS0v /ujR3QhO8OqxjR4ovDwYatXhXKB2Yy0ePiL5I6TXJoSd/YtaseNrqvQWZ//ABUlwyD1C 4Pcr8elDKTrFT2MXB9jlVcAwLArzWqeBYhMzsLW39lBZFtcDBN48j9tR+fzUqB4KEiQe H4CVs6zQeYvQQig6UMoWR8O0KRXyd7Aalk6wcYsMisQlzsCjewZCxDar6d0vNik/cuhY HR8UcOebcA7eJdyy9Z0HDsCoNCzbQCK666ysqUjaN/mYdF057B8glJaRp+JUuGTq5BMl Q5mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694607879; x=1695212679; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vCKxnDesqkrsZ7yc2N/Fu7/OJ4drr6VqYcEJHvcodks=; b=sSuONxpUclqjkP1TWCM+uliB3DOWh572wOiiIH1nsOleWpDGqEaNfEaK99fl/vOKLx PO6AQPYOoUjsh9Vp0cQajlZC6rgr2brxZSnvfDYgCXeGos3+k3HSKp25AsQUdpveOEQT XLChd2M+Shf5zrr0/zr6NtJj1/y3pLUbvef1es9SC3c0BXM+06h849IihYC7RO28duBC YdQFAbf77F9UXq00Ge1Su4rrqkUnpMcrHWAmbdGVyuZLgdhqNZzfiToRGI3f4fMtjPgf GatAZZNZYMDkZqAbkpSq8pd4Id2TikrEE+Xp+RlVVTTGx37/pDEhX2uawq9/7LRIlAjT LqNg== X-Gm-Message-State: AOJu0YwjU8akku4wrRsuCRIKnug2BCjYkdk0TYbgthuM1XaLS2JjvVym Uuam5xjJzC3xnN2yyP5edgWqaFw/hmuu8U9R+haV/Q== X-Received: by 2002:a25:da06:0:b0:d81:70b6:c24b with SMTP id n6-20020a25da06000000b00d8170b6c24bmr686830ybf.19.1694607878656; Wed, 13 Sep 2023 05:24:38 -0700 (PDT) MIME-Version: 1.0 References: <20230913115001.23183-1-brgl@bgdev.pl> <20230913115001.23183-4-brgl@bgdev.pl> In-Reply-To: <20230913115001.23183-4-brgl@bgdev.pl> From: Linus Walleij Date: Wed, 13 Sep 2023 14:24:27 +0200 Message-ID: Subject: Re: [PATCH 3/5] mmc: slot-gpio: use gpiod_set_active_[low|high]() To: Bartosz Golaszewski Cc: Andy Shevchenko , Ulf Hansson , Paul Cercueil , Harvey Hunt , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Daniel Scally , Hans de Goede , Mark Gross , Heiner Kallweit , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mips@vger.kernel.org, linux-mtd@lists.infradead.org, platform-driver-x86@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 (fry.vger.email [0.0.0.0]); Wed, 13 Sep 2023 05:24:50 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 fry.vger.email On Wed, Sep 13, 2023 at 1:50=E2=80=AFPM Bartosz Golaszewski = wrote: > From: Bartosz Golaszewski > > We have new, less cumbersome and clearer interfaces for controlling GPIO > polarity. Use them in the MMC code. > > Signed-off-by: Bartosz Golaszewski I like the looks of the code better, obviously but this looks like this for a reason unfortunately. See the following from Documentation/devicetree/bindings/mmc/mmc-controller.yaml: # CD and WP lines can be implemented on the hardware in one of two # ways: as GPIOs, specified in cd-gpios and wp-gpios properties, or # as dedicated pins. Polarity of dedicated pins can be specified, # using *-inverted properties. GPIO polarity can also be specified # using the GPIO_ACTIVE_LOW flag. This creates an ambiguity in the # latter case. We choose to use the XOR logic for GPIO CD and WP # lines. This means, the two properties are "superimposed," for # example leaving the GPIO_ACTIVE_LOW flag clear and specifying the # respective *-inverted property property results in a # double-inversion and actually means the "normal" line polarity is # in effect. Will you still provide the desired "double inversion" after this patch? Yours, Linus Walleij