lkml.org 
[lkml]   [2019]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] i2c: mux-gpio: Use "mux" con_id to find channel GPIOs
On Sat, Jun 15, 2019 at 12:51 AM Serge Semin <fancer.lancer@gmail.com> wrote:
>
> Recent patch - ("i2c: mux/i801: Switch to use descriptor passing")
> altered the i2c-mux-gpio driver to use the GPIO-descriptor
> based interface to find and request the GPIOs then being utilized
> to select and deselect the channels of GPIO-driven i2c-muxes. Even
> though the proposed modification was correct for the platform_data-based
> systems, it was invalid for the OF-based ones and caused the kernel
> to crash at the driver probe procedure. There were two problems with
> that modification. First of all the gpiod_count() and gpiod_get_index()
> were called with NULL con_id.

I always thought that this means "count me all GPIO's for this device
despite their names" and "get me GPIO by index despite it's name".
What's went wrong?


> Due to this the methods couldn't find
> the "mux-gpios" OF-properties and returned the -ENOENT error. Secondly
> the return value of gpiod_count() wasn't checked for being negative,
> which in case of an error caused the driver to crash. This patch
> is intended to fix the described problems.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2019-06-15 13:44    [W:0.062 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site