From patchwork Tue Dec 16 14:40:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 421950 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id F26D7140082 for ; Wed, 17 Dec 2014 01:40:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750866AbaLPOkG (ORCPT ); Tue, 16 Dec 2014 09:40:06 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:37371 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbaLPOkF (ORCPT ); Tue, 16 Dec 2014 09:40:05 -0500 Received: by mail-pa0-f51.google.com with SMTP id ey11so14268997pad.38 for ; Tue, 16 Dec 2014 06:40:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=FrweXqAwsawNaNTDengIsITBPkS2sXwVNgOZrLPJWj4=; b=GZWTdAxo5vFTA/CkvSdP3zLIw8BckUpdMUNnIkd0E/2V5jIVM9bLeeDvZ0A0lIO6pU ULiqTkQkVU2+iEHlKxdttrX5v3hZGaU4mwjHCxoReXo+DP64k5RwKUluAfw5Z3KJj/D2 Nyhr8eVM6mv0HTb8z9l1TgWAOo6ePXjjN5X6qWt77Yod9ogQgOZLkTnsoLryWLGfpxHh 0GCaVd6XdcY4nUf1E9J8g+jB6m2DDO7Ff18qMZVqfFpSijWfPr1PmLscivn3FxroMW78 P2OUdvZPBoRtZ0BZhVWdlaHbKdKIZs/U5l14fl0ZGFOqbXO5K0MTZgjRI+OA5uv7vfCc 8jFg== X-Gm-Message-State: ALoCoQkylGG87cAEoH/SEOnlaCoeG5d0A7Uw9nzXX1ZAHngQ48CuEooiADGchFK7Z1u58f3QiHMe X-Received: by 10.68.213.138 with SMTP id ns10mr60784677pbc.50.1418740804482; Tue, 16 Dec 2014 06:40:04 -0800 (PST) Received: from [192.168.0.104] (218-164-128-39.dynamic.hinet.net. [218.164.128.39]) by mx.google.com with ESMTPSA id w5sm1226791pds.25.2014.12.16.06.40.02 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Tue, 16 Dec 2014 06:40:03 -0800 (PST) Message-ID: <1418740800.10278.1.camel@phoenix> Subject: [PATCH RFT] gpio: dln2: Fix gpio output value in dln2_gpio_direction_output() From: Axel Lin To: Linus Walleij , Alexandre Courbot Cc: Daniel Baluta , "linux-gpio@vger.kernel.org" Date: Tue, 16 Dec 2014 22:40:00 +0800 X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org dln2_gpio_direction_output() ignored the state passed into it. Fix it. Signed-off-by: Axel Lin Tested-by: Daniel Baluta Acked-by: Alexandre Courbot Reviewed-by: Octavian Purdila --- I don't have this hardware handy, so only compile test. drivers/gpio/gpio-dln2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-dln2.c b/drivers/gpio/gpio-dln2.c index 978b51e..1434844 100644 --- a/drivers/gpio/gpio-dln2.c +++ b/drivers/gpio/gpio-dln2.c @@ -267,6 +267,7 @@ static int dln2_gpio_direction_input(struct gpio_chip *chip, unsigned offset) static int dln2_gpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) { + dln2_gpio_set(chip, offset, value); return dln2_gpio_set_direction(chip, offset, DLN2_GPIO_DIRECTION_OUT); }