Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1089392ybe; Mon, 2 Sep 2019 14:17:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGxyypc7EEl21YdNM9lE6pzNhUQzIEw0jnU2pCTnvn4q0h4DPkFZe21xDz55JEMAwKUQTs X-Received: by 2002:a17:90a:c20c:: with SMTP id e12mr3380436pjt.14.1567459045854; Mon, 02 Sep 2019 14:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567459045; cv=none; d=google.com; s=arc-20160816; b=Ruk3BJVQUN/H/CR7waNfWgXoidlcMPxCwhDTCmKtKAtwUKWQKeYAWDhPObfO7rupRi kyWfPWMXQ43NV6FanYjvSKM9KJei/4zondYnwxXI4e0sDdaQK7mGdmIOeZ3b6xhViGda sFW7A0aRU9Wux6Beqqsm25yTTX69ssxztWMWT0xtWEcz/k0/pZ/2dZ6go3slcvYXw0MS /dc2S52XskSXFbPzm+PkTLQzhwpzYeMPlHhxQcMZ61XLDRHENElZrD3Jr1nesX1QReci dJXwM4mlQREGlbkZPxvtHVBY/hrAluI4wDZi4TyQ4JIGhVLIbOtTqMfNzuSw8nOVs47H 83ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UzPPEolNh35wWErUe2k2fZkCpaurwJuZg/+ELGsiOFk=; b=Rxw0TjK35KJDwdIz5xm7ZmDG/1xBQ8z3KfeFuBvAJYQxoL+hN/MHVbqRXqjqkXko3f 5K7ZWS+nYA1KDljY9pTDtLW7FKnLMuH1lchAK7ZcOH2SbL8zCl7IL86mEhOb5kgp8h0V DM5d7zcN4kVDqUhs9TW2Ejnw2jicblAuHeYuxQ6hyrvcE83X8bNWd3CpIsWNU18cmq+M WfxPnG9p70i/pgD+xtjZQ/BVeAaNnMOfu2d0UxKNzEnOAYkBGDpFZb1E3DTk4BBSkdF4 +xSaxDXumCq3jJFeYES2Srm3GlbaJTA7psJ8V5Niv/Hn6wKeBjYY5lxHLIzzlSh4gXub hjiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yw0hv6WP; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si5805979pgy.588.2019.09.02.14.17.10; Mon, 02 Sep 2019 14:17:25 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yw0hv6WP; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727555AbfIBVQ0 (ORCPT + 99 others); Mon, 2 Sep 2019 17:16:26 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:34216 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726979AbfIBVQZ (ORCPT ); Mon, 2 Sep 2019 17:16:25 -0400 Received: by mail-pf1-f194.google.com with SMTP id b24so9537181pfp.1; Mon, 02 Sep 2019 14:16:25 -0700 (PDT) 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=UzPPEolNh35wWErUe2k2fZkCpaurwJuZg/+ELGsiOFk=; b=Yw0hv6WPGdzg89CqQgm2pjeaLxqK1SCjR9n0FGD5Y3r2LiFeW+G9UtCLiznr5RxuhI 7tE3P5Li0aUEBa2fZHPoHoot/SSNCoFmsbvAnqNg9aZX2mbt5QhkqpDML4MSTi/QpcpM lxoK1qzZaPS5EA4osYjqQ2CDcDD+DBrRlxvXe3RImogXOtyntEvvi2ecDgvwyaHy84XK RitqIfgPXhoh1+oroTx4tktLbK5Kqc/1Le9S3MJUcn/vj85LdAkINB8xrvuPRrvcF1wt XG1FcNeH0sAxpcl72s4C6ov/yEFMMPgQchAya1U+z4GvOBJqX/jHRkG2XgpuDvMlv4Jh ZY6g== 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=UzPPEolNh35wWErUe2k2fZkCpaurwJuZg/+ELGsiOFk=; b=ARQ3o811yRXmggLTx8OkI3mbSVpG6KMzb1MGHaWrZAin8K/IqLuEP+5qGwCiuzjIqb y/jnvglpTn2SDYI7QXVQBX787+BExjxoa3nYf4/0vFGkgJaiUax0WLu0iDm/Ue6Ynkco sej8Y+FNVMAuIcPfT1mNtoI99Djpc11iLnJs25W8YkB7rmbqkJcpwETVAYHzrKrsmV+6 pS5IyNtuSpkoiPFmFO9tzXiltihAdtXVreYrZIj/gAI6OaDrkQWlaEgrxVJZrc0zK0x0 U37tMxh7e9msNjuHqRvBqFnV3U8BS8KaSTSQVvmFDMLiSyduCqIQIj1jf74ODbiBoFb9 idhg== X-Gm-Message-State: APjAAAXLlRdE0X02u4waistTfWei/DwEUpv5/ng/4mimR9VfveE9aywx wmlSp1F5CIeIU9aYD0G8NbYlY5dJfLVVSEPwcf8= X-Received: by 2002:a63:6eca:: with SMTP id j193mr26308059pgc.74.1567458984928; Mon, 02 Sep 2019 14:16:24 -0700 (PDT) MIME-Version: 1.0 References: <20190711102601.20582-1-chuanhua.han@nxp.com> In-Reply-To: From: Andy Shevchenko Date: Tue, 3 Sep 2019 00:16:12 +0300 Message-ID: Subject: Re: [PATCH] ACPI: support for NXP i2c controller To: "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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ... > > + .acpi_match_table = ACPI_PTR(i2c_imx_acpi_ids), Since there is no #ifdef guard no need to use ACPI_PTR(). -- With Best Regards, Andy Shevchenko