Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp609600rwe; Wed, 24 Aug 2022 06:28:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR60AbW9pKnZDyGXj40+EGcfvPtakdrs3StMS9G6t5VvxLDQEGshjUoLAFDClSrY1wpGo2PJ X-Received: by 2002:a63:86c7:0:b0:42b:2991:dd61 with SMTP id x190-20020a6386c7000000b0042b2991dd61mr1404566pgd.3.1661347693913; Wed, 24 Aug 2022 06:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661347693; cv=none; d=google.com; s=arc-20160816; b=ERS0YWWq9dU7DfFFFTwiCvLOtKynFR5q6jWFYFyyHPjWmV02T9MAczNBe5cXfDftj+ DtSj3k4Yaf6jVlsck8MbI3ryhVhBrHSEaXvKx92YZYbZFYFtOn158aqPBaHuMOrZa94Z aNRUBGGAQmbOrOFSkpB2b/hedESsW/Nt5Wl/q7OzDZDoEkP6jjYH8UES+3S8nK68nCRw cl+k5FpnQepgo/RXhATO+e0lwLsyIbv2EBimUO0QDx8UqK0QUY1z17/Zi+o1+8xNnlXn VCvkevkgVXIM6lP2c3Jn75UQPxysA3IdEdRsHq8lKQcSNLZMgUNv4INgYbx/O/VlxuGo cCkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ajUZU00XjO/OJZtV3ygXW260E2F5JYQOqZVwxems1WY=; b=j8ADrtMNizbQ9lEIiTybZYtkVFgyu+cZzjGPeW3RAOVbu//TY9mnoeriHB/7p1uuAl 4Ix/SXCqUHhv5x56ACbOkWHVIMj5EoqXwPJdGoMFaYjTrOxGaX17R14up0d7e4Uwxiji YshJQUk+hxD5WmI2W/VQXjBhYjerCYDX8/T+kKEi14HVPOU9yvenDpEb0ViiNFwRHe2s V8zNJVmU0BDMs7RMKQM8LIO9/9Az7hK/mLt4Oq31gptLT9dVjhv3AZ1w1xfLClJltMRe I5ncErdLBQZntN9eQzKLAqpMVuRmuSTb3gmRkC2WNufY/yFrZGIFQi7bDXs1Kseyr+JN GS4w== ARC-Authentication-Results: i=1; mx.google.com; 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 q190-20020a632ac7000000b0042b20426194si1381581pgq.597.2022.08.24.06.28.02; Wed, 24 Aug 2022 06:28:13 -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; 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 S238099AbiHXNM0 (ORCPT + 99 others); Wed, 24 Aug 2022 09:12:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236868AbiHXNMX (ORCPT ); Wed, 24 Aug 2022 09:12:23 -0400 Received: from vm3.sequanux.org (static.55.155.9.5.clients.your-server.de [5.9.155.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 41AAD2528C; Wed, 24 Aug 2022 06:12:19 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by vm3.sequanux.org (Postfix) with ESMTP id 39C861086FC; Wed, 24 Aug 2022 15:11:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at vm3.sequanux.org Received: from vm3.sequanux.org ([127.0.0.1]) by localhost (vm3.sequanux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zQp53rYCUOcO; Wed, 24 Aug 2022 15:11:09 +0200 (CEST) Received: from localhost (softwrestling.org [95.216.36.37]) by vm3.sequanux.org (Postfix) with ESMTPSA id 54B0A1086F3; Wed, 24 Aug 2022 15:11:09 +0200 (CEST) Date: Wed, 24 Aug 2022 15:10:55 +0200 From: simon.guinot@sequanux.org To: Henning Schild Cc: Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , Pavel Machek , Hans de Goede , Mark Gross , Lee Jones , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, platform-driver-x86@vger.kernel.org, Sheng-Yuan Huang , Tasanakorn Phaipool Subject: Re: [PATCH v4 1/5] gpio-f7188x: Add GPIO support for Nuvoton NCT6116 Message-ID: References: <20220823102344.17624-1-henning.schild@siemens.com> <20220823102344.17624-2-henning.schild@siemens.com> <20220823165459.143e1c30@md1za8fc.ad001.siemens.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oXah1uCHx1gQcfsk" Content-Disposition: inline In-Reply-To: <20220823165459.143e1c30@md1za8fc.ad001.siemens.net> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 --oXah1uCHx1gQcfsk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 23, 2022 at 04:54:59PM +0200, Henning Schild wrote: > Am Tue, 23 Aug 2022 17:47:38 +0300 > schrieb Andy Shevchenko : Hi Andy, Thanks for this new version. It is looking good to me. >=20 > > On Tue, Aug 23, 2022 at 12:23:40PM +0200, Henning Schild wrote: > > > Add GPIO support for Nuvoton NCT6116 chip. Nuvoton SuperIO chips are > > > very similar to the ones from Fintek. In other subsystems they also > > > share drivers and are called a family of drivers. > > >=20 > > > For the GPIO subsystem the only difference is that the direction > > > bit is reversed and that there is only one data bit per pin. On the > > > SuperIO level the logical device is another one. > > >=20 > > > On a chip level we do not have a manufacturer ID to check and also > > > no revision. =20 > >=20 > > ... > >=20 > > > - * GPIO driver for Fintek Super-I/O F71869, F71869A, F71882, > > > F71889 and F81866 > > > + * GPIO driver for Fintek and Nuvoton Super-I/O chips =20 > >=20 > > I'm not sure it's good idea to drop it from here. It means reader has > > to get this info in a hard way. > >=20 > > ... >=20 > Let us see what others say. I wanted to keep this in line with what > Kconfig says and the oneliner in the Kconfig was getting pretty > longish. Hence i decided to shorten that. Other drivers also seem to > not list all the possible chips in many places, it is all maint effort > when a new chips is added and the list is in like 5 places. I agree with you that we can drop this line. It was already incomplete and the information is quite readable a few lines below in both the define list and the chip enumeration. >=20 > > > +#define gpio_dir_invert(type) ((type) =3D=3D nct6116d) > > > +#define gpio_data_single(type) ((type) =3D=3D nct6116d) =20 > >=20 > > What's prevents us to add a proper prefix to these? I don't like the > > idea of them having "gpio" prefix. > >=20 > > ... > >=20 > > > + pr_info(DRVNAME ": Unsupported device 0x%04x\n", > > > devid); > > > + pr_debug(DRVNAME ": Not a Fintek device at > > > 0x%08x\n", addr); > > > + pr_info(DRVNAME ": Found %s at %#x\n", > > > + pr_info(DRVNAME ": revision %d\n", =20 > >=20 > > Can we, please, utilize pr_fmt()? > >=20 > > > + (int)superio_inb(addr, > > > SIO_FINTEK_DEVREV)); =20 > >=20 > > Explicit casting in printf() means wrong specifier in 99% of cases. > >=20 >=20 > For all the other comments i will wait for a second opinion. I > specifically did not change existing code for more than the functional > changes needed. And a bit of checkpatch.pl fixing. > Beautification could be done on the way but would only cause > inconsistency. That driver is what it is, if someone wants to overhaul > the style ... that should be another patch. One likely not coming from > me. About the int cast, I think you can drop it while you are updating this line. It is unneeded. I have no opinion on the other comments and I am OK with the rest of the patch. Simon --oXah1uCHx1gQcfsk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEXW8DgovlR3VS5hA0zyg/RDPmszoFAmMGI1wACgkQzyg/RDPm szpRXg/7Bc/p3Mo8tT9pE8PJ+uGU+jNsiByhYWbZXSvPuJEo4HD6MO+Fq7pxjvct mELhzHu4BXGj7tciezcnblJUElyCaTxF4HTxnuPj0TKCi1f3W/uRaIEffpC1EIb7 HZFI6GlNTMASm3KVyKEZKeyb7KxDzW0cyWyASMH1mOcyMZGPU5/So/DEvO3LSgSo MxqvhF2P8lNZKQj0eFuuKy7CCthNo8peWuNO/rZ4zxkglGQvHy2cj2qIVBydWYtn SBkjVqE7oXR1IiH1z3yQUu7W9p5xolAmKhtw/EaEFpNnM8Nq3GgAOqT94YyME3Nz PgUW4kxF9Svj2bJSAqzV9k4eBLsHBCIfUEOePNRbXTCnAKGXuuvzy/zAPggHG3k6 i8X/J0EF1NBngbrQW1WaIFE1OZ0QVooharFQWdHFNjB0X6adE++Bqxr0fImgqB4Y 1JXQJx4W27cJM/6zY0HLvqKypvktcaHNg6uZn3dkY1DJqsnfGkrkktF9Amr25+CC vZDcfO3lvTEWY1fB9BdWQDaSljhu0YbuCrbQmsWIuYCpRc+3m9ggGPeg6QtxZDv6 VOkHADAryaFgOYXuvKb0GXV3gEoOFGKKAUlJpFe/UHgPyMNzBuh6ufPQMsqCUhEl fVJyF0MhZ74mGAz6PUFw6SrlevMR8JgpGdb1NKxbasMav5moBxY= =nfkO -----END PGP SIGNATURE----- --oXah1uCHx1gQcfsk--