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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDC5DC47082 for ; Fri, 4 Jun 2021 02:18:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BBAFB613E7 for ; Fri, 4 Jun 2021 02:18:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbhFDCUc (ORCPT ); Thu, 3 Jun 2021 22:20:32 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:40428 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbhFDCUc (ORCPT ); Thu, 3 Jun 2021 22:20:32 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 15424eXE032117; Fri, 4 Jun 2021 10:04:40 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 4 Jun 2021 10:18:10 +0800 Date: Fri, 4 Jun 2021 10:18:08 +0800 From: Steven Lee To: Andy Shevchenko CC: Linus Walleij , Bartosz Golaszewski , Rob Herring , Joel Stanley , Andrew Jeffery , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , "Hongweiz@ami.com" , Ryan Chen , Billy Tsai Subject: Re: [PATCH v3 4/5] gpio: gpio-aspeed-sgpio: Add set_config function Message-ID: <20210604021807.GB25112@aspeedtech.com> References: <20210603101822.9645-1-steven_lee@aspeedtech.com> <20210603101822.9645-5-steven_lee@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 15424eXE032117 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The 06/03/2021 19:07, Andy Shevchenko wrote: > On Thu, Jun 3, 2021 at 1:20 PM Steven Lee wrote: > > > > AST SoC supports *retain pin state* function when wdt reset. > > The patch adds set_config function for handling sgpio reset tolerance > > register. > > ... > > > +static int aspeed_sgpio_set_config(struct gpio_chip *chip, unsigned int offset, > > + unsigned long config) > > +{ > > + unsigned long param = pinconf_to_config_param(config); > > + u32 arg = pinconf_to_config_argument(config); > > + > > + if (param == PIN_CONFIG_PERSIST_STATE) > > + return aspeed_sgpio_reset_tolerance(chip, offset, arg); > > > + else > > Redundant. > > > + return -EOPNOTSUPP; > > IIRC we are using ENOTSUPP internally in the kernel. YEs, checkpatch > warning may be ignored. > > > +} > I will modify the code as you suggested above, thanks. > -- > With Best Regards, > Andy Shevchenko