Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp895916pxb; Tue, 1 Feb 2022 12:40:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyg+FT5aUDum3Rx2ysQmnQ0dRW07lTdH7q2LXZX3kKlGUZtss8G1e9Gfqxx/R7fXwfI8iRb X-Received: by 2002:a17:902:8490:: with SMTP id c16mr27221597plo.129.1643748022530; Tue, 01 Feb 2022 12:40:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748022; cv=none; d=google.com; s=arc-20160816; b=AO7aRRwb3UNXKOZMdwIWOOgFiMOLyMadSE67/X4lZ0VlCXEbu8EcCKB2RZrEKa8bVB fvCdojwIINjtacm8i/PRhlNeDCw5a/+O3UBZdvM2PrqPUNe3NF/j3TQgGawm84wzjIsA GQkvbydtwlVrO5jrONwB7vXvfJvyUBh3Q44y+1j2t7BA9i36j66r7OAUNDQWdtuw1HhI Kz5etf+r3tlTK9q2kC4G7piMKbBu8XEzFlkjtlwTu5aTCUBxnDnjv5dORNt5fGIVR41x Ldk8hU2Dgt355kLd+hGzubHSrKo/0jUtCMtJ8zvtrBKw4lqpekpGcErJpigU3GWYnMoM AV2Q== 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=/G/x4DadlTrLnDeT/eEtseyfhdO+HwlSFc9pK8/16FA=; b=H0oWmdP1dJsgWvlQ5yyO6xOtoZMcAQUNYkpuE0yZOS6UWScY5WPEj5au7Lvan84mv0 DresYzwjbE9U36HDpJd4+tiPpQXqylLqYh45dbdqkTQLy90MOA3OI/zenP06w77qhquK rBBdNfrVkdLFa5MzWEdj/0Z7B+RGLwIcLV6cdbGJ3ZqEnP6s5q/2mjP3qeeB3z+33p+/ DS8o7QLskhvyzBRcjgkl2dvkfuzFBmyaEwHh9rDIfy2Zq0+uUGH/xi22s0udoed5wd+G NzKlo8cYA6T6UM1X/EZf7DNrxka1SY6QWYducSfWXkzM7qGfVWJjkLIzeiDBDi3ivS+M geLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K3lQ8clK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo7si3022848pjb.54.2022.02.01.12.40.11; Tue, 01 Feb 2022 12:40:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K3lQ8clK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S243076AbiAaNzX (ORCPT + 99 others); Mon, 31 Jan 2022 08:55:23 -0500 Received: from mga01.intel.com ([192.55.52.88]:64460 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347928AbiAaNzT (ORCPT ); Mon, 31 Jan 2022 08:55:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643637319; x=1675173319; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=zMPytbrkqxecRxMjZoXl+pVJH16/C9F19T8BjSjbHlY=; b=K3lQ8clKgJVhfp0ofBTwMQl9rQiZg0dIXdNkXNY2rYULJ6ci2kR6MR5N sFIR+XoQlDIM/qI7/P6rS3oo/0mUrpGdU/EjXw6OyGYkli31xHgEaUls6 nTg+S866GA580uNjSlJJdOpYRkobLh7MZkr50aUuQjXYCEUjy46rv0Ayw li+ZIQMsfzEA/MITghyGfxo1FZIskfZBmhjhEGyisBwTzOH/ODmzjbF0W oXSQSOhkWN4mPfD/tHDjcGVQuMfsIbTU1Ym58HvclPwOhpoZxN5GNyjBG /ToA3lTcpSq6mkBGFhlAtBWRT3W2abAwFg2mLXPhIcVkRfywrmOwkRhVk g==; X-IronPort-AV: E=McAfee;i="6200,9189,10243"; a="271931483" X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="271931483" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2022 05:55:18 -0800 X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="698007721" Received: from smile.fi.intel.com ([10.237.72.61]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2022 05:55:13 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nEX8E-00GtA0-3a; Mon, 31 Jan 2022 15:54:10 +0200 Date: Mon, 31 Jan 2022 15:54:09 +0200 From: Andy Shevchenko To: Hans de Goede Cc: "Rafael J . Wysocki" , Mika Westerberg , Mark Gross , Andy Shevchenko , Wolfram Sang , Lee Jones , Sebastian Reichel , MyungJoo Ham , Chanwoo Choi , Ard Biesheuvel , Len Brown , linux-acpi@vger.kernel.org, Yauhen Kharuzhy , Tsuchiya Yuto , Fabio Aiuto , platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org Subject: Re: [PATCH v4 17/20] extcon: intel-cht-wc: Support devs with Micro-B / USB-2 only Type-C connectors Message-ID: References: <20220130204557.15662-1-hdegoede@redhat.com> <20220130204557.15662-18-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220130204557.15662-18-hdegoede@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 30, 2022 at 09:45:54PM +0100, Hans de Goede wrote: > So far the extcon-intel-cht-wc code has only been tested on devices with > a Type-C connector with USB-PD, USB3 (superspeed) and DP-altmode support > through a FUSB302 Type-C controller. > > Some devices with the intel-cht-wc PMIC however come with an USB-micro-B > connector, or an USB-2 only Type-C connector without USB-PD. > > Which device-model we are running on can be identified with the new > cht_wc_model intel_soc_pmic field. On models without a Type-C controller > the extcon code must control the Vbus 5V boost converter and the USB role > switch depending on the detected cable-type. ... > + if (ext->vbus_boost && ext->vbus_boost_enabled != enable) { > + if (enable) > + ret = regulator_enable(ext->vbus_boost); > + else > + ret = regulator_disable(ext->vbus_boost); > + if (ret == 0) > + ext->vbus_boost_enabled = enable; > + else > + dev_err(ext->dev, "Error updating Vbus boost regulator: %d\n", ret); Can we go with if (ret) dev_err(ext->dev, "Error updating Vbus boost regulator: %d\n", ret); else ext->vbus_boost_enabled = enable; ? > + } -- With Best Regards, Andy Shevchenko