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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 358B0C4338F for ; Wed, 11 Aug 2021 13:00:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C4CC60FC0 for ; Wed, 11 Aug 2021 13:00:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230224AbhHKNAZ (ORCPT ); Wed, 11 Aug 2021 09:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230178AbhHKNAZ (ORCPT ); Wed, 11 Aug 2021 09:00:25 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 551D8C061765 for ; Wed, 11 Aug 2021 06:00:01 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id h9so4416820ljq.8 for ; Wed, 11 Aug 2021 06:00:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9raAqstWOInQ9wyq7hxk8+0JIk+Aqi4dpxjqntVgY9s=; b=hSt4vFrly2JM0QO77mUcjMzkwID5HUv9zx2/fnjGZpyM5NU5ocYo3MiAvNMAneOy5P 9fF5ttXF7kO4BUFNtiD9aLc0q1fnZTSROd/MrBd8KHalQsmgjOt1NrImFI7Nv3PEPaOY l9TvpD7+X4OqMEMWbwvWmV2jUJ6Wbd1dACgStSNGjwebuJaGfSmcBkUfWPksQWcxURLp bfcTl0wo6llDCRyS0C8seQ9CsDRHz/ramTZS78J12PritcrY0Evmd1t17StEFFoATj8t 4ayNtje9TR1YNPCb1/ay0r7QH7ME5i9rYhskX1ufGxq2cz1gdHrU0nJDO5REzEtejZ2g hOvQ== 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=9raAqstWOInQ9wyq7hxk8+0JIk+Aqi4dpxjqntVgY9s=; b=WTk17jbNysx8idyMckIzYlz7axYo64YhAt2iRaGxIVJgC8zFvVZ0IpvHT85l+F2B8b t8fFpwA1PSBKKLK5lNmZsTqOxVj+DzXlTbqlbxF8/KcQ25VcslXS6A26UgPd4eXmfKLQ NGQQfcWlyhiwOg5V0HEWFTNMdXrZ3zPQU5KJiF1feQunCeQA3gh/dhwhXUIQbPXX4/B+ xlLoVFB/REpXmajVXnaTR7RSujZvKPQKWXWzmZKqTOxm6HJmXYwkpeT+JSYofYjJjqkF wlPsOwBF76cGbJkrBsnLIdvmTNabAr3dRaQUuB3904U7BA2miR6rkfvC49yfnP6UD2Sv zCZA== X-Gm-Message-State: AOAM533CKVMUc+NcMFQiOCYghpqxv/UFldq4CgAIEkO0FpYMnbBRDDxO rHPT+kasDmPj19kppgV0AUDfwmE5UsoUKmeGugSLNQ== X-Google-Smtp-Source: ABdhPJwV/uG/04abyCsQhn5zh7oybmy1PdQiJD1sQ3DMsjOyJF2lWHqAFGDKKUKrSqetQFxhFJMg7BK+lIkMfq08R5M= X-Received: by 2002:a05:651c:327:: with SMTP id b7mr23677504ljp.74.1628686799738; Wed, 11 Aug 2021 05:59:59 -0700 (PDT) MIME-Version: 1.0 References: <20210805174219.3000667-1-piyush.mehta@xilinx.com> <20210805174219.3000667-4-piyush.mehta@xilinx.com> In-Reply-To: <20210805174219.3000667-4-piyush.mehta@xilinx.com> From: Linus Walleij Date: Wed, 11 Aug 2021 14:59:48 +0200 Message-ID: Subject: Re: [PATCH V2 3/3] gpio: modepin: Add driver support for modepin GPIO controller To: Piyush Mehta Cc: Arnd Bergmann , Zou Wei , Greg KH , Michal Simek , wendy.liang@xilinx.com, Nobuhiro Iwamatsu , Bartosz Golaszewski , Rob Herring , rajan.vaja@xilinx.com, "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , git , Srinivas Goud , Linux ARM , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hi Piyush, thanks for your patch! Can you explain one thing to me: since this is now a GPIO driver that means "General Purpos Input/Output", then these bits are accessed like this: On Thu, Aug 5, 2021 at 7:43 PM Piyush Mehta wrote: > + ret = zynqmp_pm_bootmode_read(&bootpin_val); This does not look very general purpose. These seem to be all about boot mode, right? So can you explain why this should be a GPIO driver at all? I understand it is sometimes convenient to describe stuff as GPIO even if it is not (for example to get a convenient userspace interface) but as maintainers we really need to make sure that the subsystem is not being abused for things not GPIO. Yours, Linus Walleij 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=-4.5 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 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 3D3EDC4338F for ; Wed, 11 Aug 2021 13:02:24 +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 BF0BE60C3E for ; Wed, 11 Aug 2021 13:02:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BF0BE60C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z4B07XQ6wruKuU/k+wY2zVr6eT9V24OUOt3eqbWQago=; b=S3Vvc6WtU+oNsm qidJV6RvqCLj38XhRsrO8jkwz+rUo/ycMBMS4xc3rYk1hua9Kc8RBoPGmsJBvjOihy3GkPdG1SuJR Et4jgaC6ionzqWrSzPShe3qSDz0eoKSgbo07O5hhQVRQoBFWDkxYOfKJOMDXULnFijwKA+RVjXclK YT6IAafQmNZag4kOySY2QbLdD+YlwIwtaBLIjfaRev+Ss3AM9jVNyK0idGRUXRQLybdDXX/PfthJL 7DxSXoXpchQMFOJHBEu59HcesDLAyKeJ0xqlENHcnMhF7KMClTo/wIOKpzjWqRBzS7w7jsBa8EkxI 32lCe3V69ZK85jHbPrYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDnq6-007Fae-E6; Wed, 11 Aug 2021 13:00:10 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDnpx-007FYI-Uz for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 13:00:05 +0000 Received: by mail-lj1-x22e.google.com with SMTP id x7so4410229ljn.10 for ; Wed, 11 Aug 2021 06:00:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9raAqstWOInQ9wyq7hxk8+0JIk+Aqi4dpxjqntVgY9s=; b=hSt4vFrly2JM0QO77mUcjMzkwID5HUv9zx2/fnjGZpyM5NU5ocYo3MiAvNMAneOy5P 9fF5ttXF7kO4BUFNtiD9aLc0q1fnZTSROd/MrBd8KHalQsmgjOt1NrImFI7Nv3PEPaOY l9TvpD7+X4OqMEMWbwvWmV2jUJ6Wbd1dACgStSNGjwebuJaGfSmcBkUfWPksQWcxURLp bfcTl0wo6llDCRyS0C8seQ9CsDRHz/ramTZS78J12PritcrY0Evmd1t17StEFFoATj8t 4ayNtje9TR1YNPCb1/ay0r7QH7ME5i9rYhskX1ufGxq2cz1gdHrU0nJDO5REzEtejZ2g hOvQ== 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=9raAqstWOInQ9wyq7hxk8+0JIk+Aqi4dpxjqntVgY9s=; b=D+ZG6wZMZDm/wBRjZb3pP//Y8/sNeALJjwtJ3usG7HqEtIkHhn7H6flb136t3Tmyas fmLNyhKFH4UjxmCuH9UYeY5IY52qPc5PVsWSCuerv5DXF1fl8uEskvbmoHpyy8n8+h9y sMtaB90SaN4QOa9jPGw0yqUUZOkh+ntha74sPfJctdWDQdpLjXNzqEpoeYBQkgO8y79Y 7WbkCYOi4XNb6SHptR5/9bmydoTjEUvdbhuz1uwcq1d2Clr8jddZFutXeT5GRzs+GaYc coXTJFlRYgn2LEt6pWT4m0RoEfA3EVTcygBTOiE+wSlMH3ZhcUbb7DhiXgL7gqsHKe1g txlw== X-Gm-Message-State: AOAM530CWPB4AllcLgJHsO+9O8u9u1T/jL1mNkRgnjMvOA4dS0bZ6K9u GmoqBCaDxKWxxS3Gd8/zRvsdqMS2RJJy9Ri01iG8/g== X-Google-Smtp-Source: ABdhPJwV/uG/04abyCsQhn5zh7oybmy1PdQiJD1sQ3DMsjOyJF2lWHqAFGDKKUKrSqetQFxhFJMg7BK+lIkMfq08R5M= X-Received: by 2002:a05:651c:327:: with SMTP id b7mr23677504ljp.74.1628686799738; Wed, 11 Aug 2021 05:59:59 -0700 (PDT) MIME-Version: 1.0 References: <20210805174219.3000667-1-piyush.mehta@xilinx.com> <20210805174219.3000667-4-piyush.mehta@xilinx.com> In-Reply-To: <20210805174219.3000667-4-piyush.mehta@xilinx.com> From: Linus Walleij Date: Wed, 11 Aug 2021 14:59:48 +0200 Message-ID: Subject: Re: [PATCH V2 3/3] gpio: modepin: Add driver support for modepin GPIO controller To: Piyush Mehta Cc: Arnd Bergmann , Zou Wei , Greg KH , Michal Simek , wendy.liang@xilinx.com, Nobuhiro Iwamatsu , Bartosz Golaszewski , Rob Herring , rajan.vaja@xilinx.com, "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , git , Srinivas Goud , Linux ARM , linux-kernel X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210811_060002_102166_A21F5F5B X-CRM114-Status: GOOD ( 12.83 ) 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 Hi Piyush, thanks for your patch! Can you explain one thing to me: since this is now a GPIO driver that means "General Purpos Input/Output", then these bits are accessed like this: On Thu, Aug 5, 2021 at 7:43 PM Piyush Mehta wrote: > + ret = zynqmp_pm_bootmode_read(&bootpin_val); This does not look very general purpose. These seem to be all about boot mode, right? So can you explain why this should be a GPIO driver at all? I understand it is sometimes convenient to describe stuff as GPIO even if it is not (for example to get a convenient userspace interface) but as maintainers we really need to make sure that the subsystem is not being abused for things not GPIO. Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel