From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 626F42BE62E for ; Mon, 8 Dec 2025 07:47:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765180069; cv=none; b=Ao3u3pC0+M3Ko7x7QcSVQOGKnI2c0zz5EobCdlAtFTUYdpApDV2X3VzkfoYzuWH9IOw0en3mQ48SPS3OjPAeY73BJ+CUyU9xxGHZUkER6OLYtuVvnM39FRA2zZgM7l0yN5ImKFKVfQWBTwTHUO5i9xmnfNKwnABCzUA7PXOHoQo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765180069; c=relaxed/simple; bh=4Sj3exzqr0wBaZ1iDeGyG4sjaYa93nVDGgXyKYvktT0=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=fRyiQGMIoVOSn0M4R12KYXpGgyo1cM/4KLGdl04J2y+RE6KamN4lY3wzD5OjhHsnS8JArZxK/pfQuz9BsfUW9nGyAWBFyqqMgR2yLnpqcEBKjPNWI2wNWYhFti6f/qCoYAFWNU4U873cGd7PwVtNypxElInz+UAHyxu+wuDH4DA= 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=ftVrbvTF; arc=none smtp.client-ip=209.85.208.177 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ftVrbvTF" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-37b99da107cso38199681fa.1 for ; Sun, 07 Dec 2025 23:47:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765180065; x=1765784865; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=w+Cb+0WqK1gx0oNY+0a5CpktZBEh9vXSjVxeUrnU6Ig=; b=ftVrbvTFAYQmeGIOmDk+DTuzV16Y4wagTLrDQHt8eurX7sNqECR5goeolm9MixL1B4 CiP/tJEddpZpgD488BiGieT0YdjznLuFU6xHMByClLD2DPIZFs3WxTd6+3UwPzyfpRhl dC/j7YNHT32k5aUkbKV89CtEqxbMK+owtDcy+tpB+UxP/Rm2rCcnySAgeHYc9c8AnAT2 7Kfl5TvYsmy+vV01GDoat7oTOWAytOF7jZjaYNw50Z/SggGGmtGt0qh2exYQ9g1NMiag gULPI4IM9lchhN69zVGwuqT/kjrB4c3Q8b+vZizybEEJ3exxYnrIsnISIkV8KuJGZG9x MIag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765180065; x=1765784865; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=w+Cb+0WqK1gx0oNY+0a5CpktZBEh9vXSjVxeUrnU6Ig=; b=NLEcg7E9S5OSeax5L9wgaaworuEB6jkCnWCmQd4P+pKYX93tSXJ7yRHvniDLU5gOxm 6R2AOEDcIrve5QjFYUJwinLTBruhJU8P3wsLIXZ34S3/wdhHruF5DT+Kgsthkscv5EPn tVln7CZSZoeJsdOqQQixUsxcyLQAL+acAZT10IKTDqi3EI1HJpisyAY9cO+ZMcXm+sF6 bmDUQso10yGqAOX77DUoBk75ShfRjL9hVxw5LJzQQ6sjQObhp3vJtb6dOwQhwF89e91+ gwCgZAZPYoVQx4UshcwP7QRkIykyO7ZvQv4+lA1S7QYPGAR41ZjuMn1ZnlJTdOxan+Po pxQQ== X-Forwarded-Encrypted: i=1; AJvYcCWXu2jfJ3KHwH3fPQnjdEZcJLbUAgF+QrRFipqIpiApA36CIz8nLyLIn+ovy3NfduubpONJeJ5+AC+DUfc=@vger.kernel.org X-Gm-Message-State: AOJu0YycQMBmmnmmC90BKIgbpSf+576NIsctM1OGHsMzdaZn/Y5NBa8K Zz5NhxheyhP5XE1884Gi9SGn3THo3EbHYtk17uR0tIDNlDfM8HdIetGd X-Gm-Gg: ASbGncv4PIlehA/bqphBVhwH+J91Ot8rYsXk+auSoW0CTN5M84qexePwNqPGDDc7nAm r5etfsPrkHFwJE5njU8VvdK5S6hc9s4Ep6I5o5rWLysWg8Iq+TECmqTaEBfHjgsEoTKUWhr3EB/ lixiPXcblO8Q2ADSeohfACRrIr1x5I4ff53na1mfCrfVl3uQUddvF476Jg6nvtIurop4X6E0eED P6lB6JETekphzqJsu5ZxvifbZYfdJB20PApWEqKqJNYvzd1hZfDq3HAy7moG/kklejhlypWul1h rSfdCLO1IpKfGxuY9f1TfvweZq41PliXqkpnQqtOhwamxXWxSQNVUWp9d11qgYVZVXuRtrVUdSa Z2qv1HjgTPjLCym1hcMm9awq1JvF343MyL6MGevley7aGb61Wnaq+xHM90AzhTG8Zya8IiWTOGj bnp3SHbwdpp4PFYKcOI8DZptHm9fG3hQQyr3e1JH3mEwEWO5rDAzCgKWH1yumnNE/JYkI7 X-Google-Smtp-Source: AGHT+IESSv14bPldMeLJOL7iOQqB44E6IyBz+d1JOmB1xlBlZ54Uld4Fk+F4jC5PYVInzgOBQF4kdQ== X-Received: by 2002:a2e:bc1a:0:b0:37b:ab43:8958 with SMTP id 38308e7fff4ca-37ed1fd6fbdmr15839181fa.16.1765180065037; Sun, 07 Dec 2025 23:47:45 -0800 (PST) Received: from ?IPV6:2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703? ([2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-37e6febaec4sm34419241fa.22.2025.12.07.23.47.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 Dec 2025 23:47:44 -0800 (PST) Message-ID: <20389a09-1c69-40fa-a937-289a104d57fa@gmail.com> Date: Mon, 8 Dec 2025 09:47:43 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mfd: bd71828: Add some missing charger related registers To: Andreas Kemnade , lee@kernel.org, linux-kernel@vger.kernel.org References: <20251207085024.7375-1-andreas@kemnade.info> Content-Language: en-US, en-AU, en-GB, en-BW From: Matti Vaittinen In-Reply-To: <20251207085024.7375-1-andreas@kemnade.info> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 07/12/2025 10:50, Andreas Kemnade wrote: > As there are some registers missing which are required for future charger > extensions, add them. > > Signed-off-by: Andreas Kemnade Reviewed-by: Matti Vaittinen Thanks for working with this driver! Much appreciated :) > --- > I have something in preparation for the power supply driver, but I am > sending this now if this might go in earlier e.g. via BD72720 > immutable branch to avoid more immutable branches. > @Matti: Can you check the situation with the other chips supported > by that driver. Is that register there, too? Sure. Just purely based on the data-sheets: - BD71815: I didn't find one. - BD71879: (As you know) - basically the same as BD71828, so they can both use the BD71828_REG_ILIM_STAT and BD71828_REG_DCIN_SET. - BD72720: 1: I see 'CHG_ILIM_STAT' with ILIM_VBUS_STAT[6:0], which says: "Actual value of VBUS current-limitation. The VBUS current limit is increased or decreased automatically. The actual limit can be read from ILIM_VBUS_STAT register." This may, or may not be related to the stuff you are working with. I think I have this register included in the include/linux/mfd/rohm-bd72720.h. On top of that, the BD72720 has OTP options to configure (time) "Interval for VBUS Current Limitation / Relaxation". 2: I see a read-only 'CHG_VBUS_STAT' with 'ILIM_VBUS' bit and: "0 = Normal operation 1 = Automatic limit control" 3: I see enable/disable control for: "VBUS input current limit in Battery Assist" 4: There is also: CHG_VBUS_SET with IBUS_INLIM[6:0], which says: "VBUS current limit setting for Charge. VBUS current limit is automatically changed to supply enough current to the Battery Charger. Present current limit is available to read from ILIM_VBUS_STAT register." This may be something similar to the DCIN_SET. I asked for some clarification from the HQ folks - but they may be quite busy, and my request(s) may not be at the top of the priority list. So, let's see... Are you planning to expose the current limit values to user-space? Allow setting the control to AUTO/fixed value? I suppose this is what enabled you to do some low-power charging, right? Yours, -- Matti --- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~