Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp307912ybx; Tue, 29 Oct 2019 19:01:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7lpVagD63widu8pWTGCsRnbtetVJhtjGtngOLlJjQcCAdJ8pu1aZXWr+7Yb92RryqWMIY X-Received: by 2002:aa7:cd03:: with SMTP id b3mr28921362edw.95.1572400902536; Tue, 29 Oct 2019 19:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572400902; cv=none; d=google.com; s=arc-20160816; b=u/YkhLJn7ykA4sL0nfnJRPwccu9EoRa7Lmh6dmTqhwTPAMpVMp5WZl8zX/4mviORBG bgHUXb4wLfYBTPVqEYFHmVHaHs6Ze+ZKKpenGgEvwFgG0wzwRC4ITceiHWE48Dhndas2 xIuro+ksKbMQJQXjFavsPsuvGSptQ2/9gabiNAVHEqCA2TBXY/zmxmRXlUWUBRNRs9a0 6uLTnfE85GA7opEA1mto4R//LsYUqr/og+mnGcLx+PZP1Z0s/Zxr5Q6VgsaiHHu7u8k3 E79CDOp6I0C8PsME1tQGW1QGhtQI2GhIUevQLvxokA38EtxyM5XhPK4XMlxF8y09FDma Mkxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=4D0rSlERGCFg+HpPsc22n7LM+0fvKRRRI5LIsVOytZs=; b=z66A4c6K9LGezmDkrIjlQMwAp0iFZ0a/BMOG+uQNHBP6MTB9sdrScANW16MjstPy00 /27fIlpllNjBo0v+ZmdnGAuuCx/lYO0jnVkan1ENytq3H+PspWc1AK1q+sogYIxlFoCJ ikCCh4PA5eKPhjAtYxNmuhSkcFRYT0jL6KLOq7hBJogs8WlaG80oVWuLZgwrspXvydBd JSgMLNGkcR9u1WWd7qdCVv6s8ckuTx6RHbgKanPk/+WP6I3IN/3yuxWgqpB62LyU1VBd F8fnB6GGKfZL2O05NwPGFziQA6Cw46mEOxqk/A7YPC3qDvMlF2uyrzdMITvB9/03ZNqS x0tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kPlnOSEF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14si441082edc.227.2019.10.29.19.01.19; Tue, 29 Oct 2019 19:01:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kPlnOSEF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726508AbfJ3CAQ (ORCPT + 99 others); Tue, 29 Oct 2019 22:00:16 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39663 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726108AbfJ3CAP (ORCPT ); Tue, 29 Oct 2019 22:00:15 -0400 Received: by mail-pl1-f193.google.com with SMTP id t12so212474plo.6; Tue, 29 Oct 2019 19:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=4D0rSlERGCFg+HpPsc22n7LM+0fvKRRRI5LIsVOytZs=; b=kPlnOSEFYvjvNe+/OznUbYQJqwKtp3lF/al1O8JlJtS+0XL9rPvJ87r97ZvdCTBsi5 MJ0O8OhYwzUFiHHklCGf5gobsgOyxBKXLxgdHBvIeG7B6CbGIEctpz7jPIZ4gVVN9lo8 e/SMNfQz8X/gF1dKFtQZ0W2PvtWvtdRQTzlDW7N0B+zlB5rHqE+/OBJq0jzva2GcbTDW 3meHJc18Ph4ciGRlGaNpX8zLoRI/gPwEXVpQ5qfLwMgK8ACadwmnGSMdAxeYvYHqCDf7 m9H1uhihuFaKUyWJ/APcNunpWA6e7tM3PK2W5KQX/IoAvnULJsT5aJPcttTFNV0xrljE R+1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4D0rSlERGCFg+HpPsc22n7LM+0fvKRRRI5LIsVOytZs=; b=fCR0ld6jLmcyjA6LOdMuCdiUPm4G2gs7+oeAerHbRiej6ghiiNq/JAxTUJ6s4jhcw8 EoTAcyrdDLDyMYJWSCaSPXMetlQ5DHTfwdgKljAuMVU9ueb5dCDRCnpZElx8nWG98IAd BqVMOpiPPo1sGLSZU+qoniwcxKvWEscNa5yfl5I0bONooE8+JbousgKkKn1jPD67/kmX qV2N+Sw2VK9aCeYyt7Pbpnlwhfy76lnKKIikUT/fpE/pbI57awOH1YPpXaFVCN+g61fj fwXSu6tPhU5NqT6udlXE1XmsnDZ3V0whKls5qBMGwu9P/fWAUK4tDsnCi94M4xjogHwb F+2A== X-Gm-Message-State: APjAAAV8nCaBpCeQ9UediVePnA4RI5e+UtNreOonkQhuCwC+2FhdbIl0 q4yilRS4KTSnymhbCAr+khP6KRxx X-Received: by 2002:a17:902:7784:: with SMTP id o4mr1893970pll.111.1572400814949; Tue, 29 Oct 2019 19:00:14 -0700 (PDT) Received: from [192.168.1.60] (59-120-186-245.HINET-IP.hinet.net. [59.120.186.245]) by smtp.gmail.com with ESMTPSA id 184sm420534pfu.58.2019.10.29.19.00.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Oct 2019 19:00:14 -0700 (PDT) Subject: Re: [PATCH V2 7/7] USB: serial: f81232: Add gpiolib to GPIO device To: Johan Hovold Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, peter_hong@fintek.com.tw, "Ji-Ze Hong (Peter Hong)" References: <20190923022449.10952-1-hpeter+linux_kernel@gmail.com> <20190923022449.10952-8-hpeter+linux_kernel@gmail.com> <20191023122208.GW24768@localhost> From: "Ji-Ze Hong (Peter Hong)" Message-ID: Date: Wed, 30 Oct 2019 10:00:12 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191023122208.GW24768@localhost> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Johan, Johan Hovold 於 2019/10/23 下午 08:22 寫道: > On Mon, Sep 23, 2019 at 10:24:49AM +0800, Ji-Ze Hong (Peter Hong) wrote: >> The Fintek F81534A series contains 3 GPIOs per UART and The max GPIOs >> is 12x3 = 36 GPIOs and this patch will implements GPIO device as a >> gpiochip to control all GPIO pins even transforms to transceiver pins. > > Depending to your answer to my question whether these pins are truly > general purpose or not, this may not be the right interface. Our F81534A series contains F81532A/534A/535/536. For the following link of F81534A pin-out: https://imgur.com/a/AZHqQ1N We had 2 type about GPIO pins, MODEx_y & GPIOxx. All MODEx_y & GPIOxx are GPIOs and can be controlled by GPIO device, but they had some difference about usage. MODEx_y: 1. 3 pins(x: 0/1/2) can be access by UART port y. 2. Used to control UART's transceiver normally, but it also can be configure as GPIO when UART disabled by H/W (DTR strap to GND). GPIOxx: 1. Access only by GPIO device. The series patch only support RS233 mode for all serial port, So we'll direct set all MODEx_y to (0/0/1) for our demo board for default. If user really want to use the pin, we had provide the gpiolib with GPIO device, but we'll recommend user to use GPIOxy first. Is any suggest about this ? Could I maintain this for this series patch? >> + >> + status = devm_gpiochip_add_data(&intf->dev, &priv->chip, priv); >> + if (status) { >> + dev_err(&intf->dev, "failed to register gpiochip: %d\n", >> + status); >> + return status; >> + } > > Have you tried disconnecting the device with gpios requested? This used > to break gpiolib, but was fixed. Just want to make sure it hasn't > regressed. I had try export GPIOs and detach the F81534A in kernel 5.0.0, it seems no problem. Is any link about this issue for me to do more test ? Thanks -- With Best Regards, Peter Hong