[PATCH linux dev-4.10 v6 2/2] drivers/leds: pca955x count LED lines as GPIO
Joel Stanley
joel at jms.id.au
Mon Jul 31 12:16:12 AEST 2017
On Sun, Jul 30, 2017 at 10:20 AM, Brad Bishop
<bradleyb at fuzziesquirrel.com> wrote:
>
>> On Jul 29, 2017, at 2:36 PM, Christopher Bostic <cbostic at linux.vnet.ibm.com> wrote:
>>
>> In order for gpio-keys-polled driver to properly register pins
>> connected to the pca955x chip it is necessary to count 'LED' lines
>> as part of the total gpio count. The assocated gpio_chip struct
>> for the pca955x is then set to all available I/O (LEDS and 'GPIO').
>> Failure to do so will cause any pin # > GPIO pin count to fail
>> gpio-keys-polled probe/registration as it falls outside the bounds
>> of what the gpio_chip struct indicates is available.
>>
>> Signed-off-by: Christopher Bostic <cbostic at linux.vnet.ibm.com>
> Tested-by: Brad Bishop <bradleyb at fuzziesquirrel.com>
>
>> ---
>> drivers/leds/leds-pca955x.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c
>> index 9216742..4fa58b9 100644
>> --- a/drivers/leds/leds-pca955x.c
>> +++ b/drivers/leds/leds-pca955x.c
>> @@ -472,6 +472,8 @@ static int pca955x_probe(struct i2c_client *client,
>> ngpios++;
>> break;
>> case PCA955X_TYPE_LED:
>> + ngpios++;
>> +
Hey Cedric, does this look like the correct fix?
More information about the openbmc
mailing list