Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3517972rwb; Tue, 8 Nov 2022 05:34:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf467eJvcURMSYuuYHVBONbTw69sgFu6pnxFIAOUpbU0svHT+XzONOojYwjK7YUgWXfvWNI8 X-Received: by 2002:a05:6402:530d:b0:463:b0cb:50e5 with SMTP id eo13-20020a056402530d00b00463b0cb50e5mr3450402edb.45.1667914486233; Tue, 08 Nov 2022 05:34:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667914486; cv=none; d=google.com; s=arc-20160816; b=gsySM+g7EfMiYqh4EyHSGfSP0M8ppsfF7YVGeGYP8tX3bAy7BZJ+xs2p1tUfTP1Sfk gVTjwJ6n88mQ+keqSOrriIi0r/Ln9xio8EALttVsEkthixJT4PU7GrmTpM5q99XHNM3o DNd1YWW9mzrV7jizXLtQDKdPAbfu3+iS26B/3BzU7vvJG+/7joK3IC/wzKbF9JmtKtVR L+99NhVJvX1g+Iyp42pd/YZ16G5YjYpeo/fCVOahkOdSciLA5i8OCT5/jmWr3jO7D+Hl 1IWc/rwOzhx++OS35SJ0oqrj+tFQSwqsSXH8utnBKzu1RN/SCXtPn7jG6jG1GQnZKu8C VP/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=o3T20fdGbELUpw/30bYXW9rk8UUViyvlGwNQtDEeL60=; b=TlyvtGxpJunRE1zunLt3gD+oOtcJ5vAtoXXki4Z+sfnb3cI0svO03hM0NXRdKSrLMA urN+M0/ThiTseWm9uBrUvNiIoTfR27Djpx1H7trnK/bNBmuNm+lum7iXh9yAlLB0Sa/5 Vy9hf4EYmb92smZF74Iq/qb/3ws2+ah8uAmtlUy72KFX1w/I2TCdIkAkx/PMmczIPD7R oiiak1KRFtZ6UeOdbW4uHfh5Url3iah+vfpxc1PyRWgLvIXN2+l3JQyxxKIyrps4i4nH sK5dcyrpBWc2vw/keevYi8HsOUkcLk79wMIDSI5v6h/m+uvMs3aFyr5PlsvEx3HmH51E 5JUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HftOwyrt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oq19-20020a170906cc9300b0078772382b35si9649575ejb.91.2022.11.08.05.34.23; Tue, 08 Nov 2022 05:34:46 -0800 (PST) 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=@linaro.org header.s=google header.b=HftOwyrt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233980AbiKHNDt (ORCPT + 89 others); Tue, 8 Nov 2022 08:03:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234436AbiKHNDS (ORCPT ); Tue, 8 Nov 2022 08:03:18 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8278E5800C for ; Tue, 8 Nov 2022 05:03:03 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id i21so22332292edj.10 for ; Tue, 08 Nov 2022 05:03:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=o3T20fdGbELUpw/30bYXW9rk8UUViyvlGwNQtDEeL60=; b=HftOwyrtLxzbkKxUC8HfvovTHmxETKauLq+2NZsmwAsaMGT6OQPWRuF5ff1cijRifO wITQzfD0MbU45cAGywh7YwS+ps2iau6ZaG2lIqsWGKvD3SY8gBLFkxkCsjFGyd3gmUyQ dAATAj4FpkOIkWA4ePVCwkeo3E5jCQeNXyYqkCGU+vsAHVsiH5LoKSmHjAnfAJK+Z7Gt d9x2V1epibgaTLN6SV3Jgw3jfliBg0IRYRMgaLmq5Fq0DSXAR+054B+BoCIpg0IyodZ5 YjoPZmxUjN/VAVz4bhpOBNOXAyX/bC8b4TuCXCqOYiqJkroZnJk7zVEbVD58dvpx0Rc1 m7kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=o3T20fdGbELUpw/30bYXW9rk8UUViyvlGwNQtDEeL60=; b=SXgthpicnVohKzivpvePfwbGj7sxBpanJSMhTXUBbM44uI/p5R913NNJFbBjW2d8hy 1sg8AP5JCUECyb8py70iUjByopuElmtXV7biUAZRIsJNxBNko07b2uegoT6OMMBu64J0 Xp0DNtahlQuFDlXR1nnQlfMUz/mRNsj4eG4X+ZEgzoFJjcDKPssMux5Xhll/UEH4FLyJ HM17EsdMRIuo8VasiYn9vi0MfdNQT1NhXA1OWeA/hem2cBALLm07R3eqCjy4qfNcBowS QDPbPfBw1+RP8ligSIu21kzBeAH0p7Uelm0LXYk666RUMJIzV1ECNamIA2tJMD2QS2xu ryqg== X-Gm-Message-State: ACrzQf1WkNEVkzEZrw4rCUZTlzDv2v8NQ7ST2Q3lI1ToDTwjIfT9RSyP 8TvKGpggGibX1g3hZOck8ludVOtSYWTy2v2GcmOpng== X-Received: by 2002:a05:6402:d0b:b0:458:a244:4e99 with SMTP id eb11-20020a0564020d0b00b00458a2444e99mr55757302edb.46.1667912581984; Tue, 08 Nov 2022 05:03:01 -0800 (PST) MIME-Version: 1.0 References: <20221108092840.14945-1-JJLIU0@nuvoton.com> <20221108092840.14945-2-JJLIU0@nuvoton.com> In-Reply-To: <20221108092840.14945-2-JJLIU0@nuvoton.com> From: Linus Walleij Date: Tue, 8 Nov 2022 14:02:50 +0100 Message-ID: Subject: Re: [PATCH v2 1/3] gpio:gpio-npcm-sgpio: Add Nuvoton sgpio driver To: Jim Liu Cc: JJLIU0@nuvoton.com, KWLIU@nuvoton.com, brgl@bgdev.pl, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, openbmc@lists.ozlabs.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Hi Jim! thanks for your patch! On Tue, Nov 8, 2022 at 10:29 AM Jim Liu wrote: > Add Nuvoton BMC sgpio driver support. > > Signed-off-by: Jim Liu > --- > Changes for v2: > - add prefix > - write the enum values in all capitals > - remove _init in npcm_sgpio_probe Overall this looks very good. But: > + u8 nin_sgpio; > + u8 nout_sgpio; These seem to be software constructs, for which you also add custom device tree bindings. The purpose seems to be an extra layer of protection, such as blocking a user from setting some GPIOs as input or output. I think you should just remove this, the GPIO driver is already sufficiently low level without the need of protecting the users from themselves. Yours, Linus Walleij