Re: [PATCH 2/2] gpio-f7188x: filter non-export gpio for F81866

From: Peter Hung
Date: Tue Jan 12 2016 - 21:03:58 EST


Hi Andy,

Andy Shevchenko æ 2016/1/12 äå 05:33 åé:
On Tue, Jan 12, 2016 at 9:41 AM, Peter Hung <hpeter@xxxxxxxxx> 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