Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754105AbeAILaF (ORCPT + 1 other); Tue, 9 Jan 2018 06:30:05 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:47101 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932929AbeAILaB (ORCPT ); Tue, 9 Jan 2018 06:30:01 -0500 X-Google-Smtp-Source: ACJfBovqYjGt3IEXhZhobCQgNvxLGzePMWWxCYphr/wjvHLp2cyGuFXU28/AAbptkIpcGhIXqYEYgg== Date: Tue, 9 Jan 2018 12:29:57 +0100 From: Johan Hovold To: "Ji-Ze Hong (Peter Hong)" Cc: johan@kernel.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, peter_hong@fintek.com.tw, "Ji-Ze Hong (Peter Hong)" Subject: Re: [PATCH V2 4/5] usb: serial: f81534: add H/W disable port support Message-ID: <20180109112957.GQ11344@localhost> References: <1515032961-29131-1-git-send-email-hpeter+linux_kernel@gmail.com> <1515032961-29131-4-git-send-email-hpeter+linux_kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515032961-29131-4-git-send-email-hpeter+linux_kernel@gmail.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 04, 2018 at 10:29:20AM +0800, Ji-Ze Hong (Peter Hong) wrote: > The F81532/534 can be disable port by manufacturer with > following H/W design. > 1: Connect DCD/DSR/CTS/RI pin to ground. > 2: Connect RX pin to ground. > > In driver, we'll implements some detect method likes following: > 1: Read MSR. > 2: Turn MCR LOOP bit on, off and read LSR after delay with 60ms. > It'll contain BREAK status in LSR. > > Signed-off-by: Ji-Ze Hong (Peter Hong) > --- > V2: > 1: f81534_check_port_hw_disabled() change return type from int to bool. > 2: Add help function f81534_set_phy_port_register() / > f81534_get_phy_port_register() for f81534_check_port_hw_disabled() > to read register without port. > 3: Re-write f81534_calc_num_ports() & f81534_attach() to reduce the > f81534_check_port_hw_disabled() repeatedly called. This looks good, but please split up the config-data-readout refactoring and f81534_check_port_hw_disabled() changes in two patches. Johan