Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7095979rwd; Tue, 6 Jun 2023 06:23:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ZJKfZ2O5WTwWyuxaIlHpjr0v7ZNsjB5l/RAy0MYHjzDoU0LJUNDduXQemedvlhESZd3hz X-Received: by 2002:a17:90a:4c84:b0:253:3975:7a37 with SMTP id k4-20020a17090a4c8400b0025339757a37mr13049482pjh.9.1686057787775; Tue, 06 Jun 2023 06:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686057787; cv=none; d=google.com; s=arc-20160816; b=Bj44zrYs6ccQkFqKXvPD/p4FYNbLZ8GQ2Gvj7lanu1KQCbjqZWJWhPNHDcn+/V3lMW NRIWc5lhRHB1DRAYV3t4Quj0aYZJS3hgCHCHZ73voOTGcG9dWkP4uuUhOa7KU4V3MsCS M1fvs3Ug2yGYIIlI8AQeWoDEhiDzAu7eV6fh/HBM8C9J7xV49nr/V9WQB0xGIRE7Yhil 3jE86REhxPgCB2yBvHYjSwG7RaN61a2iwfl5qdT33daj273hJSIod+GuO6Xo/VzTus37 NsahKR7Ngh+yJfNUDe3GthsE4SqnaG/EL3hK/mdvd53wmZM88ydcFNb1VmbR+QQ91LAg xCaw== 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=YacwtbnUno0IGNzrMAEltE3NymQuYjNoVttmwVMJWAM=; b=TUy73eoVQbMhijATXubatw2Zx6DD37hnpNDRLoJKjJChLO6KnFKkf7XnunnEqTzI59 EC7DLSxkenai8Ps9LR/VueLvCkUxWTS6Hp37bF2EOOOxcbvaznwcpXwDkkbne7CqqPtP 4CPM6sK3bx6KLwh3QrId9aqoYQM8qFi76suEQdXZEgsllDyjFsogvPscoz9fi1f8GxuX 0Frf07Uz7GCpgtsK+E/2vQnK5uCwHMGwEkpUxTEkttOpW1ZG3sW028k4JDlPWh5/mVhR dxVNrlisISXLT7Be3yFp/PGv1T5PiuFGVrLAB4mAQOWPer4564x/gfXFzMRj0i7Mry8R mnZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=ZlqhXZ+5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c11-20020a63724b000000b0053f4a727da6si7098245pgn.563.2023.06.06.06.22.54; Tue, 06 Jun 2023 06:23:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=ZlqhXZ+5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237573AbjFFMrL (ORCPT + 99 others); Tue, 6 Jun 2023 08:47:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237710AbjFFMq6 (ORCPT ); Tue, 6 Jun 2023 08:46:58 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23C2210C3 for ; Tue, 6 Jun 2023 05:46:29 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5148e4a2f17so9227849a12.1 for ; Tue, 06 Jun 2023 05:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1686055553; x=1688647553; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=YacwtbnUno0IGNzrMAEltE3NymQuYjNoVttmwVMJWAM=; b=ZlqhXZ+5hvJZyt81cQ47SzdYh7TH5Bq/KejcuVjBkAQQd8xffF80kYVHwn0ym1SEgK W7txtUblLRMywAwK4tjH6N0jvjFXskKYA2/02RudaMyqMM3Wtk5Iacyol7+QQHN5nZG1 mCFgHniUKLMyL6kYE57KeedzCsmTXQy4Azm1kn49BGpsyzO1KdvMJl8N/tn8HKTXNb4E 42rQwEktOQG1BCmKp8Q2ZqjGLO/irSD2Hn1H1gbQMKgF6Q2dtd7LT6z2MGPNUkz9zB2x vr0WnaCpaqUoRdBCKiEy+UMOUmIYZXtHP3GlVvOtNaC0aEc5rLdoFANkaxteBnN5psVC 5QdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686055553; x=1688647553; 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=YacwtbnUno0IGNzrMAEltE3NymQuYjNoVttmwVMJWAM=; b=Nd/SDV//Hi5ITKLMqjz0b2YBVHnfqG2I+xECoHFOgIO3m8CkDtjeBUBq597WKh/QTw ZFBx3LAwh6EAw4wjZL6+zh7hl9AVERuhCtAUxXny4JYxptnUZpixiYXQjVcKxiaH30yi KG7+Pg2zJL4R/Qt0rj24fzwCkFhdx0m7NYzTZ5K5IH14jD78PQAXknpUHUbtU4srrGil iHC1jPUbJkb7GniRZ8rWjx1oYqG5YFeo35CB2ZPH+i19HzSlyOxqZ6zm8YSuofAkaZ8n jqbBP9eJ5nyrqCRmO6xXRE9sEcgexE4wNNEfxbWdWhuCUrARM9cUSBVHIHBszae7Vm4G NwMg== X-Gm-Message-State: AC+VfDzqy5fg+6JBeuNDqpbu86fSa7hpC9ftH1CqAKY4z6nxGm5YKxmn 2kkaJbplPpGb0Fgo6616Dhjptw== X-Received: by 2002:a17:906:58d4:b0:977:d53e:4055 with SMTP id e20-20020a17090658d400b00977d53e4055mr2433962ejs.58.1686055553367; Tue, 06 Jun 2023 05:45:53 -0700 (PDT) Received: from [10.2.5.28] (abordeaux-655-1-129-86.w90-5.abo.wanadoo.fr. [90.5.10.86]) by smtp.gmail.com with ESMTPSA id g19-20020a170906869300b0097461a7ebdcsm5500768ejx.82.2023.06.06.05.45.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jun 2023 05:45:52 -0700 (PDT) Message-ID: Date: Tue, 6 Jun 2023 14:45:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v4 1/2] gpio: tps65219: add GPIO support for TPS65219 PMIC Content-Language: en-US To: andy.shevchenko@gmail.com Cc: Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Lee Jones , khilman@baylibre.com, msp@baylibre.com, francesco@dolcini.it, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, Jonathan Cormier References: <20230511-tps65219-add-gpio-support-v4-0-b5d6a764d722@baylibre.com> <20230511-tps65219-add-gpio-support-v4-1-b5d6a764d722@baylibre.com> From: jerome Neanne In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 On 30/05/2023 13:07, andy.shevchenko@gmail.com wrote: > Tue, May 30, 2023 at 09:59:59AM +0200, Jerome Neanne kirjoitti: > > First of all, I have a bit of déjà vu that I have given already some comments > that left neither answered nor addressed. Sorry for that. I did not realized that some comments on the cover letter also apply to commit message. > >> Add support for TPS65219 PMICs GPIO interface. >> >> 3 GPIO pins: >> - GPIO0 only is IO but input mode reserved for MULTI_DEVICE_ENABLE usage >> - GPIO1 and GPIO2 are Output only and referred as GPO1 and GPO2 in spec >> >> GPIO0 is statically configured as input or output prior to Linux boot. >> it is used for MULTI_DEVICE_ENABLE function. >> This setting is statically configured by NVM. >> GPIO0 can't be used as a generic GPIO (specification Table 8-34). >> It's either a GPO when MULTI_DEVICE_EN=0 or a GPI when MULTI_DEVICE_EN=1. >> >> Datasheet describes specific usage for non standard GPIO. >> Link: https://www.ti.com/lit/ds/symlink/tps65219.pdf > > Can you convert this to be a Datasheet tag? Currently even Link is *not* a tag > because there must be no blank lines in the tag block. > >> Co-developed-by: Jonathan Cormier >> Signed-off-by: Jonathan Cormier >> Signed-off-by: Jerome Neanne > I misinterpreted this comment. I looked at wrong examples but I think I understand now that the right usage is to have all the tags grouped together into one block which is delimited by blank lines before and after the whole block. I'll then do this and put all the Datasheet/Link into the tag block. Stop putting Links inside the commit message right after I refer to it. https://www.kernel.org/doc/html/latest/process/5.Posting.html#patch-formatting-and-changelogs > ... > >> + help >> + Select this option to enable GPIO driver for the TPS65219 chip family. >> + GPIO0 is statically configured as input or output prior to Linux boot. >> + It is used for MULTI_DEVICE_ENABLE function. >> + This setting is statically configured by NVM. >> + GPIO0 can't be used as a generic GPIO. >> + It's either a GPO when MULTI_DEVICE_EN=0 or a GPI when MULTI_DEVICE_EN=1. >> + >> + This driver can also be built as a module. >> + If so, the module will be called gpio_tps65219. > > Random indentation. Can you use as much room as available on each line, please? Sure for next iteration, I choosed 80 columns here to stay consistent with other configs. I kept a carriage return after the first sentence like it is done for other descriptions. This driver can also be built as a module... is separated with a blank line as it is done in all other configs. For all the other lines, I now keep the same line until last word strictly exceed column 80. > >> @@ -0,0 +1,181 @@ >> +// SPDX-License-Identifier: GPL-2.0 >> +/* >> + * GPIO driver for TI TPS65219 PMICs >> + * >> + * Copyright (C) 2022 Texas Instruments Incorporated - http://www.ti.com/ >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include > > ... > >> +static int tps65219_gpio_get(struct gpio_chip *gc, unsigned int offset) >> +{ >> + struct tps65219_gpio *gpio = gpiochip_get_data(gc); >> + struct device *dev = gpio->tps->dev; >> + int ret, val; >> + >> + if (offset != TPS65219_GPIO0_IDX) { >> + dev_err(dev, "GPIO%d is output only, cannot get\n", offset); > >> + return -EOPNOTSUPP; > > This seems blind following the checkpatch false warning. The checkpatch does > not know about subsystem details, i.e. GPIOLIB uses ENOTSUPP in the callbacks. > The userspace won't see that as GPIOLIB takes care of translating it when > needed. > Thanks for explaining, I'm often in trouble for choosing the error code. I'll replace here and all other places where it's used with EOPNOTSUPP. Regards, Jerome