From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752586AbcF2MkW (ORCPT ); Wed, 29 Jun 2016 08:40:22 -0400 Received: from bear.ext.ti.com ([198.47.19.11]:50085 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752164AbcF2MkU (ORCPT ); Wed, 29 Jun 2016 08:40:20 -0400 Subject: Re: [PATCH v4 3/3] gpio: lp873x: Add support for General Purpose Outputs To: Manish Badarkhe , Keerthy References: <1467192604-29149-1-git-send-email-j-keerthy@ti.com> <1467192604-29149-4-git-send-email-j-keerthy@ti.com> CC: , , Lee Jones , , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , , Mark Brown , , Tony Lindgren From: Keerthy Message-ID: <5773C1A8.2070504@ti.com> Date: Wed, 29 Jun 2016 18:10:08 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 29 June 2016 04:15 PM, Manish Badarkhe wrote: > Hi Keerthy, > > sorry ignore my last two comments in previous mail. > > On Wed, Jun 29, 2016 at 4:13 PM, Manish Badarkhe > wrote: >> Hi Keerthy >> >> Some minor comment >> >>> +static int lp873x_gpio_direction_output(struct gpio_chip *chip, >>> + unsigned int offset, int value) >>> +{ >>> + struct lp873x_gpio *gpio = gpiochip_get_data(chip); >>> + >>> + /* Set the initial value */ >>> + regmap_update_bits(gpio->lp873->regmap, LP873X_REG_GPO_CTRL, >>> + BIT(offset * 4), value ? BIT(offset * 4) : 0); >>> + >>> + return 0; >>> +} > > Error needs to be return, this function always return 0. Yes! I can just do: return regmap_update_bits(gpio->lp873->regmap, LP873X_REG_GPO_CTRL, BIT(offset * 4), value ? BIT(offset * 4) : 0); > > Regards > Manish Badarkhe >