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 ADAC9C47082 for ; Fri, 4 Jun 2021 02:18:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 87610613E7 for ; Fri, 4 Jun 2021 02:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229772AbhFDCUF (ORCPT ); Thu, 3 Jun 2021 22:20:05 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:23258 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbhFDCUF (ORCPT ); Thu, 3 Jun 2021 22:20:05 -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-gpio@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 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.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 AF464C47096 for ; Fri, 4 Jun 2021 02:22:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 715C861405 for ; Fri, 4 Jun 2021 02:22:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 715C861405 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZjuFrwCrtI3k01kgaziuaBBdL4CI8+OX01C5wnmFwEA=; b=sbyCj5SNd2uvjS zhQ0YInN3NvSu0QwcCWLmA1nDjdRepFQmU//Cgtv/BCkK0d1vt2DjlNnuI4BoGvgfSLL9nzvWXOl4 f8TSZGfnRy+ZjBqk1L1duNo+v2ma58uxE+6cKTousLnaGYviXhhC0IGYadIE+isSB3NNbM2byj0N+ PVc8YvJ49fg/nn3M3J+rtn529oY9hRQgB0qkXNhama0l2DrLY6Sxu34mqkhLXzCV5HGWzWoQ+PT9r zuc9DiZkCHTpy9Rs5r1XCzGlnnVREtQHcNsv7JE9mVppg5ZoAsrVaYl/GYZDu8cVPRE8OpkIt7tp6 mpe1Xw8ov/ooUe7r1+Sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lozQ1-00BF79-NF; Fri, 04 Jun 2021 02:18:41 +0000 Received: from twspam01.aspeedtech.com ([211.20.114.71]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lozPx-00BF2x-N2 for linux-arm-kernel@lists.infradead.org; Fri, 04 Jun 2021 02:18:39 +0000 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-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210603_191838_030950_AE48178E X-CRM114-Status: GOOD ( 13.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel