mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hermes Zhang <chenhuiz@axis.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>,
	Hermes Zhang <Hermes.Zhang@axis.com>
Cc: kernel@axis.com, "Pali Rohár" <pali@kernel.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power: supply: bq27xxx: Introduce parameter to config cache regs
Date: Fri, 23 Feb 2024 16:40:18 +0800	[thread overview]
Message-ID: <1fe2c4b3-9dd2-a961-4198-45aca3449c36@axis.com> (raw)
In-Reply-To: <eh34cvorgnrw4v5a6emzjk2p6om2ybkn627bpmh775z4ubw63h@nbxgpm767u4x>

Hi,

On 2024/2/22 7:03, Sebastian Reichel wrote:
> Hi,
>
> On Mon, Feb 19, 2024 at 06:05:40PM +0800, Hermes Zhang wrote:
>> Since all of the regs in the bq27xxx_reg_cache are now cached, a simple
>> property read (such as temperature) will need nine I2C transmissions.
>> Introduce a new module parameter to enable the reg cache to be configured,
>> which decrease the amount of unnecessary I2C transmission and preventing
>> the error -16 (EBUSY) happen when working on an I2C bus that is shared by
>> many devices.
> So the problem is not the caching, but the grouping. So instead
> of adding this hack, please change the code to do the caching
> per register. That way you can just keep the caching enabled and
> don't need any custom module parameters.

Thanks for the reply. Yes, the key is the grouping. So do you suggest to 
drop the bq27xxx_reg_cache struct totally and handle the cache for each 
register in e.g. bq27xxx_battery_get_property()? Then it will require an 
extra time info for each register, will that be a big cost? Or am I 
misunderstanding?

Best Regards,

Hermes


  reply	other threads:[~2024-02-23  8:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 10:05 Hermes Zhang
2024-02-21 23:03 ` Sebastian Reichel
2024-02-23  8:40   ` Hermes Zhang [this message]
2024-02-25 21:10     ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1fe2c4b3-9dd2-a961-4198-45aca3449c36@axis.com \
    --to=chenhuiz@axis.com \
    --cc=Hermes.Zhang@axis.com \
    --cc=kernel@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®