From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753935Ab0JAXBV (ORCPT ); Fri, 1 Oct 2010 19:01:21 -0400 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:59692 "EHLO opensource2.wolfsonmicro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752301Ab0JAXBU (ORCPT ); Fri, 1 Oct 2010 19:01:20 -0400 Date: Fri, 1 Oct 2010 16:01:33 -0700 From: Mark Brown To: Masayuki Ohtak Cc: meego-dev@meego.com, Andrew Morton , Samuel Ortiz , Randy Dunlap , Alek Du , Richard =?iso-8859-1?Q?R=F6jfors?= , Mike Frysinger , linux-kernel@vger.kernel.org, qi.wang@intel.com, andrew.chih.howe.khor@intel.com, kok.howg.ewe@intel.com, joel.clark@intel.com, yong.y.wang@intel.com, Tomoya MORINAGA , margie.foster@intel.com Subject: Re: [MeeGo-Dev][PATCH v3] Topcliff: Update PCH_GPIO driver to 2.6.35 Message-ID: <20101001230133.GG21157@opensource.wolfsonmicro.com> References: <4CA29466.602@dsn.okisemi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CA29466.602@dsn.okisemi.com> X-Cookie: You'll be sorry... User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 29, 2010 at 10:20:38AM +0900, Masayuki Ohtak wrote: > +static int pch_gpio_direction_output(struct gpio_chip *gpio, unsigned nr, > + int val) > +{ > + struct pch_gpio *chip = container_of(gpio, struct pch_gpio, gpio); > + u32 pm; > + > + mutex_lock(&chip->lock); > + pm = ioread32(&chip->reg->pm) & PCH_GPIO_ALL_PINS; > + pm |= (1 << nr); > + iowrite32(pm, &chip->reg->pm); > + mutex_unlock(&chip->lock); > + > + return 0; > +} This doesn't do anything with val - it should be doing the equivalent of a gpio_set() to set the initial value of the GPIO when switching it to output mode. Otherwise this looks good.