lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABTCjFBhs3Wh39aiSfLbXKEbB+Hu8ERiok+ueNDRP7ypc3ARyA@mail.gmail.com>
Date: Thu, 25 Sep 2025 20:23:23 +0300
From: Dzmitry Sankouski <dsankouski@...il.com>
To: Sebastian Reichel <sebastian.reichel@...labora.com>
Cc: Chanwoo Choi <cw00.choi@...sung.com>, Krzysztof Kozlowski <krzk@...nel.org>, Lee Jones <lee@...nel.org>, 
	Luca Ceresoli <luca.ceresoli@...tlin.com>, 
	Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, linux-kernel@...r.kernel.org, 
	linux-pm@...r.kernel.org
Subject: Re: [PATCH v5] power: supply: max77705_charger: implement aicl feature

вт, 23 сент. 2025 г. в 01:28, Sebastian Reichel
<sebastian.reichel@...labora.com>:
>
>
> After looking at this again in this simpler version: Why do you
> need the delayed work at all? It seems you can simplify to this:
>
> static irqreturn_t max77705_aicl_irq(int irq, void *irq_drv_data)
> {
>     struct max77705_charger_data *chg = irq_drv_data;
>     unsigned int regval, irq_status;
>     int err;
>
>     do {
>         regmap_read(chg->regmap, MAX77705_CHG_REG_INT_OK, &irq_status);
>         if (!(irq_status & BIT(MAX77705_AICL_I))) {
>             err = regmap_field_read(chg->rfield[MAX77705_CHG_CHGIN_LIM], &regval);
>             if (err < 0)
>                 continue;
>
>             regval--;
>
>             err = regmap_field_write(chg->rfield[MAX77705_CHG_CHGIN_LIM], regval);
>             if (err < 0)
>                 continue;
>
>             msleep(AICL_WORK_DELAY_MS);
>         }
>     } while(irq_status & BIT(MAX77705_AICL_I));
>
>     return IRQ_HANDLED;
> }
>

That long interrupt handler with sleep tricked me, because there's the
concept of
as short as possible irq handler. However, I realise now, this is a bottom
half threaded interrupt handler, so as short as possible may be ignored here.

-- 
Best regards and thanks for review,
Dzmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ