From mboxrd@z Thu Jan 1 00:00:00 1970 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 170AFC77B7F for ; Wed, 17 May 2023 09:59:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230172AbjEQJ7M (ORCPT ); Wed, 17 May 2023 05:59:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbjEQJ7L (ORCPT ); Wed, 17 May 2023 05:59:11 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7533420B for ; Wed, 17 May 2023 02:59:00 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f4271185daso5500425e9.2 for ; Wed, 17 May 2023 02:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1684317539; x=1686909539; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3ai+XJcD6q02E74/RveX4hPtq3MlwXKz1QHBcBUcFNo=; b=NYPWtNMpM/bWn2LM8NEIe3TP3xMkwDSnDKxRs2mcUsAWBI5r8202lrNKrOzFsUDasn 9qiOQRjjWpzU0A5euUFl5+yUgZ/Hed1+v/UwQ//qMwAb1jsJrLmQOJZLUNJUnI9sGwJA LSUbHAtu37E7Im/L4tRgnb9Gnq6UtI9e2Y+cbV6EHrwmxQ0tqMkqyecNaq1RC6wdGV9O hYabnvN5IBi27WEdrUVSk5FAF9RIEAiLSul39oFq5TTo2ndOEq6SxYk9B3GssMwTPhae XiCB3XSCcAJBaBWgtsd2MI8m2jpzyANAAmbezvyI5GbRDhgNoe5POlyUH/9pR2287gd8 44MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684317539; x=1686909539; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=3ai+XJcD6q02E74/RveX4hPtq3MlwXKz1QHBcBUcFNo=; b=J31GBTcCKaHlBND3OSMcLcPJcuLh1Z2OPFNEm44Ny36JrAVt5SFRj52Ci80BIPaULw kVfMcqAswTfIqWFOW6SYcxTXvGRKIcquptzxMxn0+/D+dvZBWRSkD/HT3ApRwgjzHW94 pA7HnIC18m8tGnntZhBcDWal6IUy4NeSfD/Oqidaou5lqLL3/chS5fvLql+HP4Fguya/ vjyw/ZIojWd+aTYsbok2hQY6wJm9CQJInLZOC6VgfAObxr1xOMonaduHr3Qi4lBdWkcp f7/dqBCNPI7ZOO/z1jDfjvwO/B3ZEvc0SNa4l5A26PJuOi9mUwUhwV3RSj5qeH8Ma1yR 0AHA== X-Gm-Message-State: AC+VfDyCjM2SWumx7MK2RXcx8hOVM7xy3JflfXFot5v1DdRz2sa0kAeK lnEGicnOG1HFtL9ZBHp7iKFuUg== X-Google-Smtp-Source: ACHHUZ7ICZHWcsgX6bdkWaWTOXtSGTkJT7t+F6SP7Yq+8hpaG9+L8EAdtndZiwXg4Vpj2czekB/cPw== X-Received: by 2002:a1c:4c08:0:b0:3f4:2737:a016 with SMTP id z8-20020a1c4c08000000b003f42737a016mr20100741wmf.29.1684317538966; Wed, 17 May 2023 02:58:58 -0700 (PDT) Received: from localhost ([2a01:e0a:28d:66d0:5b2e:1428:59f1:44a4]) by smtp.gmail.com with ESMTPSA id z3-20020a5d6543000000b002fda1b12a0bsm2237051wrv.2.2023.05.17.02.58.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 May 2023 02:58:58 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 17 May 2023 11:58:57 +0200 Message-Id: From: "Esteban Blanc" To: "Andy Shevchenko" Cc: , , , , , , , , , , , , Subject: Re: [PATCH v4 2/3] pinctrl: tps6594: Add driver for TPS6594 pinctrl and GPIOs X-Mailer: aerc 0.14.0 References: <20230512141755.1712358-1-eblanc@baylibre.com> <20230512141755.1712358-3-eblanc@baylibre.com> In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Tue May 16, 2023 at 6:48 PM CEST, Andy Shevchenko wrote: > On Tue, May 16, 2023 at 4:05=E2=80=AFPM Esteban Blanc wrote: > > On Fri May 12, 2023 at 7:07 PM CEST, wrote: > > > Fri, May 12, 2023 at 04:17:54PM +0200, Esteban Blanc kirjoitti: ... > > > > -#define TPS6594_REG_GPIOX_CONF(gpio_inst) (0x31 + (gpio_i= nst)) > > > > +#define TPS6594_REG_GPIO1_CONF 0x31 > > > > +#define TPS6594_REG_GPIOX_CONF(gpio_inst) (TPS6594_REG_GPIO1_CONF= + (gpio_inst)) > > > > > > Why? The original code with parameter 0 will issue the same. > > > > I felt that replacing 0x31 with a constant would make the computation > > in TPS6594_REG_GPIOX_CONFIG more understandable. What do you think? > > The question is why that register is so special that you need to have > it as a constant explicitly? It is not special, it's just the first one of the serie of config registers. I felt like just having 0x31 without context was a bit weird Best regards, --=20 Esteban Blanc BayLibre