Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp181682pxj; Thu, 3 Jun 2021 04:11:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkG44xWjXuiZfVztVE1J8I5CXNkvyMAmNgTf+vwK/3U52qdyjD2vz/hYsLc/g5GKOVyNjW X-Received: by 2002:a17:906:e2c7:: with SMTP id gr7mr13571380ejb.20.1622718679566; Thu, 03 Jun 2021 04:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622718679; cv=none; d=google.com; s=arc-20160816; b=WBMtatcM+2FFuaRWQQZIu0LCfQ2rZXtVajXQphfu5agscG8Fc13hmOMH/UHj1Z0G23 QSV0/Or7Ttpv5qlMumEKGkyn0tXNiFg1rjclT0N+Dy5wdKpHNYS/tUiilysM8ONfL0+r J6BJtoOZJlPpHx960dsysPB+QEKUxwNA4ijiKVEQOJQCu7r7/+RonV0i3fV5oYSdkv+U 4pZ2+lV3FXGZI4/5iAZXY0tZXerfW/Uc4rXNINora4VedqugM5xMEkc2ueDPZ5Xqia/8 SawZ2P9omoYzCllFtXlWhN8dUWquwr6kLLdzncZutB+ZF1zJgvDjnH8JRCFlz9Tl/9U7 p2Tg== 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=wDo2z8iTAiJqBqvWvLB96Okm4phCuyBKqAvyvxyTJXs=; b=fh62JkXxjFqxwsfUWpOzm2yyO3p6GBf7vdZXgh2Z1lYOzK8ePoC9+ySOd36u13x6ct qXNokYLf77fegK+aY0CQKnNqKPxMvKT1S+Bb0kLKZ2pryNs5uFrp7W1LAegqAah1bxZD J3taVhjNdU2spPabSI0qQq1ZQZr+c6nE8HVC1ZeblvssoKOJq5/MgL4yxOCfB1rG9zPM 2fflI7hO6LIJKd+L4e0CuZZeax+FR6Z5ovsWEoA+F8Yk8+kXVA1KDGmNC6zfVUuOqFgb pXYpUO9tyhhkxjeeN7obtftSm6lxT8nIwQxSoaSa4zZSp/OF6zdDB3fZHrFFc6N6XzdA 9iIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P78APJKc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si1978262ejv.747.2021.06.03.04.10.55; Thu, 03 Jun 2021 04:11:19 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P78APJKc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229871AbhFCLKi (ORCPT + 99 others); Thu, 3 Jun 2021 07:10:38 -0400 Received: from mail-pl1-f176.google.com ([209.85.214.176]:43597 "EHLO mail-pl1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229721AbhFCLKh (ORCPT ); Thu, 3 Jun 2021 07:10:37 -0400 Received: by mail-pl1-f176.google.com with SMTP id v12so2679463plo.10; Thu, 03 Jun 2021 04:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wDo2z8iTAiJqBqvWvLB96Okm4phCuyBKqAvyvxyTJXs=; b=P78APJKcMH6oqL0fsJYDyeLXqod4sHzF3NXsn6tkC3NkBYbPumu8oRRPGT/fPb1HtZ UmaBhblYD4nltFb4LfHSbYjyeyRq1q+Xng3DOD5LCgR6V+7j7JfVMVnTO18hvNonTGAh nCB/Zk0yrCgyJlh9b6R39j8OT0/a53Lhanzzmvg5zyfHTnDax/5ap2oyt7s8WZ2Fdtsx vy6+WrmcmYqO+6/fcHjFDZsykRNKYqfV+dcheF40g7wGoRKkln9VKOvRpJV+xDXDJPOC QtohdoP4CivTDGn77Ix3q/Mdf1NSq+U0Q98iUBwG7EYtzwONK52ax/CLcWtkR7gWBfSg dTPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wDo2z8iTAiJqBqvWvLB96Okm4phCuyBKqAvyvxyTJXs=; b=eV9FzO7C/LiXgmjqjoSW9qro4T36Y0qYfAwUOFZc+SePCOxsyvRXStGPuXQDAbE8J3 Na84+fwju9daLvw2SViPUnTMD48XawuiyxUaENiKK5lrcdRRfjNz7uKifh4iUMiP0eLS 2HlA5hWCyyTcsymWVK6m0mfUeJl9/J8Jr/sZgF65t4FQ7s0fp2M3lAkZ7285hHb4IZOQ qa0KqedqvBnS3Xw6qprrg69NGzXI2DhN7ylv4nGWcJn3AYdF9hgrk1ShEytjMrl49Krk Ft74vvbwYe41L/n15zGzAeaCVxJZ4/UTopK4KCUCMiX80YCw0xzp3hGUDqyrlKU3EcFG HvMw== X-Gm-Message-State: AOAM533n9kZclDO7z4bAM3j8/JDqSL5kqmnP1UOJpDIhcYzYGf10T19/ 1fb2RURXcUYj6JJ+Ki+S/bb5GtIesWX38be73qk= X-Received: by 2002:a17:90a:af8b:: with SMTP id w11mr36016810pjq.228.1622718464302; Thu, 03 Jun 2021 04:07:44 -0700 (PDT) MIME-Version: 1.0 References: <20210603101822.9645-1-steven_lee@aspeedtech.com> <20210603101822.9645-5-steven_lee@aspeedtech.com> In-Reply-To: <20210603101822.9645-5-steven_lee@aspeedtech.com> From: Andy Shevchenko Date: Thu, 3 Jun 2021 14:07:28 +0300 Message-ID: Subject: Re: [PATCH v3 4/5] gpio: gpio-aspeed-sgpio: Add set_config function To: Steven Lee 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@aspeedtech.com, Billy Tsai Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > +} -- With Best Regards, Andy Shevchenko