Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2558531imi; Mon, 25 Jul 2022 01:43:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v3/5uky8AL4rXXEGFygvkmyKN8JHUccYaCsBiIEgM3/pEXgYe/0eugn0b32k+jM47TLLKZ X-Received: by 2002:a17:906:8a4f:b0:72b:615c:5af1 with SMTP id gx15-20020a1709068a4f00b0072b615c5af1mr9266312ejc.461.1658738637778; Mon, 25 Jul 2022 01:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658738637; cv=none; d=google.com; s=arc-20160816; b=pdeGsqpMhDN/MAP5H1FQflh+LFTJLO7IHrSedVTS1g/NCE/myuTnWHYBv0TrvT3nqe Okt6Xb3DKMIJq1HH0JXwAsavW/k6o0F1NbBIvWVlhelro5cmgXukOdfhvLssXCdZDTVC uus0FhmB59ZappAvY3rfmLg5Br5AVjDpiOaYA4zNJ0nUgRr2SG11kGE0xu1NKgnKya0v vdJqQD7Hkqzc/AevJAIyRNXHegzYnF8PjkxStHq94WPsbEw8mVI7OI8RHhTYCJjcUBbl J38nxX44vMI/arrKxZ7MAzFubLX9qiPmZCZZF7dyZ6t3Ka2B8XxO7ylGYqg1Ekm9DtPz P73w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=r9oGiDsxiFpBH+3rbxjYFk4fKS6kxjytRyEJ438nM14=; b=cusloeuLHtFZd8XuXsP5R6WO5pN2RfAkCVz6VedOcd40ln5HWLaFs7k265tY2wGyAg diH9eAi+NqoLGzjDCarCwc0/e0ljdMNi7wF5HV0M5GCAVRM5r6ILBp4/Yewc/jn4Y3JV LArxyDmFk0R4ASyUC6z2uOCnWo/wkiRNG2lJBWpj2SplGiCYdg1oPLXquYbR8rEGPGpw kiFT4dLwOq6pxKAluW3VO0ZnXj4KjSLMnXWh4tozxZBUVPb4tGRD5zbRRWgdtzpbt79n WdPs5utFcHpYcQkEro2cw3yNmdxLEE8YCjD8/52uY9kdwCwvDu3kGH5Lhbt+L9pX+kfU ERlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CJb2GrDq; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he37-20020a1709073da500b0072b87f68d25si14405488ejc.542.2022.07.25.01.43.32; Mon, 25 Jul 2022 01:43:57 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=CJb2GrDq; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233357AbiGYIEV (ORCPT + 99 others); Mon, 25 Jul 2022 04:04:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232399AbiGYIET (ORCPT ); Mon, 25 Jul 2022 04:04:19 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 628FA5FEF; Mon, 25 Jul 2022 01:04:18 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id j22so19126473ejs.2; Mon, 25 Jul 2022 01:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r9oGiDsxiFpBH+3rbxjYFk4fKS6kxjytRyEJ438nM14=; b=CJb2GrDqw5wptQkMGvGnlEHmNqNpBTz+oVejWM8vbDuV20ZOTC6BJ/xAOcSduhufTS CtY8s0Ob07oaPbu/f4yqfvkHz/xDY1O6vs2/oftm3gv1Uc+ykJC+fUd1S21cXIv8VjyW kSXeGTgiv3k4SaU7t5pXcn2tjl5/OFjnaZJ8Uu0DxeB/9Oof1BN5BOo2rRbXDmOoY1Oc CAj9lT0OP1cy+XTY99JtA98O+TDOotsScJIH1YM0dQeqD+8VHoEVugkGshM79Qhx2IYY Qmh4+CVjG1cahmKQrRaUHy+VKbjtu21T43SHNPAsr2ti4ofng6x5uib9AjGL5NY7lM5l yEHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r9oGiDsxiFpBH+3rbxjYFk4fKS6kxjytRyEJ438nM14=; b=qZNUDlfWV1gfKJrxcTaZGJJhKHsk86f362lbhhUtJH+39QG18dOLO63N1sHxgCRE1H hXm6eU6V0zn4Ngv/zQjWMXrfZCkvsMO/VMSSToZETMcw0REBy9BmK+P9YJfC+nZgw5cT F+qDNuwoySwOch2p8/iJA5ylWFoyf0v7tFAwEeaH0uWrL6+ZZT4aBARFcbEv55R4JkOu 2wncweioY2IspB39VCmTaBJU8caqKqXBd+e1p9oyen/hPiOj5FQVl/1Y+O0e0bEuHsCf KjK7sJb4BxeEWWf1jzEqXuorh3Ov6obUdVU+bbyYUqQ67tauI+GTcAOFluXaORzYiWvf Zysg== X-Gm-Message-State: AJIora8TqEE87kbc31MTqzf5aii+SPJ4mSYWqmMxH1ccYAQZK7hV2fAY /mR9EM6czKo4CmxzsJ13XvQCrJJhJsU0MZbEpVU= X-Received: by 2002:a17:906:8a4a:b0:72b:5b23:3065 with SMTP id gx10-20020a1709068a4a00b0072b5b233065mr9334315ejc.557.1658736256789; Mon, 25 Jul 2022 01:04:16 -0700 (PDT) MIME-Version: 1.0 References: <20220722102407.2205-1-peterwu.pub@gmail.com> <20220722102407.2205-9-peterwu.pub@gmail.com> In-Reply-To: <20220722102407.2205-9-peterwu.pub@gmail.com> From: Andy Shevchenko Date: Mon, 25 Jul 2022 10:03:40 +0200 Message-ID: Subject: Re: [PATCH v6 08/13] usb: typec: tcpci_mt6370: Add MediaTek MT6370 tcpci driver To: ChiaEn Wu Cc: Lee Jones , Daniel Thompson , Jingoo Han , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sebastian Reichel , Chunfeng Yun , Greg Kroah-Hartman , Jonathan Cameron , Lars-Peter Clausen , Liam Girdwood , Mark Brown , Guenter Roeck , "Krogerus, Heikki" , Helge Deller , ChiaEn Wu , Alice Chen , cy_huang , dri-devel , Linux LED Subsystem , devicetree , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List , Linux PM , USB , linux-iio , "open list:FRAMEBUFFER LAYER" , szuni chen , AngeloGioacchino Del Regno Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Fri, Jul 22, 2022 at 12:25 PM ChiaEn Wu wrote: > > From: ChiYuan Huang > > The MediaTek MT6370 is a highly-integrated smart power management IC, > which includes a single cell Li-Ion/Li-Polymer switching battery > charger, a USB Type-C & Power Delivery (PD) controller, dual > Flash LED current sources, a RGB LED driver, a backlight WLED driver, > a display bias driver and a general LDO for portable devices. > > Add support for the Type-C & Power Delivery controller in > MediaTek MT6370 IC. ... > +static int mt6370_tcpc_set_vconn(struct tcpci *tcpci, struct tcpci_data *data, > + bool enable) > +{ > + return regmap_update_bits(data->regmap, MT6370_REG_SYSCTRL8, > + MT6370_AUTOIDLE_MASK, > + !enable ? MT6370_AUTOIDLE_MASK : 0); Why not positive conditional? enable ? 0 : mask > +} ... > + ret = devm_add_action_or_reset(dev, mt6370_unregister_tcpci_port, > + priv->tcpci); I believe nothing bad will happen if you put it on one line. -- With Best Regards, Andy Shevchenko