Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3607709pxf; Mon, 22 Mar 2021 10:20:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPrI/O6ksnE7ZAdoJpvj09nEnMAEzOWyyPdgMcoRhoyinXJU7TUPIzYrSh8i4vgL6m3zg3 X-Received: by 2002:a17:906:4d18:: with SMTP id r24mr808834eju.493.1616433649136; Mon, 22 Mar 2021 10:20:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616433649; cv=none; d=google.com; s=arc-20160816; b=Jzq4mHo534y0cK/x3w3dcWx7yfR8E7QZedmqi9q8HT9d9h9DrnbKc3bp68SajVxGgN nLYwq90xiSfKou5TsO20xZFCnnuFVuC4iaOwItzaAD6I4gtzVUUGAmRSzRQ1ntrT9i8n ngRBhlpATe/Jc6CF+lZNxikfkLiozf61vqDhFykSCXNXCPfwTRQCP0gU0s+Fqy1L100E MWDKAvoXLSaPn0Kg3i+Q8qyM2NBXVtP2gRubVsj06EG48NHv1uNo5DoeaiPjNMPJURXd mW9QRv4Sw3LxQwsLXeIpnYRs70EtN+nHRty+3KdyzPA6bi90yExRN3srnaYMaYYLhqjd Q/Rg== 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=2w5fCu8w6D3zdeoWzRFOIFWsZdJByg7rSbBNLFCe+3o=; b=qkTsuC+Uue+baxjRe7hPwyFOKgzUWtxpjErXn/FeNNghv9e7Fn/eRj54eLijMnfztr gjP9/jfM8Y0NttOLURrlm1kuiBengYeqb/c/FH4D4BIktcbYZfIw5C+5Ekt7nmrNn358 Cun95cpN1j+KdbMVMnmfAorj1Xax+wlex66NAaLbdhGc3660jCvzurmpjKZAr25oEVke CIMdwWZiXx6fv0TgYs3cj/Rmt3FiXfN2tSiYyQD7VIcTjCX4ge928P65tEMuJBdg7RZ3 tAkxVZ7dn2oIP+Z6FlsujfpTyKRNnaBFmhOSdPmB75S1i+pUWpAlt0x3RCPAwGAJZsw5 RDUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vVBsxK9o; 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 lr15si11361979ejb.275.2021.03.22.10.20.26; Mon, 22 Mar 2021 10:20:49 -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=vVBsxK9o; 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 S232014AbhCVRR3 (ORCPT + 99 others); Mon, 22 Mar 2021 13:17:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232047AbhCVRQ7 (ORCPT ); Mon, 22 Mar 2021 13:16:59 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95A7CC061574; Mon, 22 Mar 2021 10:16:58 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id r17so9054076pgi.0; Mon, 22 Mar 2021 10:16:58 -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=2w5fCu8w6D3zdeoWzRFOIFWsZdJByg7rSbBNLFCe+3o=; b=vVBsxK9o8fw8BFBALl180QyiYSBYJOhFQQeASqP8U4L0gA8lWRRZSYwliT1m82FxP6 ZTgFVenIyz69wwiqYU4nuiWXBe9BXefJBuv/hsKCLpc/ZjLBkIEHrYZVUOxLLQPaVM15 XcLOl9QEtYxnCpEobQ2EuBUHAhZrup3hluH1VvfEL2OEPslsjj2kx6MIUUILJFg/Hrnw PQRY0KV/fzpyN70xkcv6ixhfzwNY/jMpZUOVRP5B+Bo1af1rGqdD7HPPfsC3l98IajKV pquLy6TgtM7w9Hb4a0GfC/y5zPZS3iqbzUH9WmCIOXIwas6xABqULRmJmcOxfDTBbEmq 5WGw== 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=2w5fCu8w6D3zdeoWzRFOIFWsZdJByg7rSbBNLFCe+3o=; b=SZ1jKXQKq8lHqcabQorFEFInNP4sTe2+hbvz7Ks9TVean8v/cd7o5RICnXAWADoBAb J72fEkTta8PkLd/xfyGwYbamebsfcy2RSAZQJUJtc6wngx4Utsaf9LcCg5K2mVUmAB3q eL1SfacK+A8L/ylXU9tBIDiIze4r7l38BAWeqzKH77tqtL7w5Q6CRA5BWmyOlC4/WGA3 Zcp2CZMZOxa+LY7xy5G3xB4yxSFeb35cjINBaEQmseU+UGqXpktomDpguYj15Ktfd8jI R35e3wmQgGqovv5Ff2sLBqGuscFckwgeWtgZ0VZGXfxGO21UK4MOIIA5vLrscNUOx0s5 xROg== X-Gm-Message-State: AOAM531seORc4xhExksFME97436bTh9ze+VceOEwBmVrrbWR5LE9hdvH MIEdjYl6OpkE9fYChAacZ5y9ab9AYJE5Q5PW/gU= X-Received: by 2002:a62:e50f:0:b029:214:8e4a:ae46 with SMTP id n15-20020a62e50f0000b02902148e4aae46mr796317pff.73.1616433418096; Mon, 22 Mar 2021 10:16:58 -0700 (PDT) MIME-Version: 1.0 References: <1615969516-87663-1-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com> <1615969516-87663-4-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com> In-Reply-To: From: Andy Shevchenko Date: Mon, 22 Mar 2021 19:16:41 +0200 Message-ID: Subject: Re: [PATCH v4 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver support To: Sai Krishna Potthuri Cc: Linus Walleij , Rob Herring , Michal Simek , Greg Kroah-Hartman , linux-arm Mailing List , Linux Kernel Mailing List , devicetree , "open list:GPIO SUBSYSTEM" , git , "saikrishna12468@gmail.com" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 5:25 PM Sai Krishna Potthuri wrote: > > From: Andy Shevchenko > > Sent: Friday, March 19, 2021 3:53 PM > > On Thu, Mar 18, 2021 at 4:42 PM Sai Krishna Potthuri > > wrote: > > > > From: Andy Shevchenko > > > > Sent: Wednesday, March 17, 2021 6:26 PM On Wed, Mar 17, 2021 at > > > > 10:27 AM Sai Krishna Potthuri > > > > wrote: ... > > > #include > > > > Looking into other drivers with similar includes, shouldn't it go first in the file > > before any other linux/* asm/* etc? > I see some drivers are including this header before linux/* and some are using > after linux/*. The rule of thumb is that: more generic headers are going first. I consider dt/* ones are more generic than linux/* ones because they are covering more than just the Linux kernel. ... > > > > I'm lost here. What is IO standard exactly? Why it can't be in > > > > generic headers? > > > It represents LVCMOS 3.3 volts/ LVCMOS 1.8 volts. > > > Since this is specific to Xilinx ZynqMP platform, considered to be > > > added in the driver file. > > > > So, why can't we create a couple of bits to represent this voltages in the > > generic header and gain usability for others as well? > I see some drivers are maintaining the configuration list in the driver file, if > the configuration is specific to the driver. Yes, my point is that this case doesn't sound too specific to the driver. Many pin control buffers (in hardware way of speaking) have properties to be different voltage tolerant / produce. > We can move this to generic header if it is used by others as well. > Ok, will wait for Linus to comment. > > > > Linus? ... > > > > > + ret = zynqmp_pm_pinctrl_request(pin); > > > > > + if (ret) { > > > > > + dev_err(pctldev->dev, "request failed for pin > > > > > + %u\n", pin); > > > > > > > > > + return -EIO; > > > > > > > > Why shadowing error code? > > > > So, any comments on the initial Q? > Xilinx low level secure firmware error codes are different from Linux error codes. > Secure firmware maintains list of error codes (positive values other than zero). > Hence we return -EIO, if the return value from firmware is non-zero. Why the zynqmp_pm_pinctrl_request() can't return codes in Linux error code space? > > >> Since it's the only possible error, why is it not > > > > reflected in the kernel doc? > > > I will update the kernel doc with the error value for such cases. > > > > > > > > > + } -- With Best Regards, Andy Shevchenko