From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753483AbcAMCD4 (ORCPT ); Tue, 12 Jan 2016 21:03:56 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:32938 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbcAMCDy (ORCPT ); Tue, 12 Jan 2016 21:03:54 -0500 Subject: Re: [PATCH 2/2] gpio-f7188x: filter non-export gpio for F81866 To: Andy Shevchenko References: <1452584499-13939-1-git-send-email-hpeter+linux_kernel@gmail.com> <1452584499-13939-3-git-send-email-hpeter+linux_kernel@gmail.com> Cc: Linus Walleij , Alexandre Courbot , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , tom_tsai@fintek.com.tw, Peter H , Peter Hung From: Peter Hung Message-ID: <5695B08B.1090200@gmail.com> Date: Wed, 13 Jan 2016 10:03:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, Andy Shevchenko 於 2016/1/12 下午 05:33 寫道: > On Tue, Jan 12, 2016 at 9:41 AM, Peter Hung wrote: >> Dont export gpios which not enabled by motherboard manufacturer. > > 'Do not' or 'Don't'. > > Perhaps 'GPIOs'. > > 'which are not enabled' OK. >> +#define F81866_PORT_SEL_REG 0x27 >> +#define F81866_MULTI_FUN1_REG 0x28 >> +#define F81866_MULTI_FUN3_REG 0x29 >> +#define F81866_MULTI_FUN4_REG 0x2B >> +#define F81866_GPIO_EN_REG 0x2C >> + > > Move this before IDs block. OK. >> +static inline void superio_mask_outb(int base, int reg, int mask, int val) > > Usually we named such as _update or _update_bits. > superio_update() OK >> +static int f81866_verify_gpioset(int base, int set) > > …_gpio_verify() looks more suitable to the existing scheme. OK >> + * manufacturer. >> + */ >> + if (sio->type == f81866 && f81866_verify_gpioset(sio->addr, i)) >> + continue; >> + >> + dev_dbg(&pdev->dev, "%s: register GPIO%xx set\n", __func__, > > %x ? Sorry for misunderstand. This section will print debug message as GPIO3x set if GPIO3 set enabled, so I used %xx. We are discussing about the patch with maintainer. It maybe drop if don't need filter. Thanks for your advices. -- With Best Regards, Peter Hung