Re: [PATCH] hwmon: (max77705) add initial support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ср, 26 февр. 2025 г. в 16:53, Guenter Roeck <linux@xxxxxxxxxxxx>:
>
> On 2/25/25 11:11, Dzmitry Sankouski wrote:
> > Add support for max77705 hwmon. Includes charger input, system bus, and
> > vbyp measurements.
> >
> > Signed-off-by: Dzmitry Sankouski <dsankouski@xxxxxxxxx>
> > ---
> > Maxim MAX77705 is a Companion Power Management and Type-C interface IC.
> > It includes charger and fuel gauge blocks, and is capable of measuring
> > charger input current, system bus volatage and current, and bypass
> > voltage.
> >
> > This patch add support for mentioned measurements.
(...)
> > +
> > +struct channel_desc {
> > +     u8 reg;
> > +     u8 avg_reg;
> > +     const char *const label;
> > +     // register resolution. nano Volts for voltage, nano Amperes for current
> > +     u64 resolution;
>
> Why u64 ?
>

Resolution is in nano Volts, and VBYP value is typically 5v, which leads to
u32 overflow.

(...)
>
> This is unusual for an mfd driver. Why not pass regmap from the parent
> driver ?
>

This limits access to shared device register map by using readable table
with related registers only.

(...)

-- 
Best regards and thanks for review,
Dzmitry





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux