From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932701AbbJ0Oog (ORCPT ); Tue, 27 Oct 2015 10:44:36 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:33222 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932330AbbJ0Ood (ORCPT ); Tue, 27 Oct 2015 10:44:33 -0400 Date: Tue, 27 Oct 2015 15:44:32 +0100 From: Johan Hovold To: Peter Hung Cc: Johan Hovold , gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, tom_tsai@fintek.com.tw, peter_hong@fintek.com.tw, Peter Hung Subject: Re: [PATCH V5 1/1] usb:serial add Fintek F81532/534 driver Message-ID: <20151027144432.GG23708@localhost> References: <1437443899-5007-1-git-send-email-hpeter+linux_kernel@gmail.com> <20150914133301.GC19567@localhost> <56284916.1010903@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <56284916.1010903@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22, 2015 at 10:25:26AM +0800, Peter Hung wrote: > Hi Johan, > > Johan Hovold 於 2015/9/14 下午 09:33 寫道: > > On Tue, Jul 21, 2015 at 09:58:19AM +0800, Peter Hung wrote: > > >> 4. RS422 Mode > >> 1. The RTS mode is dont care. > >> 2. Set M2/M1/M0 as 0/0/0 > > > > I don't think all gpios should be exported for these ports if they have > > special functions that the driver could control transparently (e.g. for > > SER_RS485_RTS_ON_SEND). > > Surely, we can hide some setting with definitely setting like > RS232/RS485, but the settings is only apply to our evaluation board. > > Some customers will use our F81532/534 with other brand transceiver IC. > The pins setting maybe changed, so we decided to separate UART & pins > settings and let the 3 output pins controllable for customer. > > Could I preserve currently UART & pins setting mode ? If the pins can be set independently of the mode, and in principle be used as general purpose output-only pins, then you should use the gpiolib interface. However, in the last patch it did look like the gpio-implementation was intertwined with mode selection, something which made it seem like a bad fit. Would you be able to separate it, and specifically, make the gpio and mode-handling generic and not specific for your evaluation board? Thanks, Johan