lkml.org 
[lkml]   [2021]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] i2c: tegra: Add SMBus block read and SMBus alert functions
From
Date
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.

\
 
 \ /
  Last update: 2021-12-11 21:13    [W:0.065 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site