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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8CB86C433F5 for ; Thu, 17 Mar 2022 07:01:14 +0000 (UTC) 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=JXoBNkkv2/zLJH1n2uN/7vSZbsI2ZdGfW0pWkZzTo18=; b=Q1fnAXs5k6sBt1 uT6+9ayb4YejmX1f4RJKn3kcxLuHtf0ATme8RYT1a74RTd7nCJr2vTsrnRCqfVe9d4Oc4STW+lgpg u07uq8NV0TeDC8RoraxDawi8tmm9hXAyjdFwLYwWhkddiVpa7TdP8R3jJfnOOWgDAYr3jKU/5kSR0 hgUKdXWZWcKRUVmsZpZ09mSJ6oJYRyoNTV3WmkhRgTLTB2QpMzhTvpoJ5YiJ0CXXGgqbW9MdsoheU X5KCg/mJNqiGCcdkx8lVm6bhCt/ZTS7AmDaTufLFqVzrOFpbi+3CFGTXo9pQmKrdZauCFic+QLrNL /el9BDo3FZlqGpVjg0Hg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUk6k-00F6Tb-2J; Thu, 17 Mar 2022 06:59:38 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUk6f-00F6St-UL for linux-arm-kernel@lists.infradead.org; Thu, 17 Mar 2022 06:59:35 +0000 Received: by mail-pg1-x52e.google.com with SMTP id o13so1979604pgc.12 for ; Wed, 16 Mar 2022 23:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bTvA02fwUpyoJi/TzzKPy+j0AsQcZbGmLjHeosuRf4Q=; b=pTGUQD+ckQk39GSvZd5kI1ahBZ0yEYZAb7yDmSWUWOXhgYqtbS5sQyXRgTgBnogrth R9qNKKLCg8KXg20mdV9Q/q1Lh+xnuqMCSW1OW/xZ836JF2btzp7Uuui2fOowHfOmhJyr nZ+hmUcokobxlSaJ2ZQ7qiA5q7q5omaLaiOW6v0ciAv289ZHGrA1+bngMu9kF1P/xFys DAmVZsU3+/R9v6gwvQLlIY6v/rB/Ha4Ry2Zxr87FPcKjBBbi1N5Q4ljyIWEaKyYozYIf sQmkco0WX8O+9/uXXa6mIteeW/9T8exZy4UZrMg4TGESFaqyoemtJAVuf8bGjK1mlKZV B6QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bTvA02fwUpyoJi/TzzKPy+j0AsQcZbGmLjHeosuRf4Q=; b=hWr8QDj2VwMJ23tYbgw5LRKTzO9oMAAWug+wTP1lsLkqVR1adz9/78zkRH7Ga8L8ls cuQn9XBzNv+jg+uQ1P+8ETi0HjfOZcMpsBu9YxbsvsUo0K1ZMPnpbkYk/W+RbJoDNvdU 7no70lVCLl0hx6zg7c6qhPYEP/77YE6NE7SbXPvWjdGaPtE4BG9fjEYGSyjxmT6NbJr/ kE5Srcrj2+7k48rLQuLjcOUaTxgD803+zzTUVWB25pAlDHASiAXARgF5wrXbB4zogj3e 2HKVoLUVuvV1C4KLOm/1zJwOqkEilMsf7V6P7t5ssL7RtRRE+ndueLWf2qRwKUs06YwT S4ZA== X-Gm-Message-State: AOAM533g3Rs2MXTj7a8RDCKAnMy5aeyC3Dwut/UXF5r7s1ByEnaIdoT7 LyJz8io0d4HWnKrSkPfdP6I= X-Google-Smtp-Source: ABdhPJzIXGxkuvnkQM2cnNQzBYQ2FKsgiG91ui1C5izJ0oeQe+1doQKw4YWF0CThFj3ChdYUqe8p5g== X-Received: by 2002:a05:6a00:b52:b0:4f7:ae2d:64a with SMTP id p18-20020a056a000b5200b004f7ae2d064amr3672127pfo.0.1647500371837; Wed, 16 Mar 2022 23:59:31 -0700 (PDT) Received: from 9a2d8922b8f1 ([122.161.51.18]) by smtp.gmail.com with ESMTPSA id p10-20020a637f4a000000b00373a2760775sm4275259pgn.2.2022.03.16.23.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:59:31 -0700 (PDT) Date: Thu, 17 Mar 2022 12:29:25 +0530 From: Kuldeep Singh To: Marc Zyngier , Krzysztof Kozlowski Cc: Krzysztof Kozlowski , Marc Zyngier , Mark Rutland , Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: Re: [PATCH 3/3] clocksource: arch_timer: Add arm,cortex-a7/15-timer in of_match list Message-ID: <20220317065925.GA9158@9a2d8922b8f1> References: <20220316095433.20225-1-singh.kuldeep87k@gmail.com> <20220316095433.20225-4-singh.kuldeep87k@gmail.com> <20220316174108.GB21737@9a2d8922b8f1> <87zglpybzw.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87zglpybzw.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220316_235934_005524_48177BB3 X-CRM114-Status: GOOD ( 36.75 ) 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 On Wed, Mar 16, 2022 at 06:43:15PM +0000, Marc Zyngier wrote: > On Wed, 16 Mar 2022 17:41:08 +0000, > Kuldeep Singh wrote: > > > > On Wed, Mar 16, 2022 at 05:30:26PM +0100, Krzysztof Kozlowski wrote: > > > On 16/03/2022 10:54, Kuldeep Singh wrote: > > > > Few platforms such as Renesas RZ/N1D, Calxeda, Alpine etc. are using > > > > arm,cortex-a15-timer and arm,cortex-a7-timer entries in conjugation with > > > > arm,armv7-timer which are not currently defined in driver file. Add > > > > these entries in arch_timer_of_match list to bring them in use. > > > > > > > > > > This looks wrong (also Marc pointed this out) and rationale is not > > > sufficient. Why do you need these compatibles in the driver? > > > > Hi Krzysztof and Marc, > > > > I find myself in trouble whenever dealing with compatible entries and > > had 2 options when I stumble this issue. > > 1. Remove unused compatible > > That'd be silly. > > > 2. Add required compatible to binding and driver > > To the binding, yes. But to the driver? > > > My past experience and advise from other developer says not to remove an > > existing compatible. And also I found "arm,cortex-a15-timer" in binding > > which was again not documented and was present in DT. This prompted me > > to go for second option and make necessary additions in binding and > > driver following current entries. > > The "arm,cortex-a15-timer" compatible is documentation, and only > that. If, one day, we find a bug in this implementation, we could work > around it in the driver thanks to the separate compatible (although in > this case, we'd have much better way of doing that). > > > As per your perspective, current configuration isn't apt which means > > "arm,cortex-a15-timer" is a stub and is wrongly present in binding. > > That's not what I said. This compatible string is perfectly fine, and > accurately describe the HW. The driver doesn't need to know about the > fine details of the implementation, and is perfectly happy with the > current state of things. > > Think of it as an instance of a class. The driver doesn't need to know > the instance, only that it is a certain class. > Thanks Marc for sharing knowledge. This was indeed helpful. To sum up from what I understood, bindings and DTs should always be in sync and driver file may not need to define all compatible entries as long as purpose is served. This means no driver change will be required to address "arm,cortex-a7-timer". To which I have a question to Krzysztof. Hi Krzysztof, As per your comments on 2/3 patch, that it's DT which is not aligned with binding w.r.t arm,cortex-a7-timer. What makes "arm,cortex-a7-timer" an invalid entry from binding perspective when we have a similar entry "arm,cortex-a15-timer" already present? I think we should share some common grounds here and keep both of them in bindings or remove them altogether. I prefer first option, What's your say? Or please let me know in case there's better way to address this. - Kuldeep > > I also observed many other DTs have compatibles which are not present in > > driver. What is an ideal idealogy behind such cases? > > I think I've made myself clear above. > > Thanks, > > M. > > -- > Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel