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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5BD1C19F2A for ; Mon, 8 Aug 2022 03:00:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 237F9848D4; Mon, 8 Aug 2022 05:00:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mediatek.com header.i=@mediatek.com header.b="H1c7kEv9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 837A1848E2; Mon, 8 Aug 2022 05:00:45 +0200 (CEST) Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A11A7845F6 for ; Mon, 8 Aug 2022 05:00:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=weijie.gao@mediatek.com X-UUID: 569ec4476060488b8ac413d2735dcdb4-20220808 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=VswHZrWG2afBk4/yrMfBUab7Cq0808rXUsf0Lskyhbk=; b=H1c7kEv9m8emVWW7j/swe+TNjnvDU2BdYykPoNe3WjLlHrSQWGI+e7PbJnpILWA1UzLcr5pmKfB9WUHiEM0nLj5M9vO6gZHurq0xI90Yb4pI4mqv55kKrvuPERswkOy5kNQaWZP+u0fzp0PKCbqWfT5dOT/kJjHfzX3t6cPRsmM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.8, REQID:40413e93-18ba-4d46-89f0-6436abbb3bc4, OB:0, LO B:0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:0 X-CID-META: VersionHash:0f94e32, CLOUDID:9201059c-da39-4e3b-a854-56c7d2111b46, C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil ,QS:nil,BEC:nil,COL:0 X-UUID: 569ec4476060488b8ac413d2735dcdb4-20220808 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 400075472; Mon, 08 Aug 2022 11:00:34 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.186) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Mon, 8 Aug 2022 11:00:33 +0800 Received: from mcddlt001.gcn.mediatek.inc (10.19.240.15) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Mon, 8 Aug 2022 11:00:32 +0800 Message-ID: Subject: Re: [PATCH 17/31] i2c: add support for MediaTek I2C interface From: Weijie Gao To: Simon Glass CC: U-Boot Mailing List , GSS_MTK_Uboot_upstream , Heiko Schocher Date: Mon, 8 Aug 2022 11:00:32 +0800 In-Reply-To: References: <0f000098b0b4265012bdfd689ea7fcc9cf084cea.1659581119.git.weijie.gao@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Thu, 2022-08-04 at 07:57 -0600, Simon Glass wrote: > Hi Weijie, > > On Wed, 3 Aug 2022 at 21:38, Weijie Gao > wrote: > > > > This patch adds support for MediaTek I2C interface > > > > Signed-off-by: Weijie Gao > > --- > > drivers/i2c/Kconfig | 9 + > > drivers/i2c/Makefile | 1 + > > drivers/i2c/mtk_i2c.c | 822 > > ++++++++++++++++++++++++++++++++++++++++++ > > 3 files changed, 832 insertions(+) > > create mode 100644 drivers/i2c/mtk_i2c.c > > > > Reviewed-by: Simon Glass > > [..] > > > diff --git a/drivers/i2c/mtk_i2c.c b/drivers/i2c/mtk_i2c.c > > new file mode 100644 > > index 0000000000..1d4a93f8c9 > > --- /dev/null > > +++ b/drivers/i2c/mtk_i2c.c > > @@ -0,0 +1,822 @@ > > +// SPDX-License-Identifier: GPL-2.0+ > > +/* > > + * Copyright (C) 2022 MediaTek Inc. All Rights Reserved. > > + * > > + * Author: Mingming Lee > > + * > > + * MediaTek I2C Interface driver > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > [..] > > > + > > +U_BOOT_DRIVER(mtk_i2c) = { > > + .name = "mtk_i2c", > > + .id = UCLASS_I2C, > > + .of_match = mtk_i2c_ids, > > + .of_to_plat = mtk_i2c_ofdata_to_platdata, > > mtk_i2c_of_to_plat (for consistency) OK. > > > + .probe = mtk_i2c_probe, > > + .priv_auto = sizeof(struct mtk_i2c_priv), > > + .ops = &mtk_i2c_ops, > > +}; > > -- > > 2.17.1 > > > > Regards, > Simon