Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2517045pxb; Mon, 18 Jan 2021 21:57:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwizOBjfRLNhWKMP8ZxCDETyrt5cnRZJjnHfIfXxZ446zqvATLy1BYD78YLZjAMjCA6ZJR X-Received: by 2002:a17:906:2454:: with SMTP id a20mr1912777ejb.203.1611035854224; Mon, 18 Jan 2021 21:57:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611035854; cv=none; d=google.com; s=arc-20160816; b=jnxYLFgLwFoUjVlmOM6+fVdnFEXL9vJPsoSJz4doXpVxbMxWplq+z+2jLoYgno3YPU 8wSDfMmjKAwVckbEV7Iyr+7gNikW2zif3m3WnYqbrD1cgDGoF+MTGXlfjNLcHKQmlywt 8NgntUyzGDxu2HXl2emvCp1v5pjfGspyDcNbBxD2L4JgAcUrDGfwiuuKTKlXtkey8IS/ gQdu5RM787vQTmEWClwHQb7u8yiGA6TIeK69W8OIFC3eoypDgbB8EQ2fD0X4ydGupnNI +ffY5WsTVOgcPNPTL5LEJWCG3YGv9v4HR805L0uKOhrRjn18mw1Du0D/RX2hcML8e4/m 5HnA== 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=7MVhaKG7Tn8dwOvNkpJZ6mk5gJu3V7+tsTKQ2lqUNQE=; b=xPqGOQj4NZLPted+i2AoaM91/vbcqp2LPs0e/QWUi+O58H4Yjad/qBtyrSvdswm3ss vHnie5xpMpDpBlb6XBRuQN6Ny+Du2xPp2u/twkYYK3HDZcW7kDI7HeuRVUN5tXz/VCCw JIWDQycM0MpoSKMEU8q+QMO5BFTgWnj3374ojyhDy1/E31YU+8DD2lnRKJilHqrHDBKT eSXyTK+wMzl2RCoWxGy5vZHsIG3ctcrfzvt5jQ8csPmIvJZ1Q5UsWCZUJbtIK84M7ITn HghYfuTUdWKvw+JOgy/AD/CWLmzq4u5vXs/rdi/3TReUquvXz8F/AmyXuj3NVTf8wlu8 g6AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HD4yG7uJ; 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 q19si4832965edv.94.2021.01.18.21.57.11; Mon, 18 Jan 2021 21:57:34 -0800 (PST) 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=HD4yG7uJ; 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 S2394917AbhASDVh (ORCPT + 99 others); Mon, 18 Jan 2021 22:21:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394911AbhASDVg (ORCPT ); Mon, 18 Jan 2021 22:21:36 -0500 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5951C061574; Mon, 18 Jan 2021 19:20:55 -0800 (PST) Received: by mail-io1-xd2e.google.com with SMTP id h11so7882201ioh.11; Mon, 18 Jan 2021 19:20:55 -0800 (PST) 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=7MVhaKG7Tn8dwOvNkpJZ6mk5gJu3V7+tsTKQ2lqUNQE=; b=HD4yG7uJzVIXhW4l5LOOY2Wtb78VGKVvgrBOKpEg8/e3WTdk/g2b3OD5zky4NY7qNP 0qlAkuB3YWZQtvgm0E4njzDLwumPfzddC5mGulQB28NbWUPw+fPt32WMgONtkQergNDr hWeu0gHhFCSUcKSQ1XncMb1xgIC4NwsBxa1dbqAXJP8fv/+3Kzg3h1kxtVFJR2m0duxn 5kXzMgWqSjS6POeLMRCi2OGi6kxSqkkXzjSBxRul3ZKyTclzcthyiN3RJbUCowWibEAZ NT1i5Yo7Ee9UXgpB8jaNZHyfWUNWaM2DMKTezjdSYJnD2Q3fY/igFFyHboIpu/M68fPl KEHQ== 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=7MVhaKG7Tn8dwOvNkpJZ6mk5gJu3V7+tsTKQ2lqUNQE=; b=baqYfl29VDlL2wtG8hOJe0jythUpoM1sTFVRF4KrVDYAWlXTslk8YS2++G2SlSk13l Vb4QwY0qA8G6mIwQjSQwugAK/AbQMFw/1mx7Tkg3dcBPiKt0EI3oRP1YNCywQ9bWUN4F jSIWvcfxAhnpL1y5J4qgp3bvFlYIo3WUSTKIb/pgioWCLxw6OYECB2Po0VMgLdcmxgt8 2x3uL0Elz5uL847xykhiwJA8dfktcAQTckBjNkhl4dMtDYiouHRd9pm90WBucUijXyLB U2mjsyCGUSd3RivoHHH4lszc4Wvv2B/TF6xX8ARIoFYLlkOBNLCe6qv+YEfHrkerIf9B GDBA== X-Gm-Message-State: AOAM533vdoMU4pjsZK+GG+jWpx5ffhogfbeNP7TbU3Q9h/gjUtgnTZ0M roaOVdJgriVgq7diVo++xqmO2tnV7DepGR4tjQA= X-Received: by 2002:a6b:c7c5:: with SMTP id x188mr1480858iof.39.1611026455198; Mon, 18 Jan 2021 19:20:55 -0800 (PST) MIME-Version: 1.0 References: <20210111054428.3273-1-dqfext@gmail.com> <20210111054428.3273-3-dqfext@gmail.com> In-Reply-To: From: DENG Qingfang Date: Tue, 19 Jan 2021 11:20:48 +0800 Message-ID: Subject: Re: [PATCH net-next 2/2] drivers: net: dsa: mt7530: MT7530 optional GPIO support To: Linus Walleij Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Rob Herring , Matthias Brugger , Sean Wang , Landen Chao , Philipp Zabel , Russell King , netdev , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux ARM , "moderated list:ARM/Mediatek SoC support" , "linux-kernel@vger.kernel.org" , =?UTF-8?Q?Ren=C3=A9_van_Dorst?= , Frank Wunderlich Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On Mon, Jan 18, 2021 at 10:55 PM Linus Walleij wrote: > > So for offset 0..14 this becomes bits > 0, 1, 2, 4, 5, 6, 8, 9, 10, 12 ... 18 > > What is the logic in this and is it what you intend? Yes. Bit 0..2 are phy 0's LED 0..2, bit 4..6 are phy 1's LED 0..2, etc. > Please add a comment explaining what the offset is supposed > to become for offsets 0..14 and why. I already added to mt7530.h, perhaps I should copy it here? > > > + gc->ngpio = 15; > > And it really IS 15 not 16? Not that I know network equipment > very well... Yes, 3 LEDs for each phy. > > Yours, > Linus Walleij