linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Biwen Li <biwen.li@nxp.com>
To: "'andy.shevchenko@gmail.com'" <andy.shevchenko@gmail.com>,
	"'rafael@kernel.org'" <rafael@kernel.org>,
	Leo Li <leoyang.li@nxp.com>,
	Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>,
	Udit Kumar <udit.kumar@nxp.com>,
	"'wsa@the-dreams.de'" <wsa@the-dreams.de>,
	"'rjw@rjwysocki.net'" <rjw@rjwysocki.net>
Cc: Chuanhua Han <chuanhua.han@nxp.com>,
	"'shawnguo@kernel.org'" <shawnguo@kernel.org>,
	"'s.hauer@pengutronix.de'" <s.hauer@pengutronix.de>,
	"'linux-acpi@vger.kernel.org'" <linux-acpi@vger.kernel.org>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"'linux-i2c@vger.kernel.org'" <linux-i2c@vger.kernel.org>,
	"'linux-arm-kernel@lists.infradead.org'" 
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH] ACPI: support for NXP i2c controller
Date: Thu, 5 Sep 2019 15:04:59 +0000	[thread overview]
Message-ID: <DB7PR04MB449006447F52FBA418278E868FBB0@DB7PR04MB4490.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <DB7PR04MB4490E737C00CF9CA173AB2898FBB0@DB7PR04MB4490.eurprd04.prod.outlook.com>

> 
> > Hi,
> >
> > On 02.09.19 23:16, Andy Shevchenko wrote:
> > > On Mon, Sep 2, 2019 at 11:58 PM Rafael J. Wysocki
> > > <rafael@kernel.org>
> > wrote:
> > >>
> > >> On Thu, Jul 11, 2019 at 12:35 PM Chuanhua Han
> > >> <chuanhua.han@nxp.com>
> > wrote:
> > >>>
> > >>> Enable NXP i2c controller to boot with ACPI
> > >>>
> > >>> Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
> > >>> Signed-off-by: Udit Kumar <udit.kumar@nxp.com>
> > >>> Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com>
> > >>
> > >> Wolfram, any objections to this from the i2c side?
> > >
> > > May I propose amendment(s)?
> > >
> > >>> @@ -44,6 +44,7 @@
> > >>>   #include <linux/pm_runtime.h>
> > >>>   #include <linux/sched.h>
> > >>>   #include <linux/slab.h>
> > >
> > >>> +#include <linux/acpi.h>
> > >
> > > 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.
Ok, got it. I will fix it in v2.
> > >
> > >>>          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
> > > ...
> >
Ok, I will correct it in v2.
> > 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.
> - Nxp has variety Socs, include i.MX, Layerscape, etc.
> - You can get one from here
> https://www.nxp.com/design/qoriq-developer-resources/qoriq-lx2160a-develo
> pment-board:LX2160A-RDB
> 
> >
> > Kind regards,
> > Oleksij Rempel
> >
> > --
> > Pengutronix e.K.                           |
> > |
> > Industrial Linux Solutions                 |
> > https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.p
> > e
> ngutronix.de%2F&amp;data=02%7C01%7Cmeenakshi.aggarwal%40nxp.com%
> >
> 7C640eb015a91f4959d3b508d7303168fb%7C686ea1d3bc2b4c6fa92cd99c5c
> >
> 301635%7C0%7C0%7C637030861076879938&amp;sdata=sPWtkVtHHDvoRR
> > ZmWJuipCO%2BEwG%2BcupgZvcIV1%2BrlEY%3D&amp;reserved=0  |
> Peiner Str.
> > 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0
> > |
> > Amtsgericht Hildesheim, HRA 2686           | Fax:
> > +49-5121-206917-5555 |

  reply	other threads:[~2019-09-05 15:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 10:26 [PATCH] ACPI: support for NXP i2c controller Chuanhua Han
2019-07-18  8:45 ` Rafael J. Wysocki
2019-07-18  8:48   ` [EXT] " Chuanhua Han
2019-09-02 20:56 ` Rafael J. Wysocki
2019-09-02 21:02   ` Wolfram Sang
2019-09-02 21:16   ` Andy Shevchenko
2019-09-03  5:41     ` Oleksij Rempel
     [not found]       ` <AM7PR04MB6885DB03C6B96C7932DDA74B8EB90@AM7PR04MB6885.eurprd04.prod.outlook.com>
2019-09-05  4:33         ` Biwen Li
2019-09-05 15:04           ` Biwen Li [this message]
2019-09-03 10:50   ` Oleksij Rempel
2019-09-03 11:08     ` Meenakshi Aggarwal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB7PR04MB449006447F52FBA418278E868FBB0@DB7PR04MB4490.eurprd04.prod.outlook.com \
    --to=biwen.li@nxp.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=chuanhua.han@nxp.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=meenakshi.aggarwal@nxp.com \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=udit.kumar@nxp.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).