Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751367Ab1BZBBr (ORCPT ); Fri, 25 Feb 2011 20:01:47 -0500 Received: from mail.perches.com ([173.55.12.10]:3945 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750804Ab1BZBBq (ORCPT ); Fri, 25 Feb 2011 20:01:46 -0500 Subject: Re: [PATCH v4 4/4] gpio: Add support for Intel ICHx/3100/Series[56] GPIO From: Joe Perches To: Peter Tyser Cc: linux-kernel@vger.kernel.org, Alek Du , Samuel Ortiz , David Brownell , Eric Miao , Uwe Kleine-K?nig , Mark Brown , Alan Cox , Grant Likely , Vincent Palatin In-Reply-To: <1298669181-9589-4-git-send-email-ptyser@xes-inc.com> References: <1298669181-9589-1-git-send-email-ptyser@xes-inc.com> <1298669181-9589-4-git-send-email-ptyser@xes-inc.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 25 Feb 2011 17:01:43 -0800 Message-ID: <1298682103.4002.24.camel@Joe-Laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2170 Lines: 85 On Fri, 2011-02-25 at 15:26 -0600, Peter Tyser wrote: > This driver works on many Intel chipsets, including the ICH6, ICH7, > ICH8, ICH9, ICH10, 3100, Series 5/3400 (Ibex Peak), Series 6/C200 > (Cougar Point). Hi Peter. just trivia... > diff --git a/drivers/gpio/ichx_gpio.c b/drivers/gpio/ichx_gpio.c [] > @@ -0,0 +1,551 @@ > +/* > + * Intel ICH6-10, Series 5 and 6 GPIO driver [] > + */ > + You could use #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt before any #include so that the uses of printk(KERN_ "%s: foo...\n", DRV_NAME, bar...); can be pr_("foo...\n", bar...); > +#include > +#include > +#include > +#include [] > +static int modparam_gpiobase = -1 /* dynamic */; Pretty unusual commenting style and too easy to lose sight of the terminating semicolon. It's more usually written as: static int modparam_gpiobase = -1; /* dynamic */ > +static int __devinit ichx_gpio_init(struct pci_dev *pdev, > + const struct pci_device_id *ent, > + struct platform_device *dev) > +{ [] > + if (!ichx_priv.gpio_base) { > + printk(KERN_ERR "%s: GPIO BAR not enumerated\n", DRV_NAME); print->pr_ like: pr_err("GPIO BAR not enumerated\n"); > + if (ichx_priv.desc->gpe0_sts_ofs) { > + pci_read_config_dword(pdev, PCI_ICHX_ACPI_BAR, > + (u32 *)&ichx_priv.pm_base); > + ichx_priv.pm_base &= PCI_BASE_ADDRESS_IO_MASK; > + if (!ichx_priv.pm_base) > + printk(KERN_WARNING "%s: ACPI BAR not enumerated, " > + "GPI 0 - 15 unusable\n", DRV_NAME); pr_warn("ACPI BAR not enumerated, GPI 0 - 15 unusable\n"); and so forth for all the printks. One other typo: > +static int ich6_gpio_request(struct gpio_chip *chip, unsigned nr) > +{ > + /* > + * Fixups for bits 16 and 17 are necessary on the Intel ICH6/3100 > + * brdige as they are controlled by USE register bits 0 and 1. See > bridge -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/