Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp2593766pxy; Sat, 24 Apr 2021 21:53:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+gAar7WzNHeLy17DtePPynHnzsW9tQrZlMcG/0E9pWyzy8rRdAERZzwjbr3kP840EngKQ X-Received: by 2002:a17:906:46d6:: with SMTP id k22mr11581764ejs.243.1619326382903; Sat, 24 Apr 2021 21:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619326382; cv=none; d=google.com; s=arc-20160816; b=HRE5VZ2xo/kRm+jPDxWjwRvZO/CVAixanOwQxtoOM+MwU8Aq/TLSUuAFsN5T7xBSR8 80heSS96/sOIPo9zmNXF6JqL8RWAOluvc1HI8SvyMoC/q3qWAfSIrjsn9FtaHDCWavQV yW631FdNKadSVUhKMxa2SSByeM4oMFEkGj1Zd2fGbUscQ3RwNXpjxIDMf2osuU8XWS5I DWVJwKt88wfftcSPhxnGgKKi1pEWWx9WrOPgFLzreSQiIjQCq1amkoS6ACnr7J674rPp ZI3zyGM2Su+qGg5JOGRnUfnG7I1Es5WDFf1957r3zPrSadRUIYHigUo34ttioL2jRwkY 4Gtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-disposition :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Bb3hrAQ3mgjurnRTzIUULlD1BFEVkHRxwl8M8mItjrQ=; b=B1+3t3Blo4W6MuCam+XxhXwENW+Un2NxRhTL3R8XhRjJ+jNEE6iQnh3LCJdQbp4NKR UW77gsdZp44x0P/35wBKKnpVXJ2CoK0oLAZXjuDUeq7PVEzBMLJfpRWUzl1dnEJNSD42 mT7W24j6RloiMbWwRWiWoiBkum/R18ifmIlgREKiIR0Bk7V9Ki9c5izjmtBFYrWFuEBG aqi/sB1vrhQSyZuvCpAx5CHUKEEzv74j0LVWImDdTE+DdE/y5rBIufMeZoZtsmmXawjI NGFLzqB5mP5n7dA0aPtN4a8XNbEl/GMAty5PL73uWEb/Re3hSKj+7enpwf9YyetHUeK3 mr2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oggnFFV9; 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 s14si9346784edx.141.2021.04.24.21.52.29; Sat, 24 Apr 2021 21:53:02 -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=oggnFFV9; 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 S229522AbhDYEqm (ORCPT + 99 others); Sun, 25 Apr 2021 00:46:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbhDYEql (ORCPT ); Sun, 25 Apr 2021 00:46:41 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DD8AC061574; Sat, 24 Apr 2021 21:46:02 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id f11-20020a17090a638bb02901524d3a3d48so3299415pjj.3; Sat, 24 Apr 2021 21:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-disposition:content-transfer-encoding; bh=Bb3hrAQ3mgjurnRTzIUULlD1BFEVkHRxwl8M8mItjrQ=; b=oggnFFV9idkpRCt7FcNhGKC9RnybocZ8P0kLXikG783AsU8AE8TmTdQWFyaxO+VybR Go3FC0YorNRk9QeluQfEDHYxUKkucpE5SydU3MB9O6WpstqsAP7rtnTZ19LQ9IxSJZCk 2EhE9T5Ows8/bIWzhc/a8orCdKRK9Nrd5WIKTFBwQx/4Yog9LFsmchNOkosG2ct6oy8c e8nevdrQzRKOepbkVM1h7a0/hE8H4uJA4LcjrvQVs7qL1QbHl90QXhkApFpQxY+fTYG4 FmYIYwaq/ALyWuYRqvra4d3DFdMU2JS1H/HTCssPycKTZVa181sfuDDvWUn3xdBwZz69 o9zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-disposition :content-transfer-encoding; bh=Bb3hrAQ3mgjurnRTzIUULlD1BFEVkHRxwl8M8mItjrQ=; b=XSms4yGjcti1fkzqV+vOL1jRGYIHDj2dP8c+G3TnyqbvH2J6Z0qZ6xBZgZSM4hFMGK XsgzKi1kVyt47KoXiWxAquY1Lp7fotchSYEUaiJOIbthAWLUaykncOtlmdS1e19hiv/7 G70zG+zBlf3WsJKfEzmmK8lwpd8xbPfYe7rHMZIsxgeMMLh8TcSasZRW3R3etAaBWtfj cVqGNUdeQ6WZhNtyTtZwQOpjJbggx975z8u+Z7UG41EcWTar60YeOFvoJGZfvsnD1Qkd JWpxNjMaRWb7WJzvWFpPOvxcpHkLPjoO9Js8BBwKcX9YjkRXUnrMijyKWtke4JGGwIrb k57Q== X-Gm-Message-State: AOAM530/UP7NoE9+FUD3gSmlXu+vAEb7ZuBTMYJwAIdeMl/gdOJxEkzj J0mgy/rEkq3bxEw+/wcNOX0= X-Received: by 2002:a17:90a:8816:: with SMTP id s22mr14283810pjn.25.1619325962000; Sat, 24 Apr 2021 21:46:02 -0700 (PDT) Received: from localhost.localdomain ([138.197.212.246]) by smtp.gmail.com with ESMTPSA id u13sm1980209pgm.41.2021.04.24.21.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Apr 2021 21:46:01 -0700 (PDT) From: DENG Qingfang To: Ansuel Smith Cc: Florian Fainelli , Andrew Lunn , Vivien Didelot , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Rob Herring , Heiner Kallweit , Russell King , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 11/14] drivers: net: dsa: qca8k: apply switch revision fix Date: Sun, 25 Apr 2021 12:45:54 +0800 Message-Id: <20210425044554.194770-1-dqfext@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: <20210423014741.11858-1-ansuelsmth@gmail.com> <20210423014741.11858-12-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ansuel, On Sat, Apr 24, 2021 at 11:18:20PM +0200, Ansuel Smith wrote: > > I'm starting to do some work with this and a problem arised. Since these > value are based on the switch revision, how can I access these kind of > data from the phy driver? It's allowed to declare a phy driver in the > dsa directory? (The idea would be to create a qca8k dir with the dsa > driver and the dedicated internal phy driver.) This would facilitate the > use of normal qca8k_read/write (to access the switch revision from the > phy driver) using common function? In case of different switch revision, the PHY ID should also be different. I think you can reuse the current at803x.c PHY driver, as they seem to share similar registers. > > > -- > > Florian