[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfPPpTNCaM+GhcqZS53ts-20GBzm+4OWLAjND=z79pgxg@mail.gmail.com>
Date: Thu, 25 Nov 2021 21:28:56 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Akhil R <akhilrajeev@...dia.com>
Cc: Christian Koenig <christian.koenig@....com>,
Dmitry Osipenko <digetx@...il.com>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Jon Hunter <jonathanh@...dia.com>,
Laxman Dewangan <ldewangan@...dia.com>,
linaro-mm-sig@...ts.linaro.org,
linux-i2c <linux-i2c@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
linux-tegra <linux-tegra@...r.kernel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Sumit Semwal <sumit.semwal@...aro.org>,
Thierry Reding <thierry.reding@...il.com>
Subject: Re: [PATCH v4] i2c: tegra: Add the ACPI support
On Thu, Nov 25, 2021 at 6:54 PM Akhil R <akhilrajeev@...dia.com> wrote:
>
> Add support for the ACPI based device registration so that the driver
> can be also enabled through ACPI table.
>
> This does not include the ACPI support for Tegra VI and DVC I2C.
Thanks for an update, my comments below.
...
> - err = reset_control_reset(i2c_dev->rst);
> + if (handle)
> + err = acpi_evaluate_object(handle, "_RST", NULL, NULL);
Does it compile for CONFIG_ACPI=n case?
> + else
> + err = reset_control_reset(i2c_dev->rst);
If not, you will need something like this instead:
#ifdef CONFIG_ACPI
err = acpi_evaluate_object(ACPI_HANDLE(...), "_RST", NULL, NULL);
#else
err = reset_control_reset(i2c_dev->rst);
#endif
...
> + err = device_property_read_u32(i2c_dev->dev, "clock-frequency",
> + &i2c_dev->bus_clk_rate);
> if (err)
> i2c_dev->bus_clk_rate = I2C_MAX_STANDARD_MODE_FREQ;
Actually you need to switch to use i2c_timings data structure and
corresponding methods.
This change will be incorporated there. I.o.w. do it as a prerequisite
to this patch.
...
> + if (ACPI_HANDLE(i2c_dev->dev))
> + return 0;
With above mentioned ifdeffery this may be converted back to
has_acpi_companion() which is slightly better in this case.
> + if (ACPI_HANDLE(i2c_dev->dev))
> + return 0;
Ditto.
P.S> Sorry if I missed something in the previous reviews.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists