From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754476AbbLTOrf (ORCPT ); Sun, 20 Dec 2015 09:47:35 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36580 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753600AbbLTOrd (ORCPT ); Sun, 20 Dec 2015 09:47:33 -0500 Date: Sun, 20 Dec 2015 20:17:22 +0530 From: Sudip Mukherjee To: Andy Shevchenko Cc: Greg Kroah-Hartman , Jiri Slaby , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" , One Thousand Gnomes Subject: Re: [PATCH v3] serial: 8250: add gpio support to exar Message-ID: <20151220144722.GA26499@sudip-pc> References: <1450617891-26167-1-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 20, 2015 at 04:18:17PM +0200, Andy Shevchenko wrote: > On Sun, Dec 20, 2015 at 3:24 PM, Sudip Mukherjee > wrote: > > Exar XR17V352/354/358 chips have 16 multi-purpose inputs/outputs which > > can be controlled using gpio interface. > > Add support to use these pins and select GPIO_SYSFS also so that these > > pins can be used from the userspace through sysfs. > > > > Tested-by: Rob Groner > > Signed-off-by: Sudip Mukherjee > Hi Andy, Thanks for the review. Just a few doubts below. > > @@ -0,0 +1,261 @@ > > +/* > > + * GPIO driver for Exar XR17V35X chip > > + * > > + * Copyright (C) 2015 Sudip Mukherjee > > + * > > + * This program is free software; you can redistribute it and/or modify > > + * it under the terms of the GNU General Public License version 2 as > > + * published by the Free Software Foundation. > > + */ > > + > > +err_destroy: > > + mutex_unlock(&exar_mtx); > > + mutex_destroy(&exar_gpio->lock); > > +err_unmap: > > + iounmap(p); > > pci_iounmap? I thought about pci_iounmap but I saw that most of the code in 8250_pci.c is using iounmap, so i went in favor of the majority. Will change it. > > > + return ret; > > +} > > +EXPORT_SYMBOL(xr17v35x_gpio_init); > > + > > > +static void __exit exar_gpio_exit(void) > > +{ > > +} > > + > > +module_exit(exar_gpio_exit); > > + > > +static int __init exar_gpio_init(void) > > +{ > > + return 0; > > +} > > + > > +module_init(exar_gpio_init); > > + > > Useless for now. You are using it as a library. Main doubt here. If I do not give the module_init() and module_exit() then what entry do i keep in the Kconfig? In this v3, it is kept as tristate. Should that be bool then? regards sudip