[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9443afa6-b668-ae31-2413-05aa95a9567d@gmail.com>
Date: Thu, 9 Dec 2021 18:43:51 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Akhil R <akhilrajeev@...dia.com>, andy.shevchenko@...il.com,
christian.koenig@....com, dri-devel@...ts.freedesktop.org,
jonathanh@...dia.com, ldewangan@...dia.com,
linaro-mm-sig@...ts.linaro.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-tegra@...r.kernel.org, p.zabel@...gutronix.de,
sumit.semwal@...aro.org, thierry.reding@...il.com,
robh+dt@...nel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 2/2] i2c: tegra: Add SMBus block read and SMBus alert
functions
09.12.2021 18:05, Akhil R пишет:
> +static int tegra_i2c_setup_smbalert(struct tegra_i2c_dev *i2c_dev)
> +{
> + struct tegra_i2c_smbalert *smbalert = &i2c_dev->smbalert;
> + struct gpio_desc *alert_gpiod;
> + struct i2c_client *ara;
> +
> + alert_gpiod = devm_gpiod_get(i2c_dev->dev, "smbalert", GPIOD_IN);
> + if (IS_ERR(alert_gpiod))
> + return PTR_ERR(alert_gpiod);
> +
> + smbalert->alert_data.irq = gpiod_to_irq(alert_gpiod);
> + if (smbalert->alert_data.irq <= 0)
> + return smbalert->alert_data.irq;
Why GPIO is needed at all if what's actually needed is the interrupt?
Powered by blists - more mailing lists