Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1653380imj; Thu, 14 Feb 2019 09:47:28 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibn4ioPtKQFOWNMvS9KQYRCtPBfrXPIEtcBYwGGdiOSaTgaMwp1/Nus9HXTbF2h9KmmOgL9 X-Received: by 2002:a63:b105:: with SMTP id r5mr1025047pgf.442.1550166448272; Thu, 14 Feb 2019 09:47:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550166448; cv=none; d=google.com; s=arc-20160816; b=EufgKFpD98MO9lYl0U2W6juxf+HsqczzGgAraLRf1rV1B056G3kjNI7Wpe0wLVsOKN 5vYxudWc11B3s5L3+aymn9KsS+6jBkyv9udWS4fYcEo10M+lbjL23PGsaM1tz8WW4NKg PHpdtHEZiUWzgZ7MgTgNKG+2GY7wmo9v5/rzy+Dtg40lU7yhC6nz9DG2DDZ5jW2/Wcd2 tXPrRs41DY8wrGx2P788TyzSCeybQUu3Py6lCslQb4+ilU0l5/60aUqwDT+N2oR+HRZ1 Lt7iFA7xL6mbAIXUaWgUlfkXEduKHGV8PvtsjzhOrbECH+thjmspx69kYTBK0UvQ90mj SBEg== 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:references:cc:to:from:subject; bh=2jWv3VDlAHB0yEjek/oxjX0f6137lmk0k8eSh2FkZOo=; b=f1lixUmKf4vnjFGGH8WdV9WNrp2fEaE+nmYzZpwSPgvgvLRPkOjrNQBHY0thLFPof/ Mg2I/ykbdB0uUan0yLtWoqE/fUNcigsWrnrNRmwLGM8uqaU1kXwv2JgaFJlcbOmXWRhy VHQKuk/2h5RjOdOrVy2MdGPwQwjvO26eLcGaT9eNFl99wM26zrnlcRsWUzjZ84EmDTa+ HF6Kr9qc6IdRxJMYZiZg7n2NGUvZZnW7ioFc9rEaOSqcFmigmgmq46sICSlNbjfC4rPx nTgDCiG0AWxb1ae98dkB5EcdfNFPe6DT+K2e4mjTQkUvQJIQKPzXbD2w2LxBZxNP784e BNiA== 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 v5si2751352pgh.510.2019.02.14.09.47.12; Thu, 14 Feb 2019 09:47:28 -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 S1730404AbfBNKHD (ORCPT + 99 others); Thu, 14 Feb 2019 05:07:03 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:43880 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbfBNKHD (ORCPT ); Thu, 14 Feb 2019 05:07:03 -0500 Received: by mail-ed1-f67.google.com with SMTP id m35so563211ede.10 for ; Thu, 14 Feb 2019 02:07:02 -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:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2jWv3VDlAHB0yEjek/oxjX0f6137lmk0k8eSh2FkZOo=; b=Tzn87zv+JYjH6L90yBIdgh+16QmVXx3PpW2o5bTmqhM5JS5iH8KO9P2udfys7VmJ5n dRLu1g3///nGVCR1QG6dLeJw1K2O03vT+gJtSmy4pC3pF2i+owWbxP/47Vg3duRKQ1el 3psD6/Iddvbx4+F2Laq5EN17RZ47xKxE0pvy+Me6viZBwC3nLe6pwNrGiHVS5X5gyK7n LM8VM1ARoWqk5zCla04ahcdYZYDi/Nu/3Xii1wq4Kzwt+mSarzikYe7z0hjtlDzkoSBA psQytgihkdwmKY50P3QlINWBXtlhjfImgZMFxvWEe6ox8+Kdl/qpW5eTeMwE8LZuPksF vlsg== X-Gm-Message-State: AHQUAuae/RqGQCrpZuk1FZv+PtTvjTKT7bqNsyhCbJ6p5uq4GkeDHza3 KZ0JNitrLzXLze3jDQt8qxZ62g== X-Received: by 2002:aa7:d850:: with SMTP id f16mr2494920eds.100.1550138821782; Thu, 14 Feb 2019 02:07:01 -0800 (PST) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id m32sm477310ede.29.2019.02.14.02.07.00 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 02:07:01 -0800 (PST) Subject: Re: [PATCH 0/2] extcon: Intel Cherry Trail Whiskey Cove PMIC and external charger tweaks From: Hans de Goede To: Yauhen Kharuzhy , linux-kernel@vger.kernel.org Cc: MyungJoo Ham , Andy Shevchenko References: <20190210203649.21691-1-jekhor@gmail.com> <7d226dcc-9b9c-941c-7915-53ca123fa3a5@redhat.com> Message-ID: <6c2ee1d5-b06a-4182-e373-12c4113fa514@redhat.com> Date: Thu, 14 Feb 2019 11:07:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <7d226dcc-9b9c-941c-7915-53ca123fa3a5@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 14-02-19 00:00, Hans de Goede wrote: > Hi, > > On 10-02-19 21:36, 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]. >> >> Please keep in mind that I have no docs for Whiskey Cove PMIC, so this patches >> are based on some kind of reverse engineering and suppositions, correct me if >> this semantic is wrong for common case. >> >> [1]. https://github.com/01org/ProductionKernelQuilts/uefi/cht-m1stable/patches/0001-power_supply-intel-pmic-ccsm-driver.patch >> [2]. https://github.com/jekhor/yogabook-linux-android-kernel/blob/b7aa015ab794b516da7b6cb76e5e2d427e3b8b0c/drivers/power/bq2589x_charger.c#L2257 >> [3]. https://github.com/01org/ProductionKernelQuilts/uefi/cht-m1stable/patches/EM-Charger-Disable-battery-charging-in-S3-and-enable.patch > > Thank you for these patches, besides your Lenovo Yoga Book I'm aware of > only 2 other device models using the CHT Whiskey Cove PMIC, the GPD win > and GPD pocket devices. These both work fine without the changes your > patches introduce. > > I need to check if your changes do not cause regressions on these 2 > devices, which are used with Linux by quite a few people. I will try > to make some time for testing this sometime next week. > > A kind request to the platform-x86 driver maintainers (hi Andy): Please > do not apply these patches until I've been able to test they don't cause > issues elsewhere. Erm, I just realized these are note platform-x86 driver patches at all. Anyways same request to the extcon maintainers, please do not apply this until I've had a chance to test this (which I'm doing right now). Regards, Hans