From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD098C433ED for ; Thu, 29 Apr 2021 06:55:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 996086141E for ; Thu, 29 Apr 2021 06:55:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233080AbhD2Gzx (ORCPT ); Thu, 29 Apr 2021 02:55:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:57412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbhD2Gzv (ORCPT ); Thu, 29 Apr 2021 02:55:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6F06A6141E; Thu, 29 Apr 2021 06:55:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619679305; bh=MwMz82hw2zlO0Xlg+tehPqJXtowu2LTKbKEv/YGYl7w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f4RfcpBrvonll+RNLrdlZhlpVHyXb9riZqN1E8XFh/918b69u7jDOAMmpGfj4h+ae LHs2Mcy+yH7w7TaBJIuOVRnf/dasi1jRI8i8+hiLWfylzf1aagCY/aNmCGOheJIUiQ tff4pW0Ob6mX3yZD7BGocDSUGKvwbKwlIqaD12WX4SVivJUlIfghym9QYeE754ruCC fcPyYFjPhgZ2H7u16osUANhNr8m4h6Mg//lDLrt32QODpOwfRwssDgp6CvmalO+xC6 M/4UPD0dLYvE/LX9QXfhtUUuwpMrLljMJVzA9wunzFKBcIMHlkLXIbfC2k/Ryp3iAQ hALdNzlMWV8Sw== Received: from johan by xi.lan with local (Exim 4.93.0.4) (envelope-from ) id 1lc0Zy-0005eB-Nw; Thu, 29 Apr 2021 08:55:18 +0200 Date: Thu, 29 Apr 2021 08:55:18 +0200 From: Johan Hovold To: Tung Pham Cc: Pho Tran , "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Hung Nguyen , Pho Tran Subject: Re: [PATCH v9] USB: serial: cp210x: Add support for GPIOs on CP2108 Message-ID: References: <20210408103607.2077-1-photranvan0712@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 29, 2021 at 02:54:09AM +0000, Tung Pham wrote: > So my questions again are: > > 1) Have you verified that the struct cp210x_quad_port_config above > actually matches what the device uses? > > 2) Do you have any documentation of the structures as expected by the > device firmware (not your library)? > > > Tung Pham: the device return some unused bytes, and manufacturing > library already discard these byte to assign value to PORT_CONFIG, so > you don't see padding byte on PORT_CONFIG structure. you can find > the structure of port setting in this code: > > https://www.silabs.com/documents/public/software/USBXpressHostSDK-Linux.tar > > > \USBXpressHostSDK-Linux\USBXpressHostSDK\CP210x\srcpkg\cp210xmanufacturing_1.0.tar\cp210xmanufacturing_1.0\cp210xmanufacturing\cp210xmanufacturing\src\CP2104Device.cpp > > CP210x_STATUS CCP2104Device::GetPortConfig(PORT_CONFIG* PortConfig) Thanks for confirming. Johan