Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1536958lqs; Sat, 15 Jun 2024 13:25:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWBiLiVlA1qNifmFHUIByqPVeTZjbqHoD//QxPFx6Gam4r3T1jsLDdvlsipxkkSA4jo0+H0TQQQsgjaoA5zmWqveA46IrTaBQNJzSS/pA== X-Google-Smtp-Source: AGHT+IE3hbW4uawkWPupKh9VAZzeZuqkmbCUguIVb+qsXcvfAq3hLO+RAnEmPn6cB+gLISgNGGf1 X-Received: by 2002:a05:6808:199d:b0:3d2:220c:6eb9 with SMTP id 5614622812f47-3d24e9e5028mr6278556b6e.56.1718483152966; Sat, 15 Jun 2024 13:25:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718483152; cv=pass; d=google.com; s=arc-20160816; b=SCE3CahR76I4vcAzhV5bvbn/hAab7Zozg9T6HSjv8jUeyBkWyYhl6nKwy77VA/lNEY aRsRitspnWnuQaH3hM2PXFzeQEPoGpNAgpbBOhraPaN10F893cEyWUg2lA/aGl8v2ehL cBemXWuuYSfexUgpagGYPM+jGYqwPduch16vGFBXGV79q/nNb2hU1UwF6trKBQFjkHWu BQ13e/3Ycic3EOchOOi37NK4wlmNSZWQFbZ3JOnwZwfjIaj4McvaARbfG8etkdXT7R0P AVALSPto8rPn2MfrNL1CHSRxnf6QHfX/HWpbDbKPpkWOfS2ib7vD9fykcHQgfqfTk1jf tTgg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=yNKt7Ml+VkGdZYvOnEsbsW47lMaRP2AbddrHl/jp3zk=; fh=38gFkmEoF+EGf8y3TvEZiO82mcdOoxu5rEKXToTqpQI=; b=iFroEFPM8rRZQ7ENuPZZcV/eqTOSvWY5qStozMwubidjoWuMxZClOeOthyBcj5PWSs XVmDJXOcIIuN1fwOpDAZ9AM58RCJrsm1UPOHf8tlBmEr7gFndlzaX0Jb4bkqX7aQEhak UvRuZ7SGhZHRlFCUX3Wo0wfmpFOAaJ5EmhJD8jrUl24oiYnt5BUulwVla3GBHZ40F1X3 xII+SuNl3ExWdNigpDJuQj6FziVuahmqlvdwHe9/3wAI2w2nZQt72AgdawMWhsU+Byh6 WeJgurDPBBP9P7vmVJV2htIEXtYnyQeOsn/SU7bReo36zVjaf9IDljD+ToNhQtRTTRFj 4Q3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DzTqE9qL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-216006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5afe7c7si65492466d6.257.2024.06.15.13.25.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 13:25:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-216006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DzTqE9qL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-216006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AC2CE1C21119 for ; Sat, 15 Jun 2024 20:25:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A44161FD7; Sat, 15 Jun 2024 20:25:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DzTqE9qL" Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20F2FCA6B; Sat, 15 Jun 2024 20:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718483143; cv=none; b=HL1IzCQ/XeFt3wa+q8D1Whp+/HnR5yiXeF7pW5Srw+00t/OSwXizRFuFhJwQdYjQY5L45S+RTOVni5rN0sZpFqGz3nY3M7gIbvXymO8sOSknJ8u5ycEiEfbaN6r+XinNMGV5gDI7/TDECoAuirhx+AxdANLJZgaaa/UmMGbUGUA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718483143; c=relaxed/simple; bh=4XGrnqcIzlgogEprEB30ISLMTdF9AZgAV24wOsKMnQU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=S4iwUY7i0hcxjyTnJRqrejb3rUUZmZnVbrJme2YQI65EMWbGru/EQgRTh2rZkXRB1mRYD8OMYycQFcimsv77sVKms8Xn1e7Lk0xSa9/8bVC1V80NtWN90TwNogaPOfQBr0PPYUzf2epQdlhd7pxpnF/B3Iy5OOy7tfLV+5fp1Jw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DzTqE9qL; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-42249a4f9e4so22642915e9.2; Sat, 15 Jun 2024 13:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718483140; x=1719087940; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=yNKt7Ml+VkGdZYvOnEsbsW47lMaRP2AbddrHl/jp3zk=; b=DzTqE9qLQcWaJAVZ7V6eeamMHoE6ew0Yn3WlJ93rCRJxc89/G8TM1dWuYrBr5U70PL 8NPnC3VVLdebFDkfhrQE6KLBqyilqParVdLGs0Y6mcCev9Go64fBvWEVDFOuWVBbgLOR D5HFEbnO1ACn52BAmfWoAhGRzcx/EKYZvs8NBZ8Dplcpm3xg4+GaMtOgy3q2FCtn704W bW7fcJ6MR88DiVC3V0moDcY0/rWmzoWPlz3iiy1QSRSspwNZmNx+qA4pJSd/1ugERy1x 0Cnv0sU5Nj4PDq1pW8icEgRE6jryqb94tqo5BNh9eS+Tn41UB+ETaSUZbChIElDAbjWC FH3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718483140; x=1719087940; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yNKt7Ml+VkGdZYvOnEsbsW47lMaRP2AbddrHl/jp3zk=; b=QLy+DA/huEbt14woSYafoupZYUyWlX72vhtBiK1qwp8TFlCKzWw3nNFBK+beCHFbxl vXts3qZ76ccimabnPl8W/67U0rmoI7lt5OHXt2F2Gm/hc7xWRX5RUflWFEaR5M7w5tJ8 Iu5G4YNOuxLeiI5SBZNZHWPQ4EyPBjATSNFMcmW3XZYANolbYS+bq+Mmi+oC8dqOB8K7 /H6tHWx5qRTsNM92yMr71m8s6XV4RpmeNifiI+8T+2mnAlItgEfIB5fiputvWOmv5dOo WLM/KnS30ckHrP9JKL8rMEr3Rq9igsc7J9WkKZYJ22feVaHg9Mh6BiW+Knl9PdOL0UGh JSgg== X-Forwarded-Encrypted: i=1; AJvYcCWAsKLEzycQuv6t6oSdWSqIPfeacQqxVfeiwZ5Vzy6/yKpIJG5kstRwKwOH+dfahWfcVwt6XVGC3NXmFkkwIqOLOSiqiI1tMB46SeANidHR549VWNxJeeMgqQgxNVUFUiOdc/kNhF8= X-Gm-Message-State: AOJu0YwSCs5/aIN8x8nNmEl2pCe7olNP2060OVzREWtU37RtTs1Tr79D ceVsfkrrVBs6mE5SuJqcgG3sRdYYmPA1AdUz4CCmFAgIkQvSnNZy X-Received: by 2002:a05:600c:154a:b0:421:8f16:16d5 with SMTP id 5b1f17b1804b1-42304852afcmr57488515e9.33.1718483140145; Sat, 15 Jun 2024 13:25:40 -0700 (PDT) Received: from debian.fritz.box ([93.184.186.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42306049f1asm70289275e9.22.2024.06.15.13.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 13:25:39 -0700 (PDT) From: Dimitri Fedrau To: Cc: Dimitri Fedrau , Sebastian Reichel , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v2 0/2] power: supply: add support for MAX1720x standalone fuel Date: Sat, 15 Jun 2024 22:25:23 +0200 Message-Id: <20240615202527.163641-1-dima.fedrau@gmail.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Changes to max1721x_battery.c: - reading manufacturer, model name and serial number is only possible when SBS functions of the IC are enabled.(nNVCfg0.enSBS) Factory default is off. Manufacturer is "Maxim Integrated" and the model name can be derived by register MAX172XX_DEV_NAME. Serial number is not available anymore. - According to the datasheet MAX172XX_BAT_PRESENT is at BIT(3) not BIT(4). Furthermore the naming is misleading, when BIT(3) is set the battery is not present. - Removed DeviceName, ManufacturerName and SerialNumber from struct max17211_device_info Changes in V2: - Changed E-Mail in Patch (2/2) Signed-Off Dimitri Fedrau (2): dt-bindings: power: supply: add support for MAX17201/MAX17205 fuel gauge power: supply: add support for MAX1720x standalone fuel gauge .../bindings/power/supply/maxim,max1720x.yaml | 51 +++ drivers/power/supply/Kconfig | 12 + drivers/power/supply/Makefile | 1 + drivers/power/supply/max1720x_battery.c | 324 ++++++++++++++++++ 4 files changed, 388 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max1720x.yaml create mode 100644 drivers/power/supply/max1720x_battery.c -- 2.39.2