[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Nov 2014 13:50:28 +0200
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: "David E. Box" <david.e.box@...ux.intel.com>
Cc: wsa@...-dreams.de, jdelvare@...e.de, arnd@...db.de,
maxime.ripard@...e-electrons.com, dianders@...omium.org,
u.kleine-koenig@...gutronix.de,
laurent.pinchart+renesas@...asonboard.com,
boris.brezillon@...e-electrons.com, maxime.coquelin@...com,
andrew@...n.ch, sjg@...omium.org, markus.mayer@...aro.org,
ch.naveen@...sung.com, jacob.jun.pan@...ux.intel.com,
max.schwarz@...ine.de, skuribay@...ox.com,
Romain.Baeriswyl@...lis.com, wenkai.du@...el.com,
chiau.ee.chew@...el.com, christian.ruppert@...lis.com,
alan@...ux.intel.com, linux-kernel@...r.kernel.org,
linux-i2c@...r.kernel.org
Subject: Re: [PATCH V2] i2c-designware: Add Intel Baytrail PMIC I2C bus
support
On Tue, Sep 23, 2014 at 11:40:26AM -0700, David E. Box wrote:
> +void baytrail_evaluate_sem(struct dw_i2c_dev *dev)
> +{
> + acpi_status status;
> + unsigned long long shared_host = 0;
> + acpi_handle handle;
> +
> + if (!dev || !dev->dev) {
> + pr_err("%s:%d: device is NULL\n", __func__, __LINE__);
Not sure if it is useful to print things like above.
> + return;
> + }
> +
> + handle = ACPI_HANDLE(dev->dev);
> + if (!handle)
> + return;
> +
> + status = acpi_evaluate_integer(handle, "_SEM", NULL, &shared_host);
Maybe it is better to check first if the operation succeeded before
touching shared_host?
if (ACPI_SUCCESS(status) && shared_host) {
}
Otherwise ACPI parts look good to me.
> +
> + if (shared_host) {
> + dev_info(dev->dev, "I2C bus managed by PUNIT\n");
> + dev->has_hw_lock = true;
> + dev->pm_runtime_disabled = true;
> + }
> +}
> +EXPORT_SYMBOL(baytrail_evaluate_sem);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists