From patchwork Fri Jul 9 14:27:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Meneguele X-Patchwork-Id: 472142 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1FE4C07E99 for ; Fri, 9 Jul 2021 14:56:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0340613BD for ; Fri, 9 Jul 2021 14:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231963AbhGIO7N (ORCPT ); Fri, 9 Jul 2021 10:59:13 -0400 Received: from server34.i7host.com.br ([186.227.200.26]:41232 "EHLO server34.i7host.com.br" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232349AbhGIO7M (ORCPT ); Fri, 9 Jul 2021 10:59:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smartgreen.net; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9sBfKIgHuQukWy84rgMEl4tx62Eh81wsX/GQxfKJxro=; b=TvObv5UvjinVCUpxLskYD8IEn9 2S37jNFc5TZanPYahDk1JXbxQ1X9XGQGHUt4Y4YlPXHLcBe0wEv09N7EZn6DZ4F1kxI4AI0STRlq5 Jgu3IEgvJbRlF0o/z0B4AAFSmXCqbzOVmJAjjJpW9BMI6Uu10MXQME+875IKxvp6ztDFZRUgg8KZx XXmTpdz0P1dMDvg/XQWf1aIR3xSmZgEG//6oXOPGkkekI+B9cplImEBQhUm5L4jeZoU5DO8NtgHX5 bJVYn3TglFdbAPaFdnURZt6869bRjeU5DedNyVpTefoUXxzk8fyjDchymF/feaeGFeAsPBQNanfeh m7ik3m6g==; Received: from [177.220.172.135] (port=48444 helo=localhost) by server34.i7host.com.br with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m1rTX-004uW1-3E; Fri, 09 Jul 2021 11:27:32 -0300 From: Bruno Meneguele To: sre@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] add Watchdog Timer delay support for BQ24735 Date: Fri, 9 Jul 2021 11:27:29 -0300 Message-Id: <20210709142731.23418-1-bruno.meneguele@smartgreen.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server34.i7host.com.br X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - smartgreen.net X-Get-Message-Sender-Via: server34.i7host.com.br: authenticated_id: bruno.meneguele@smartgreen.net X-Authenticated-Sender: server34.i7host.com.br: bruno.meneguele@smartgreen.net X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The IC BQ24735 has the ability to suspend the battery charging in case the system freezes for some reason: the IC observes consecutive writes for either CargeCurrent of ChargVoltage registers in a maximum period of time. This period of time can be configured by the user through the ChargeOption register in the bits 13 and 14, but it's only possible to change if the user sends the value directly accessing the I2C bus through userspace, because the kernel driver doesn't read or write to the Watchdog bits. This patchset enables the user to configure the value through the device-tree option "ti,wdt-timeout". Changelog: v2 - unfortunately I used a default gitconfig that was pointing to my default user.email and email smtp. This new version corrects it. Bruno Meneguele (2): power: supply: bq24735: reorganize ChargeOption command macros power: supply: bq24735: add watchdog timer delay support .../bindings/power/supply/bq24735.yaml | 13 ++++ drivers/power/supply/bq24735-charger.c | 75 ++++++++++++++++--- include/linux/power/bq24735-charger.h | 1 + 3 files changed, 77 insertions(+), 12 deletions(-)