Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1652576imj; Thu, 14 Feb 2019 09:46:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IYvLZH90XnXncn9+2HsCo3xulWESnrxbPHLyZq3/6WiMFhT/RAJa0P4yIcQe7F/RcWjv+6x X-Received: by 2002:a63:a:: with SMTP id 10mr999261pga.121.1550166401281; Thu, 14 Feb 2019 09:46:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550166401; cv=none; d=google.com; s=arc-20160816; b=zfmRz4reAgydlsXvd5kWx7yhANB/M2YZublQtZukrXS/lN+aGgN04oaIjFAywETX44 3bqe7z1I19/BF3aTpaqbV2y8OVHB0OS4Ny5/u/7BBb3oS4X0NCYyvQNDKQ6QlqyvmE1R KN4zjYGBvcibsuyPIHmfxteuQhwm1nEvFEj62pCHW0wmmuYCLQPyhXIxIrMSOUjtD8Di lqe5lFvs+VajbP9UdOLBaVVMY8FHIdGc/f0rYwDkpviQYWbqtbHTqLqSB+Yn4JarZlKV rRpdzaMMGYmvG24liNUwevexThZYXKR3cIjLHGL8asUv7/YSzevZ95/9G6KCodne0gQ6 fNNw== 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:to:from:subject; bh=Sdq/xPWrFQPnFX96tIhCA42cOhxAnf+ayG8BSFYnesg=; b=BzhWcDk7lh2rKb0VmF4XPqtwDhiNpWDnhpeC3Wiz4mRvIvmXO6A8nsPNoooQ6O54/J obVzx342z1P8MCPeZw8AGvGyJBBHDpY+tIQxg4wQVyBV/fIW7uHrVrjx9Ag6JCb61YbM 9ojXgw4jFOsprxecYStiZ9e3hSItdzYWFDQDF8i1RyYhzh5oWcYS2UERTldwZ5ctG6R5 xLGWe/C7AGz/VUXycwN/q6eikdBAecbkn+tlxZxjL7RSJ68AWmfY46aHc9K0hXk0IoaX zdW9BpTBvyaOc0FJUrBwLdqgvHlQmuOBbWlRkDHMMZgnfw0aorV8v3HI0w5TvyPTl7DR pPOQ== 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 n23si2953022pff.10.2019.02.14.09.46.25; Thu, 14 Feb 2019 09:46:41 -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 S2406389AbfBNKEs (ORCPT + 99 others); Thu, 14 Feb 2019 05:04:48 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:34073 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387663AbfBNKEr (ORCPT ); Thu, 14 Feb 2019 05:04:47 -0500 Received: by mail-ed1-f65.google.com with SMTP id b3so4543820ede.1 for ; Thu, 14 Feb 2019 02:04:46 -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:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Sdq/xPWrFQPnFX96tIhCA42cOhxAnf+ayG8BSFYnesg=; b=OXdYrXbO8p5tXRauteXDM52wwXBFv2ChK+3vcTknux5LfEBcWQAJ+qrot9YmnwOxfc xrXXQ1jpKRk/FJxGMukK55gILB51bfJ6Y+Y4He2GJaQFYUco52MVIeuG4IwMoFxFXtAj wMWZJrWIAJgE7wpPM88Vdt1Eq13JPHFDH1SdSBB+vsFjk7NDs002Nv4nJCpqdwLbbDMR WiXGnPZkXBrq/sF+bZsfll4Dv++6jB/ZqgAy1MMct1FPIjoqhArCMEuKIVz/zfXA6vna 4n7Zz1j3r/+DiNk/6BY9UyoF1rKHpKGuhcA+EvK9o/dpk7upxDVgSb3DUcvQG7Qgq4GT GZdg== X-Gm-Message-State: AHQUAubaaWixDJzsO6SI33JJL9tFDI0K/3vmWjnrA9wZdiwmr/Hph0Pk cyVShRNpNEiLAm4S66gPaHvDiNuy2/w= X-Received: by 2002:a50:9e0a:: with SMTP id z10mr2311414ede.39.1550138685975; Thu, 14 Feb 2019 02:04:45 -0800 (PST) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id v1sm523774eds.47.2019.02.14.02.04.44 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 02:04:45 -0800 (PST) Subject: Re: [PATCH v2 1/2] leds: Add Intel Cherry Trail Whiskey Cove PMIC LEDs From: Hans de Goede To: Yauhen Kharuzhy , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org References: <20190212205901.13037-1-jekhor@gmail.com> <20190212205901.13037-2-jekhor@gmail.com> <1df39a63-533f-bb68-a056-a0241f148be9@redhat.com> Message-ID: <079efdd4-2259-1e6f-48dd-5876f2bd7a93@redhat.com> Date: Thu, 14 Feb 2019 11:04:44 +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: <1df39a63-533f-bb68-a056-a0241f148be9@redhat.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 13-02-19 23:43, Hans de Goede wrote: > Hi, > > On 12-02-19 21:59, Yauhen Kharuzhy wrote: >> Add support for LEDs connected to the Intel Cherry Trail Whiskey Cove >> PMIC. Charger and general-purpose leds are supported. Hardware blinking >> is implemented, breathing is not. >> >> This driver was tested with Lenovo Yoga Book notebook. > Note that in my experience the "charging" mode only works > when bits 0-1 have the value 10. Ok, scrap that I don't know where this info in my notes came from (probably user error), the power-on-reset value for bits 0-1 is 00 and then the hw controls the charging LED just fine. So your code is right, bit 0 switches between hw-control (0) and user-control (1) and bit 1 is on/off when user-control is enabled. Regards, Hans