[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <595413e0-3535-a40e-9a28-490d297c386a@gmail.com>
Date: Sat, 11 Dec 2021 23:12:39 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Akhil R <akhilrajeev@...dia.com>,
"andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
"christian.koenig@....com" <christian.koenig@....com>,
Jonathan Hunter <jonathanh@...dia.com>,
Laxman Dewangan <ldewangan@...dia.com>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
"sumit.semwal@...aro.org" <sumit.semwal@...aro.org>,
"thierry.reding@...il.com" <thierry.reding@...il.com>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH 2/2] i2c: tegra: Add SMBus block read and SMBus alert
functions
10.12.2021 12:38, Akhil R пишет:
>> Although, you shouldn't need it at all, use devm_gpiod_get_optional().
> smbus-alert is provided in the i2c dt bindings by default. I felt it is good
> to put it into use since the use case is same.
My point is that you don't need to use device_property_read_bool().
Instead, you could use devm_gpiod_get_optional() and check whether
returned GPIO is ERR or NULL (not present). Which could be a bit nicer
variant.
Powered by blists - more mailing lists