Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp3517142imb; Tue, 5 Mar 2019 11:23:13 -0800 (PST) X-Google-Smtp-Source: APXvYqxVkvgd/LSzJNc7hhvEbHuY383tCzyOz04e0OlKlUgIsnLYDt+tsNPbcnO9f4c6EJNPRoyJ X-Received: by 2002:a63:b242:: with SMTP id t2mr2786756pgo.451.1551813793614; Tue, 05 Mar 2019 11:23:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551813793; cv=none; d=google.com; s=arc-20160816; b=VbzwlhFBIv/E1W9AYvptbxHm+Dg841ErFhBilZvh+cZ/F39UFrDuBjWDUkHgWcH9ls OgM3bu1+M5CMRbGI+JEt2ZgGUhSebiixMeIaLyeHZe7qv78zE0GCOcCM8BalQxWbk44S J3PgLRi/2YKTAOCr7tay9+Iu+3s0kM9vL8QtxHcNyvBr62yhN7LMtlKrgvbjXNZr9yld 0X0XFyrwT92t6MIo4GMqpPsd/9pQFFc1GnQJeHY7UODuAFwCn7EdjpZgZpXtIp5HLq4n vBWxXaR98o8olzTj4DqthRlek+gIwmKNJQ3pQLmA/mozE2Enew1ttt8dIEX8ojikh31S V6rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=zll7ce3TO026vX8dtCapNvJBA947Jz8NKAyubEMk/sk=; b=QoS1mg/o/us79e1xkDkJ1jdMwVvH/yG3BJ88wpo1uc+tNIEPK/wDlatkFMBQT3pJ32 ccBspq97Ne8Nt+EvDS5gNVeGed+WD55aT3h5YFGwVXHq1hCuJkGtd28GXBvUp7oZnNCj BwihlJN5eIMWd/Jrj16nkZ03zT0GbUuNwGHVOVS6f9Tj74m4nGFV0MY6t80JDQCBaXgR WkN7qQDkilig3xv04busHcSBNd5csny/YZhJj4CmwYq3VKVDSNQ/OsBoOLj3LCh8xyVQ 3w/TVR0t36PdCZU1se9gq1KhqkRz5wn7w6gx9Vjt75HuZU13VsFy9IgFt6B1StUdUqzZ TZkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si8570563pgg.560.2019.03.05.11.22.58; Tue, 05 Mar 2019 11:23:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbfCETWJ (ORCPT + 99 others); Tue, 5 Mar 2019 14:22:09 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35208 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726190AbfCETWI (ORCPT ); Tue, 5 Mar 2019 14:22:08 -0500 Received: by mail-wm1-f66.google.com with SMTP id y15so3709169wma.0 for ; Tue, 05 Mar 2019 11:22:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zll7ce3TO026vX8dtCapNvJBA947Jz8NKAyubEMk/sk=; b=AYKqkJIQH4AbKUFeBHD8JPOMsMdB4U578/14yd3JVwztWLTr1CGJtRB5Qrps6piD/I nHPF/s+KOBo6dW48xdnRgivq1ZHEfd3XM4UAcgBHrdyMmCNqlUNqE2C1GdUgDkyrKSZs 97yNteGa/aRofpTO+TSPmwcAB1eWQS8Px9V/aV1apVY0JreENgCGOB6u3pbeuq2T6G2j b2Sfop+9N2LPzMv5F9zah/JMoA/LlG1RNmq5e/Q6y3FHmecvKtxJ1ihhVveguFr+5U0w c1GomFhLrr7e1yZBYdU/n6UBsQy9h0/iYS55xgcQn/FKPKfbghXkMkUnlMjqpsurwXhH fhVA== X-Gm-Message-State: APjAAAXNQHzi7Jq6G8v9J/oCgnGgHeyVy6As2yHbTDYqKdhDCexpoSgc uWfBOeGEna7I3XN6Tt9KuUyYfw== X-Received: by 2002:a1c:e70a:: with SMTP id e10mr95312wmh.34.1551813726591; Tue, 05 Mar 2019 11:22:06 -0800 (PST) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id c1sm12491655wrw.7.2019.03.05.11.22.05 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 11:22:06 -0800 (PST) Subject: Re: [PATCH v3 0/2] extcon: Intel Cherry Trail Whiskey Cove PMIC and external charger tweaks To: Yauhen Kharuzhy , linux-kernel@vger.kernel.org Cc: MyungJoo Ham , Chanwoo Choi , Andy Shevchenko References: <20190303201613.19884-1-jekhor@gmail.com> From: Hans de Goede Message-ID: <81e492cc-80d5-c0f0-a6e2-522002913f5b@redhat.com> Date: Tue, 5 Mar 2019 20:22:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190303201613.19884-1-jekhor@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 03-03-19 21:16, Yauhen Kharuzhy wrote: > At implementation of charging support for Lenovo Yoga Book (Intel Cherry > Trail based with Whiskey Cove PMIC), two pitfalls were found: > > - for detection of charger type by PMIC, bit 6 in the CHGRCTRL1 register > should be set in 0 (and set to 1 for Host mode). Pick up its definition > and logic from from Intel code drop[1]; > > - "#CHARGE ENABLE" signal of external charger (bq25892) in Yoga Book is > connected to one of PMIC outputs controlled by CHGDISCTRL register. > Enable charging at driver initialization. Pick up this from Lenovo's code > drop[2,3]. > > > v3 changes: > - Don't restore of initial state of CHGDISCTRL and CHGRCTRL0 at exit but > switch them into HW-controlled mode (as discussed in mailing list); > - Use regmap_update_bits() instead of regmap_readi()/regmap_write() in > the cht_wc_extcon_set_otgmode(); > - Coding style and constant names changed as Andy and Hans recommended. Series looks good to me now, and I've also tested that it does not cause any charging or 5v boost related regressions on a GPD pocket laptop, so for the series: Reviewed-by: Hans de Goede Tested-by: Hans de Goede Regards, Hans