Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1501251ybe; Mon, 2 Sep 2019 22:43:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHE17xXCdcXvWD4pA1aMcMg14qpe8fid89qvj41VVcVR6kkZ7/gcggvWdlvS7cST5DgH7e X-Received: by 2002:a62:1511:: with SMTP id 17mr11339943pfv.119.1567489381842; Mon, 02 Sep 2019 22:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567489381; cv=none; d=google.com; s=arc-20160816; b=DRdwQLhorUZrQemP4TLt5tQFRsyhVY7by/1/RBMQheDfHwmSocPC2IwV18ePDFP4KV lnyfs0eNlsq4f0GZxABJGYNEY/e6oqAdHYJqkRgQyzCugonMQkDYPxxB9YDTdRljg7sl 2v0NNaxMwah6tDv/BNYan6QH2uJRrgnpepaK2Uq43H0tFRCs0/JJTdKFek2lm+awybfr bEg9q+Il/0zK+OnJXEQlcxTNSFSoqjjLgw4NRxxSpbTAGO7xYWZCnkzJYjh6Cloqdgyy mTwQfPqqXcIE2z6S57XIHxnSd5EgYhzyhwK9JJ0lcM04ftKRDeiBM5coRxyzoySzTyzo yVlg== 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=bjh4ej+/4kd10w8srOXNOn7Jskz/0ImZit3U18Y3suw=; b=iLYStrNysLM23gVnecdEDgu7CKIqytrnhE9U+TTKmX3E9Dq/evmj8rZZauVtOW//My jKQnlHCdWgSldOCRy30gm1j/PCG4nFeutuHW/fBcT09ioNehkkWVa/sqM4nGsRtA8uDG zFe0d41Boy2fh+zQfRtgAEug9P5bQzJX10N+JlNj8pfsC0tce7NgtNUaO6qK2ESKpShE dAcU9yNvCP7xNq7FMoHsIfoS6VH5ysaGLEXuBHXz5fUXhYIzEOPRwNAC2UXGvApZJ4Ub KBktu5EFXwyABL/7FsqAX5l4GcI3/fABEN1/2Q5Ksvl0jlRRPrg73wQ/6QOSuV9n3i/8 L8tQ== 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 b41si13574917pla.155.2019.09.02.22.42.45; Mon, 02 Sep 2019 22:43:01 -0700 (PDT) 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 S1726492AbfICFlv (ORCPT + 99 others); Tue, 3 Sep 2019 01:41:51 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:39597 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbfICFlu (ORCPT ); Tue, 3 Sep 2019 01:41:50 -0400 Received: from soja.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:13da]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1i51Za-0005vB-Fx; Tue, 03 Sep 2019 07:41:46 +0200 Subject: Re: [PATCH] ACPI: support for NXP i2c controller To: Andy Shevchenko , "Rafael J. Wysocki" Cc: Chuanhua Han , Wolfram Sang , "Rafael J. Wysocki" , Len Brown , Shawn Guo , Sascha Hauer , ACPI Devel Maling List , Linux Kernel Mailing List , linux-i2c , Linux ARM , Leo Li , Meenakshi Aggarwal , Udit Kumar References: <20190711102601.20582-1-chuanhua.han@nxp.com> From: Oleksij Rempel Message-ID: <896b88d4-9d1b-922b-1784-55ef9a1a1830@pengutronix.de> Date: Tue, 3 Sep 2019 07:41:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:13da X-SA-Exim-Mail-From: o.rempel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 02.09.19 23:16, Andy Shevchenko wrote: > On Mon, Sep 2, 2019 at 11:58 PM Rafael J. Wysocki wrote: >> >> On Thu, Jul 11, 2019 at 12:35 PM Chuanhua Han wrote: >>> >>> Enable NXP i2c controller to boot with ACPI >>> >>> Signed-off-by: Meenakshi Aggarwal >>> Signed-off-by: Udit Kumar >>> Signed-off-by: Chuanhua Han >> >> Wolfram, any objections to this from the i2c side? > > May I propose amendment(s)? > >>> @@ -44,6 +44,7 @@ >>> #include >>> #include >>> #include > >>> +#include > > If it's kept in order, better to go with it. (Yes, it is as I have checked) > However, property.h should be included instead, see below. > >>> const struct of_device_id *of_id = of_match_device(i2c_imx_dt_ids, >>> &pdev->dev); >>> + const struct acpi_device_id *acpi_id = >>> + acpi_match_device(i2c_imx_acpi_ids, >>> + &pdev->dev); > > >>> if (of_id) >>> i2c_imx->hwdata = of_id->data; >>> + else if (acpi_id) >>> + i2c_imx->hwdata = (struct imx_i2c_hwdata *) >>> + acpi_id->driver_data; > > > The above altogher may be replaced with > > const struct imx_i2c_hwdata *match; > ... > match = device_get_match_data(&pdev->dev); > if (match) > i2c_imx->hwdata = match; > else > ... Instead of "may be replaced", I would say: it should be replaced :) >>> + .acpi_match_table = ACPI_PTR(i2c_imx_acpi_ids), > > Since there is no #ifdef guard no need to use ACPI_PTR(). > What iMX/(other NXP?) SoCs are with ACPI support? Where I can get one? I would like to know more about it. Kind regards, Oleksij Rempel -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |