Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1882926pxp; Mon, 7 Mar 2022 04:34:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGOhCIi9HSDPzStH2Ix9pg4N4vAfxA+bNePBZLFTNR09ZsHIX7aKImgfOuLx/1E3755BwS X-Received: by 2002:a05:6402:1747:b0:415:ee04:47e1 with SMTP id v7-20020a056402174700b00415ee0447e1mr10723430edx.229.1646656447856; Mon, 07 Mar 2022 04:34:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646656447; cv=none; d=google.com; s=arc-20160816; b=sPe5mer2vVG1NFy7oBnuhBhqp4BsgkBfk9nUEbiWQxGKRlr1sXtSKAXel8VW0OFDgs kbEcpEClcZa0PAiY1n72NhrUmuUVNcCIMoDUCqFcmZbzsXKWkvEqsvsa0AaBSOGvzAPR 5zVHP/AKqNU6b9vU7dH62+UWd2tI+e2vCvcEOdz4JWu0hCPYx/9tn6AS+LPXH46Lxihp STZNEUX1uJMjHQX2nUcgwzpQiLpum4B1eelMRZ6F6UJFZvq6NR8wSfsVmBps1ATnH4yg Ivl89J5+FQRsr0NgbG3W76h8bguxVREU/4Qp6E84ZBkCJRIdWOEMJmcTG49G2ctASIP/ smeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=3EqUinbgd//jVBJxj6FMLJFUmwnnt8twOdBVJEiObyg=; b=RIO6sK0BCvlOQch/xc1zROul9xC+j4GOs5L+1F/vD/DllQz4k1WM6A2cPgmx0UB5gM X9igURL6g5VwdrL8MD92N+RBe3M1h+51V7U7f8aMxd/7I49ymYWL+1AZLUW9RIrldjPW NMPJQ4yhJC7bSd7IkWvrRNqwvtcIfvhYbywPAc6vEwDl1h8fa5QDQsNRxPtuOOmPohFI 9yw1sxQtHNkti1LpGzOEm8rRBlnbPL9GMfBLuSsvOutcnN/Taj/oW9jBla39Bnb0p1mG gEDdR2cLpib5zdDGZ6XT79Zn2ahGEYFIsXxsmYd2BvevLsEOufOq8+jAtQuyVELeZCiC hJ3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Lx1jXqBB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 16-20020a508e10000000b00410b29c614esi9319691edw.365.2022.03.07.04.33.39; Mon, 07 Mar 2022 04:34:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Lx1jXqBB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237219AbiCGK6a (ORCPT + 99 others); Mon, 7 Mar 2022 05:58:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240532AbiCGK5f (ORCPT ); Mon, 7 Mar 2022 05:57:35 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5692EB1522; Mon, 7 Mar 2022 02:17:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646648244; x=1678184244; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=si1sMMOIuj0tjRYqoqqM1BVIAKXdTNzOoiPtZdEOJlQ=; b=Lx1jXqBBY85/QjZT8IuI/c97sGhk6L2Wil5dUnHEiZK2AvFbPnuAQUQj EdGtaKHhAkbyi5DoNGspMdvRkK11qO2epZjkNVRaF4Gzw2jhh2DbuatfU eQmhdnmTYwXvGKNCC+nakOXWNf5o8rsgP6NHILWq5zduJBK0pY3EXG1kt Kd/QP/rDfZ5J3tOBWRBeNmrPnUg57rKAbihKejcjroAtxDUjzIcw6Phug nHSn4PyTGNvawnpVk6t37MC4rbRczbFrsY+fbwuheLyiJvPLwycDpAFyL bZqNYXjP/nOQPuDaAyGViD98h7vr8PRZ8JaZz2c+gmdnP/Jcb60V35HKr Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10278"; a="279058866" X-IronPort-AV: E=Sophos;i="5.90,161,1643702400"; d="scan'208";a="279058866" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 02:17:23 -0800 X-IronPort-AV: E=Sophos;i="5.90,161,1643702400"; d="scan'208";a="643192228" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 02:17:20 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nRAPr-00Chm6-TC; Mon, 07 Mar 2022 12:16:35 +0200 Date: Mon, 7 Mar 2022 12:16:35 +0200 From: Andy Shevchenko To: Bjorn Andersson Cc: Rob Herring , Daniel Scally , Heikki Krogerus , Sakari Ailus , "Rafael J. Wysocki" , Hans de Goede , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Dmitry Baryshkov Subject: Re: [PATCH v4 7/7] usb: typec: mux: Add On Semi fsa4480 driver Message-ID: References: <20220307034040.1111107-1-bjorn.andersson@linaro.org> <20220307034040.1111107-7-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220307034040.1111107-7-bjorn.andersson@linaro.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 06, 2022 at 07:40:40PM -0800, Bjorn Andersson wrote: > The ON Semiconductor FSA4480 is a USB Type-C port multimedia switch with > support for analog audio headsets. It allows sharing a common USB Type-C > port to pass USB2.0 signal, analog audio, sideband use wires and analog > microphone signal. > > Due to lacking upstream audio support for testing, the audio muxing is > left untouched, but implementation of muxing the SBU lines is provided > as a pair of Type-C mux and switch devices. This provides the necessary > support for enabling the DisplayPort altmode on devices with this > circuit. ... > +static const struct regmap_config fsa4480_regmap_config = { > + .reg_bits = 8, > + .val_bits = 8, > + .max_register = FSA4480_MAX_REGISTER, > +}; You are using mutex for accessing hardware. Do you still need a regmap lock? If so, add a comment to explain why. ... > + /* 15us to allow the SBU switch to turn off */ > + usleep_range(15, 1000); This is quite unusual range. If you are fine with the long delay, why to stress the system on it? Otherwise the use of 1000 is unclear. That said, I would expect one of the below: usleep_range(15, 30); usleep_range(500, 1000); ... > + sw_desc.fwnode = dev->fwnode; Please, don't dereference for fwnode explicitly. Use dev_fwnode(). ... > + mux_desc.fwnode = dev->fwnode; Ditto. -- With Best Regards, Andy Shevchenko