Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2388298imu; Thu, 29 Nov 2018 04:18:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/Ws+Vg13q6uOcefGGWUwRQEdTn6nq5c+qqO+muFzt1faCO/RFyrWFQmgUbfNka1ZsRRSLut X-Received: by 2002:a62:6d84:: with SMTP id i126mr1139142pfc.109.1543493930617; Thu, 29 Nov 2018 04:18:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543493930; cv=none; d=google.com; s=arc-20160816; b=OcQnFJer37hIeY85oYLc8Gu2UqtqEUP6pyzv7AWafhIJuQHFIpZhEOT+NnrU5Rky0c HK07l+MrgA9oPQKu9bg1zdlkM44RvoRKdAmb504N0daB9B1cWdqkDrkH9ncvopsakDew /sARF+pXECvvC1CB9DTIa0Wp0LzwwhFDGbzT1XgeJTTMQbP1sJ7EY/lv9WbSKS9NFqd5 zEEPMQvgUCwJyWgQjUTZAuLrEFnNqtUeGPsqRUu7s+IhZGS0ec3stX9/xRXG+JVd2noi 2X3QwFm+ccc+q3iKEDyCX8HW4uhBOJBcUengzfuygRCVOwP7URtTHbTY+wEnQ89hxvdJ dwfw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=pi/aMuOGdGB5Dg6R9RhMc2AbSt4BOMB0OV2gzJn5Agk=; b=HIIFRR5cIhXYdKq/CrtVVmprfMdCGbB9I+x09xu3CpmL7/ZiKkFZgNo7Sj1sVmcXCM zmGXfhcIMHPlnm+qW0gez6dRJwCbTO2oiyLRbeUxY5F5AynRPHUQHAI33u5xSC3R6F0l Q7gIr1ldPfIzD0xFoLJ0wpqqw4wECSNS4THgTcmNDepkX+2+1mxA+9Vfor/jrsL0P75F VSHcwxZr7+STozqDe9KxVIQMiUh5Lq6je9IU4N2DEfh1DN+L3Lwzfchxy1TH+Zeg7koT tESKRFZsWbtBS6ElYvz1T1i0qC07h2nsC9s5DFEwRHGwP97ZnsahNC4yW4Uoh6UAxc4r xVhg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p64si1984091pfa.94.2018.11.29.04.18.34; Thu, 29 Nov 2018 04:18:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728111AbeK2XXC (ORCPT + 99 others); Thu, 29 Nov 2018 18:23:02 -0500 Received: from mail-sz2.amlogic.com ([211.162.65.114]:33739 "EHLO mail-sz2.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726683AbeK2XXC (ORCPT ); Thu, 29 Nov 2018 18:23:02 -0500 Received: from [10.28.16.74] (10.28.16.74) by mail-sz2.amlogic.com (10.28.11.6) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 29 Nov 2018 20:18:03 +0800 Subject: Re: [PATCH 2/2] i2c: meson: add support for Meson G12A SoC I2C controller To: Neil Armstrong , Jerome Brunet CC: Kevin Hilman , Carlo Caione , Rob Herring , Martin Blumenstingl , Michael Turquette , Stephen Boyd , Wolfram Sang , Mark Rutland , Jianxin Pan , Hanjie Lin , , , , , References: <1543489197-183181-1-git-send-email-jian.hu@amlogic.com> <1543489197-183181-3-git-send-email-jian.hu@amlogic.com> <865b607c-8419-9c9e-0a00-018e87adf8de@baylibre.com> From: Jian Hu Message-ID: Date: Thu, 29 Nov 2018 20:18:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <865b607c-8419-9c9e-0a00-018e87adf8de@baylibre.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.28.16.74] X-ClientProxiedBy: mail-sz2.amlogic.com (10.28.11.6) To mail-sz2.amlogic.com (10.28.11.6) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Neil, On 2018/11/29 19:26, Neil Armstrong wrote: > On 29/11/2018 11:59, Jian Hu wrote: >> Add compatible and data for G12A I2C controller. >> >> Signed-off-by: Jian Hu >> --- >> drivers/i2c/busses/i2c-meson.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c >> index 90f5d04..b86eed7 100644 >> --- a/drivers/i2c/busses/i2c-meson.c >> +++ b/drivers/i2c/busses/i2c-meson.c >> @@ -462,10 +462,15 @@ static int meson_i2c_remove(struct platform_device *pdev) >> .div_factor = 3, >> }; >> >> +static const struct meson_i2c_data i2c_g12a_data = { >> + .div_factor = 3, > > Especially if the div_factor is the same as AXG. > > If you have some other fixes for G12a in the pipe, you will add the new compatible and meson_i2c_data later, > for the div_factor, simply use the axg struct and compatible. > > Neil > For axg and g12a SoC, the div_factor is the same, and I have confirmed that they share the same IP. I prefer g12a uses axg's compatible and data if it is reasonable. I will just submit the i2c controller node in meson-g12a.dtsi. >> +}; >> + >> static const struct of_device_id meson_i2c_match[] = { >> { .compatible = "amlogic,meson6-i2c", .data = &i2c_meson6_data }, >> { .compatible = "amlogic,meson-gxbb-i2c", .data = &i2c_gxbb_data }, >> { .compatible = "amlogic,meson-axg-i2c", .data = &i2c_axg_data }, >> + { .compatible = "amlogic,meson-g12a-i2c", .data = &i2c_g12a_data }, >> {}, >> }; >> >> > > . >