Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp746202pxj; Thu, 3 Jun 2021 19:20:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPuV/5jRqv2cv0umvfttvmF7XDx0L8mbo1uZ6+qsBIOLSN8q6Z4d4SetkTm2fVQQalJpCa X-Received: by 2002:a17:906:7712:: with SMTP id q18mr2062736ejm.10.1622773236718; Thu, 03 Jun 2021 19:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622773236; cv=none; d=google.com; s=arc-20160816; b=mAkMhE9z9t3yyN8kUFZwnEMqJjA2pAg2Uv8gjVBU6lcZIBoQBETaqUJAlkiQvPSbTg DoNZuNRYiDIv6ArH6wURSDPaWGJKommsBe7sx5Ie4dNH7OSJkf0o4Gl+yH6BvP1PPDAG L9jpAIpWRGrM/rvI5Wx3CFEx90lWlVbbQE2pkoQKQ/K2nsxl3HWBOUtbVT7YjV4X7Wom tVnGmt/GyDsZ8vUSsssfl3a6WHXRgecgl5NnpKfZ63sMieuU2dJaeB9oT3fSnR2at1lM xxZEas1HzqYD9cw72Bhp1tOqdjHtk7zCpDByqyQjvyFVIFPAK483JClrNwGfOOF+tWxR eDFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=wPB4HUU9Ekbxvuq91S1bVZxuf/mXg4lI2Wps0oXsVvo=; b=HxZ7v5zvMDNmPtHnYNuhkAZ9MrbpJBWMTiAGowu21yKWUL87wtu9qO5Po/ySOuIwoT JVxuOi4pTYa15iPWRpB1YAmzxgO9v5dSc2lnMhbDc7VKuaR9aJIFUjqyXRZBpNvfCH6O MMu/FBcqkZ5R8JHXnE3vKmqApo2DHfkyZp0DkhuLjXyqaVWSLcNMr1977iRpaVEtIAjs OHJEo7ix1uXtl3yZx7Yi8g06b3SI/OSnWEMK0efVsjrasG9Dg+kG99Xt/6CFIF72L0oO 2Gqe0ZsiuVwb1DRFqQpasKYoNYWgr8gmgG4B9qjXvudheP7LuxKe5PHDzLiE3pjT4Nzq yYIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf3si991999edb.168.2021.06.03.19.20.13; Thu, 03 Jun 2021 19:20:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbhFDCUc (ORCPT + 99 others); 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: linux-kernel@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