i2c: pca954x: improve usage of gpiod API
Since 39b2bbe3 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for outputs. Also there is an *_optional variant that serves well here. The sematics is slightly changed here by using it. Now if a reset gpio is specified and getting hold on it fails, pca954x_probe fails, too. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
Showing
想要评论请 注册 或 登录