Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5112154ybl; Tue, 10 Dec 2019 00:15:36 -0800 (PST) X-Google-Smtp-Source: APXvYqx4fi6jeaWfVUt1sEwUYw5Q/xIfbN8B0VFAwUH99ZpIzjDv79dDk4F1VxnawTWD9n4i5GqA X-Received: by 2002:a05:6808:3c5:: with SMTP id o5mr3072240oie.142.1575965736043; Tue, 10 Dec 2019 00:15:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575965736; cv=none; d=google.com; s=arc-20160816; b=wMCnudwFSW+tgHo8KOelhbPoViYxNu7Q1opkQVWsP2NjCSSPCGDqrfwmZhovh1Q7/N BUvwxzNe4BkSlyPKvYWNTY6mh9SlXowu6wJvAPZktgtb/vvi8PzcG3FDvTPOfHnQ7MOG aM1ENcOPE6DZaOOXk6XxcPGShOKaiFkKbgmoFJlA3hN4XVq/zlw/NGfHyY5qeZRapOfF DVxy2dzGBiZ/hC9ke0NaSjIoz0nHf7KWuLjZ5zaZd061m2Nll4SfkgDWWWkPufNgiXHs fU3Vs0pDhk+vqq16oErxBb4M8AzE9ozOL3msqf+7OZNRBv6CJqKOnJvi6DFP2OYjS1En fP8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=c2C/fEHYw/8uqadmiP2m2xa2hsUpAd52urXVJTPlYck=; b=KVaAVwib+XnEpOjhcU9rsusWWEBMgqxIfrC4rjjwlbNt7zXb/IJWjoNOKphfmRp1UE LoJCqdSI5+7IaIpaqE2YlgXLLyIGZS1iRPVGMcjDOe/PKGm2cN2SybK1tRaTMcjzaLTW mCwsWz3wbrIeFQnAtk5ouwEP88t9l+zbIwEPLOoU2pJoCY0UKNssZJwbnLnqI5rP11he 3s9dLxntW/Dk1OlRGkZRNEi4iI7Rqp1mEAQ+h3FwzkQ8frt2m3TzMjLUbZ13BwrQeGdl RLzFNdXNAYwiF5Zl9sy1AAtYJc6x5sBhiku+g1u/iwCnJs08qJrJwHgbx2/AI48TFCYF Zi+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=UJ5NATux; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s128si1407104oig.204.2019.12.10.00.15.23; Tue, 10 Dec 2019 00:15:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=UJ5NATux; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727007AbfLJIO4 (ORCPT + 99 others); Tue, 10 Dec 2019 03:14:56 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:45567 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726071AbfLJIOy (ORCPT ); Tue, 10 Dec 2019 03:14:54 -0500 X-UUID: a18674d7b33c423e9e67b7440f4771cf-20191210 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=c2C/fEHYw/8uqadmiP2m2xa2hsUpAd52urXVJTPlYck=; b=UJ5NATuxMtqHln5i6BTpWiLnxGKgWvp4DpRsKVO2xdnz2cJaT4XL8F/T5fK3CTF4nAai0EKPAcqp+rr8eCLq7uURJv5e5h+ZIzKLSAB4zgnchXesQLo0uFS8vs5w2yp49j6bez1z3v/uN+1+Lpq0uYid9awCqzvbnovrooEysu4=; X-UUID: a18674d7b33c423e9e67b7440f4771cf-20191210 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1965641267; Tue, 10 Dec 2019 16:14:46 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Dec 2019 16:14:31 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 10 Dec 2019 16:14:26 +0800 From: Landen Chao To: , , , , , CC: , , , , , , , , Landen Chao Subject: [PATCH net-next 2/6] net: dsa: mt7530: Extend device data ready for adding a new hardware Date: Tue, 10 Dec 2019 16:14:38 +0800 Message-ID: <2d546d6bb15ff8b4b75af2220e20db4e634f4145.1575914275.git.landen.chao@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QWRkIGEgc3RydWN0dXJlIGhvbGRpbmcgcmVxdWlyZWQgb3BlcmF0aW9ucyBmb3IgZWFjaCBkZXZp Y2Ugc3VjaCBhcyBkZXZpY2UNCmluaXRpYWxpemF0aW9uLCBQSFkgcG9ydCByZWFkIG9yIHdyaXRl LCBhIGNoZWNrZXIgd2hldGhlciBQSFkgaW50ZXJmYWNlIGlzDQpzdXBwb3J0ZWQgb24gY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